Makes changes to an Network Information Services (NIS) map.
C Library (libc.a)
The yp_update subroutine is used to make changes to a NIS map. The syntax is the same as that of the yp_match subroutine except for the additional ypop parameter, which may take on one of the following four values:
| Value | Description |
|---|---|
| ypop _INSERT | Inserts the key-value pair into the map. If the key already exists in the map, the yp_update subroutine returns a value of YPERR_KEY. |
| ypop_CHANGE | Changes the data associated with the key to the new value. If the key is not found in the map, the yp_update subroutine returns a value of YPERR_KEY. |
| ypop_STORE | Stores an item in the map regardless of whether the item already exists. No error is returned in either case. |
| ypop_DELETE | Deletes an entry from the map. |
| Item | Description |
|---|---|
| indomain | Points to the name of the domain used as input to the subroutine. |
| inmap | Points to the name of the map used as input to the subroutine. |
| ypop | Specifies the update operation to be used as input to the subroutine. |
| inkey | Points to the input key to be used as input to the subroutine. |
| inkeylen | Specifies the length, in bytes, of the inkey parameter. |
| indata | Points to the data used as input to the subroutine. |
| indatalen | Specifies the length, in bytes, of the data used as input to the subroutine. |
Upon successful completion, this routine returns a value of 0. If unsuccessful, it returns one of the error codes described in the rpcsvc/yp_prot.h file.
| Item | Description |
|---|---|
| /var/yp/updaters | A makefile for updating NIS maps. |