Networking Services Library Functions ypupdate(3NSL)
NAME
ypupdate - change NIS information
SYNOPSIS
#include
int ypupdate(char *domain, char *map, unsigned ypop, char *key,
char *int keylen, char *data, int datalen);
DESCRIPTION
ypupdate() is used to make changes to the NIS database. The
syntax is the same as that of ypmatch() except for the
extra parameter ypop which may take on one of four values.
If it is POPCHANGE then the data associated with the key
will be changed to the new value. If the key is not found in
the database, then ypupdate() will return YPERKEY. If
ypop has the value YPOPINSERT then the key-value pair will
be inserted into the database. The error YPERKEY is
returned if the key already exists in the database. To store
an item into the database without concern for whether it
exists already or not, pass ypop as YPOPSTORE and no error
will be returned if the key already or does not exist. To
delete an entry, the value of ypop should be YPOPDELETE.
This routine depends upon secure RPC, and will not work
unless the network is running secure RPC.
RETURN VALUES
If the value of ypop is POPCHANGE, ypupdate() returns
the error YPERKEY if the key is not found in the database.
If the value of ypop is POPINSERT, ypupdate() returns
the error YPERKEY if the key already exists in the data-
base.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
SunOS 5.11 Last change: 30 Dec 1996 1
Networking Services Library Functions ypupdate(3NSL)
ATRIBUTE TYPE ATRIBUTE VALUE
MT-Level Unsafe
SEE ALSO
securerpc(3NSL), ypclnt(3NSL), attributes(5)
NOTES
This interface is unsafe in multithreaded applications.
Unsafe interfaces should be called only from the main
thread.
SunOS 5.11 Last change: 30 Dec 1996 2
|