Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

yp_update(3nsl) [debian man page]

yp_update(3NSL)                                        Networking Services Library Functions                                       yp_update(3NSL)

NAME
yp_update - change NIS information SYNOPSIS
#include <rpcsvc/ypclnt.h> int yp_update(char *domain, char *map, unsigned ypop, char *key, int keylen, char *data, int datalen); DESCRIPTION
yp_update() is used to make changes to the NIS database. The syntax is the same as that of yp_match() except for the extra parameter ypop which may take on one of four values. If it is POP_CHANGE then the data associated with the key will be changed to the new value. If the key is not found in the database, then yp_update() will return YPERR_KEY. If ypop has the value YPOP_INSERT then the key-value pair will be inserted into the database. The error YPERR_KEY 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 YPOP_STORE and no error will be returned if the key already or does not exist. To delete an entry, the value of ypop should be YPOP_DELETE. 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 POP_CHANGE, yp_update() returns the error YPERR_KEY if the key is not found in the database. If the value of ypop is POP_INSERT, yp_update() returns the error YPERR_KEY if the key already exists in the database. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |Unsafe | +-----------------------------+-----------------------------+ SEE ALSO
secure_rpc(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.10 30 Dec 1996 yp_update(3NSL)

Check Out this Related Man Page

getpublickey(3NSL)                                     Networking Services Library Functions                                    getpublickey(3NSL)

NAME
getpublickey, getsecretkey, publickey - retrieve public or secret key SYNOPSIS
#include <rpc/rpc.h> #include <rpc/key_prot.h> int getpublickey(const char netname[MAXNETNAMELEN], char publickey[HEXKEYBYTES+1]); int getsecretkey(const char netname[MAXNETNAMELEN], char secretkey[HEXKEYBYTES+1], const char *passwd); DESCRIPTION
getpublickey() and getsecretkey() get public and secret keys for netname. The key may come from one of the following sources: o the /etc/publickey file. See publickey(4). o the NIS map ``publickey.byname'' or the NIS+ table ``cred.org_dir''. The sources and their lookup order are specified in the /etc/nss- witch.conf file. See nsswitch.conf(4). getsecretkey() has an extra argument, passwd, which is used to decrypt the encrypted secret key stored in the database. RETURN VALUES
Both routines return 1 if they are successful in finding the key. Otherwise, the routines return 0. The keys are returned as null-termi- nated, hexadecimal strings. If the password supplied to getsecretkey() fails to decrypt the secret key, the routine will return 1 but the secretkey [0] will be set to NULL. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |Safe | +-----------------------------+-----------------------------+ SEE ALSO
secure_rpc(3NSL), nsswitch.conf(4), publickey(4), attributes(5) WARNINGS
If getpublickey() gets the public key from any source other than NIS+, all authenticated NIS+ operations may fail. To ensure that this does not happen, edit the nsswitch.conf(4) file to make sure that the public key is obtained from NIS+. NOTES NIS+ might not be supported in future releases of the SolarisTM Operating Environment. Tools to aid the migration from NIS+ to LDAP are available in the Solaris 9 operating environment. For more information, visit http://www.sun.com/directory/nisplus/transition.html. SunOS 5.10 18 Dec 2001 getpublickey(3NSL)
Man Page