2 .\" Copyright 1989 AT&T Copyright (c) 1988 Sun Microsystems, Inc. - All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" 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]
6 .TH YP_UPDATE 3NSL "Dec 30, 1996"
8 yp_update \- change NIS information
12 #include <rpcsvc/ypclnt.h>
16 \fBint\fR \fByp_update\fR(\fBchar *\fR\fIdomain\fR, \fBchar *\fR\fImap\fR, \fBunsigned\fR \fIypop\fR, \fBchar *\fR\fIkey\fR,
17 \fBchar *\fR\fBint\fR \fIkeylen\fR, \fBchar *\fR\fIdata\fR, \fBint\fR \fIdatalen\fR);
23 \fByp_update()\fR is used to make changes to the NIS database. The syntax is
24 the same as that of \fByp_match()\fR except for the extra parameter \fIypop\fR
25 which may take on one of four values. If it is \fBPOP_CHANGE\fR then the data
26 associated with the key will be changed to the new value. If the key is not
27 found in the database, then \fByp_update()\fR will return \fBYPERR_KEY\fR. If
28 \fIypop\fR has the value \fBYPOP_INSERT\fR then the key-value pair will be
29 inserted into the database. The error \fBYPERR_KEY\fR is returned if the key
30 already exists in the database. To store an item into the database without
31 concern for whether it exists already or not, pass \fIypop\fR as
32 \fBYPOP_STORE\fR and no error will be returned if the key already or does not
33 exist. To delete an entry, the value of \fIypop\fR should be \fBYPOP_DELETE\fR.
36 This routine depends upon secure \fBRPC,\fR and will not work unless the
37 network is running secure \fBRPC.\fR
41 If the value of \fIypop\fR is \fBPOP_CHANGE,\fR \fByp_update()\fR returns the
42 error \fBYPERR_KEY\fR if the key is not found in the database.
45 If the value of \fIypop\fR is \fBPOP_INSERT,\fR \fByp_update()\fR returns the
46 error \fBYPERR_KEY\fR if the key already exists in the database.
50 See \fBattributes\fR(5) for descriptions of the following attributes:
58 ATTRIBUTE TYPE ATTRIBUTE VALUE
66 \fBsecure_rpc\fR(3NSL), \fBypclnt\fR(3NSL), \fBattributes\fR(5)
70 This interface is unsafe in multithreaded applications. Unsafe interfaces
71 should be called only from the main thread.