1272850Shrs/*-
2272850Shrs * Copyright (c) 2010, Oracle America, Inc.
3272850Shrs *
4272850Shrs * Redistribution and use in source and binary forms, with or without
5272850Shrs * modification, are permitted provided that the following conditions are
6272850Shrs * met:
7272850Shrs *
8272850Shrs *     * Redistributions of source code must retain the above copyright
9272850Shrs *       notice, this list of conditions and the following disclaimer.
10272850Shrs *     * Redistributions in binary form must reproduce the above
11272850Shrs *       copyright notice, this list of conditions and the following
12272850Shrs *       disclaimer in the documentation and/or other materials
13272850Shrs *       provided with the distribution.
14272850Shrs *     * Neither the name of the "Oracle America, Inc." nor the names of its
15272850Shrs *       contributors may be used to endorse or promote products derived
16272850Shrs *       from this software without specific prior written permission.
17272850Shrs *
18272850Shrs *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19272850Shrs *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20272850Shrs *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
21272850Shrs *   FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
22272850Shrs *   COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
23272850Shrs *   INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24272850Shrs *   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
25272850Shrs *   GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26272850Shrs *   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
27272850Shrs *   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28272850Shrs *   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29272850Shrs *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
301832Swollman */
311832Swollman
321832Swollman/*
331832Swollman * YP password update protocol
341832Swollman * Requires unix authentication
351832Swollman */
361832Swollman
371832Swollman#ifndef RPC_HDR
381832Swollman%#ifndef lint
391832Swollman%/*static char sccsid[] = "from: @(#)yppasswd.x 1.1 87/04/13 Copyr 1987 Sun Micro";*/
401832Swollman%/*static char sccsid[] = "from: @(#)yppasswd.x	2.1 88/08/01 4.0 RPCSRC";*/
411832Swollman%#endif /* not lint */
42114629Sobrien%#include <sys/cdefs.h>
43114629Sobrien%__FBSDID("$FreeBSD$");
441832Swollman#endif
451832Swollman
461832Swollmanprogram YPPASSWDPROG {
471832Swollman	version YPPASSWDVERS {
481832Swollman		/*
491832Swollman		 * Update my passwd entry
501832Swollman		 */
511832Swollman		int
521832Swollman		YPPASSWDPROC_UPDATE(yppasswd) = 1;
531832Swollman	} = 1;
541832Swollman} = 100009;
551832Swollman
561832Swollman
571832Swollmanstruct x_passwd {
581832Swollman	string pw_name<>;	/* username */
591832Swollman	string pw_passwd<>;	/* encrypted password */
601832Swollman	int pw_uid;		/* user id */
611832Swollman	int pw_gid;		/* group id */
621832Swollman	string pw_gecos<>;	/* in real life name */
631832Swollman	string pw_dir<>;	/* home directory */
641832Swollman	string pw_shell<>;	/* default shell */
651832Swollman};
661832Swollman
671832Swollmanstruct yppasswd {
681832Swollman	string oldpass<>;	/* unencrypted old password */
691832Swollman	x_passwd newpw;		/* new passwd entry */
701832Swollman};
711832Swollman
721832Swollman
7326208Swpaul#ifdef RPC_HDR
7426208Swpaul%#include <sys/cdefs.h>
7593064Simp%extern int _yppasswd( char * , struct x_passwd * );
7626208Swpaul%#define yppasswd(x,y) _yppasswd(x,y)
7726208Swpaul#endif
78