1yp_update(3NSL)      Networking Services Library Functions     yp_update(3NSL)
2
3
4

NAME

6       yp_update - change NIS information
7

SYNOPSIS

9       #include <rpcsvc/ypclnt.h>
10
11
12
13       int yp_update(char *domain, char *map, unsigned ypop, char *key,
14            char *int keylen, char *data, int datalen);
15
16

DESCRIPTION

18       yp_update()  is used to make changes to the NIS database. The syntax is
19       the same as that of yp_match() except  for  the  extra  parameter  ypop
20       which may take on one of four values. If it is POP_CHANGE then the data
21       associated with the key will be changed to the new value. If the key is
22       not  found  in the database, then yp_update() will return YPERR_KEY. If
23       ypop has the value YPOP_INSERT then the key-value pair will be inserted
24       into  the  database. The error YPERR_KEY is returned if the key already
25       exists in the database. To store an item into the database without con‐
26       cern  for whether it exists already or not, pass ypop as YPOP_STORE and
27       no error will be returned if the key already  or  does  not  exist.  To
28       delete an entry, the value of ypop should be YPOP_DELETE.
29
30
31       This routine depends upon secure RPC, and will not work unless the net‐
32       work is running secure RPC.
33

RETURN VALUES

35       If the value of  ypop is  POP_CHANGE,  yp_update()  returns  the  error
36       YPERR_KEY if the key is not found in the database.
37
38
39       If  the  value  of   ypop is  POP_INSERT, yp_update() returns the error
40       YPERR_KEY if the key already exists in the database.
41

ATTRIBUTES

43       See attributes(5) for descriptions of the following attributes:
44
45
46
47
48       ┌─────────────────────────────┬─────────────────────────────┐
49       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
50       ├─────────────────────────────┼─────────────────────────────┤
51       │MT-Level                     │Unsafe                       │
52       └─────────────────────────────┴─────────────────────────────┘
53

SEE ALSO

55       secure_rpc(3NSL), ypclnt(3NSL), attributes(5)
56

NOTES

58       This interface is unsafe in multithreaded applications.  Unsafe  inter‐
59       faces should be called only from the main thread.
60
61
62
63SunOS 5.11                        30 Dec 1996                  yp_update(3NSL)
Impressum