/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* DESCRIPTION: Contains helper functions for N2L
*/
/*
* Includes. WE WANT TO USE REAL DBM FUNCTIONS SO DO NOT INCLUDE SHIM_HOOKS.H.
*/
#include <unistd.h>
#include <syslog.h>
#include <ndbm.h>
#include <sys/systeminfo.h>
#include <errno.h>
#include <strings.h>
#include "ypsym.h"
#include "ypdefs.h"
#include "shim.h"
#include "yptol.h"
#include "stdio.h"
#include "../ldap_util.h"
/* Enable standard YP code features defined in ypdefs.h */
/*
* FUNCTION : alloc_temp_names()
*
* DESCRIPTION: Creates the set of temporary names for update files. It is
* the caller responsibility to free these.
*
* GIVEN : Name of map (fully qualified)
*
* RETURNS : SUCCESS with all names allocated.
* FAILURE with no names allocated.
*/
{
if (NULL == *temp_entries) {
return (FAILURE);
}
return (FAILURE);
}
return (SUCCESS);
}
/*
* FUNCTION : addpair()
*
* DESCRIPTION: Adds a single string entry to a dbm database. This is a copy of
* a function from makedbm but is useful enough to be put into
* shared code.
*
* GIVEN: Database handle
* Key
* Value
*
* RETURNS : SUCCESS = Value written
* FAILURE = Value not written.
*/
{
errno = 0;
"(errno=%d)",
return (FAILURE);
}
return (SUCCESS);
}
/*
* FUNCTION : dump_datum()
*
* DESCRIPTION: Prints out a datum as a text string with no line feed.
*/
void
{
int i;
printf("NULL datum");
return;
}
printf("NULL dptr");
return;
}
}
/*
* FUNCTION : update_timestamp()
*
* DESCRIPTION: Adds, or updates, a maps last modified timestamp.
*
* GIVEN : Pointer to an open DBM file.
*
* RETURNS : SUCCESS = Entry created
* FAILURE = Entry not created
*/
{
return (FAILURE);
}
return (FAILURE);
return (SUCCESS);
}