8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / cmd / ypcmd / yppasswd / yppasswdxdr.c
blob7112b9ad3a02d52d57484877d21292cb7eeeb72e
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
20 * CDDL HEADER END
24 * Copyright 2014 Nexenta Systems, Inc. All rights reserved.
28 * Copyright (c) 1996, by Sun Microsystems, Inc.
29 * All rights reserved.
32 #include <rpc/rpc.h>
33 #include <rpcsvc/yppasswd.h>
35 bool_t
36 xdr_passwd(XDR *xdrs, struct passwd *pw)
38 if (!xdr_wrapstring(xdrs, &pw->pw_name)) {
39 return (FALSE);
41 if (!xdr_wrapstring(xdrs, &pw->pw_passwd)) {
42 return (FALSE);
44 if (!xdr_uid_t(xdrs, &pw->pw_uid)) {
45 return (FALSE);
47 if (!xdr_gid_t(xdrs, (&pw->pw_gid))) {
48 return (FALSE);
50 if (!xdr_wrapstring(xdrs, &pw->pw_gecos)) {
51 return (FALSE);
53 if (!xdr_wrapstring(xdrs, &pw->pw_dir)) {
54 return (FALSE);
56 if (!xdr_wrapstring(xdrs, &pw->pw_shell)) {
57 return (FALSE);
59 return (TRUE);
62 bool_t
63 xdr_yppasswd(XDR *xdrs, struct yppasswd *yppw)
65 if (!xdr_wrapstring(xdrs, &yppw->oldpass)) {
66 return (FALSE);
68 if (!xdr_passwd(xdrs, &yppw->newpw)) {
69 return (FALSE);
71 return (TRUE);