diff options
author | Marcel Telka <marcel.telka@nexenta.com> | 2014-10-18 02:05:10 +0200 |
---|---|---|
committer | Richard Lowe <richlowe@richlowe.net> | 2014-10-21 17:22:04 -0400 |
commit | a05fd0c9b9aa46cf66ddea7617e56facdf1f4aaf (patch) | |
tree | c182de7128e137f7b215cb0f39472ff1f404f06a /usr/src | |
parent | 91e93ec4fe0674105733e39b40b5119b795b451a (diff) | |
download | illumos-joyent-a05fd0c9b9aa46cf66ddea7617e56facdf1f4aaf.tar.gz |
5246 xdr_uid_t/xdr_gid_t cleanups
Reviewed by: David Höppner <0xffea@gmail.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/cmd/fs.d/autofs/automount.h | 6 | ||||
-rw-r--r-- | usr/src/cmd/fs.d/nfs/mountd/nfsauth_xdr.c | 17 | ||||
-rw-r--r-- | usr/src/cmd/ypcmd/yppasswd/yppasswdxdr.c | 10 | ||||
-rw-r--r-- | usr/src/lib/libnsl/rpc/authsys_prot.c | 9 | ||||
-rw-r--r-- | usr/src/uts/common/fs/nfs/nfs_auth_xdr.c | 17 | ||||
-rw-r--r-- | usr/src/uts/common/rpc/auth_sys.h | 9 | ||||
-rw-r--r-- | usr/src/uts/common/sys/fs/autofs.h | 6 |
7 files changed, 43 insertions, 31 deletions
diff --git a/usr/src/cmd/fs.d/autofs/automount.h b/usr/src/cmd/fs.d/autofs/automount.h index 2355a2339e..11de5e49bd 100644 --- a/usr/src/cmd/fs.d/autofs/automount.h +++ b/usr/src/cmd/fs.d/autofs/automount.h @@ -18,6 +18,11 @@ * * CDDL HEADER END */ + +/* + * Copyright 2014 Nexenta Systems, Inc. All rights reserved. + */ + /* * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. @@ -375,7 +380,6 @@ extern int getmapkeys_ldap(char *, struct dir_entry **, int *, int *, /* * not defined in any header file */ -extern bool_t xdr_uid_t(XDR *, uid_t *); extern int __clnt_bindresvport(CLIENT *); extern int getnetmaskbynet(const struct in_addr, struct in_addr *); diff --git a/usr/src/cmd/fs.d/nfs/mountd/nfsauth_xdr.c b/usr/src/cmd/fs.d/nfs/mountd/nfsauth_xdr.c index 8c526eeb31..f2a8426cc3 100644 --- a/usr/src/cmd/fs.d/nfs/mountd/nfsauth_xdr.c +++ b/usr/src/cmd/fs.d/nfs/mountd/nfsauth_xdr.c @@ -18,16 +18,19 @@ * * CDDL HEADER END */ + /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright 2014 Nexenta Systems, Inc. All rights reserved. */ + /* - * Copyright 2014 Nexenta Systems, Inc. All rights reserved. + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. */ #include <stdlib.h> #include <nfs/auth.h> +#include <rpc/auth_sys.h> bool_t xdr_varg(XDR *xdrs, varg_t *vap) @@ -64,9 +67,9 @@ xdr_nfsauth_arg(XDR *xdrs, nfsauth_arg_t *argp) return (FALSE); if (!xdr_int(xdrs, &argp->areq.req_flavor)) return (FALSE); - if (!xdr_u_int(xdrs, &argp->areq.req_clnt_uid)) + if (!xdr_uid_t(xdrs, &argp->areq.req_clnt_uid)) return (FALSE); - if (!xdr_u_int(xdrs, &argp->areq.req_clnt_gid)) + if (!xdr_gid_t(xdrs, &argp->areq.req_clnt_gid)) return (FALSE); return (TRUE); } @@ -78,9 +81,9 @@ xdr_nfsauth_res(XDR *xdrs, nfsauth_res_t *argp) return (FALSE); if (!xdr_int(xdrs, &argp->ares.auth_perm)) return (FALSE); - if (!xdr_u_int(xdrs, &argp->ares.auth_srv_uid)) + if (!xdr_uid_t(xdrs, &argp->ares.auth_srv_uid)) return (FALSE); - if (!xdr_u_int(xdrs, &argp->ares.auth_srv_gid)) + if (!xdr_gid_t(xdrs, &argp->ares.auth_srv_gid)) return (FALSE); return (TRUE); } diff --git a/usr/src/cmd/ypcmd/yppasswd/yppasswdxdr.c b/usr/src/cmd/ypcmd/yppasswd/yppasswdxdr.c index 6bb83acf36..7112b9ad3a 100644 --- a/usr/src/cmd/ypcmd/yppasswd/yppasswdxdr.c +++ b/usr/src/cmd/ypcmd/yppasswd/yppasswdxdr.c @@ -19,19 +19,19 @@ * * CDDL HEADER END */ + +/* + * Copyright 2014 Nexenta Systems, Inc. All rights reserved. + */ + /* * Copyright (c) 1996, by Sun Microsystems, Inc. * All rights reserved. */ - -#pragma ident "%Z%%M% %I% %E% SMI" /* mods by OpCom */ #include <rpc/rpc.h> #include <rpcsvc/yppasswd.h> -extern bool_t xdr_uid_t(XDR *, uid_t *); -extern bool_t xdr_gid_t(XDR *, gid_t *); - bool_t xdr_passwd(XDR *xdrs, struct passwd *pw) { diff --git a/usr/src/lib/libnsl/rpc/authsys_prot.c b/usr/src/lib/libnsl/rpc/authsys_prot.c index 44e005823c..b1c4c06a6f 100644 --- a/usr/src/lib/libnsl/rpc/authsys_prot.c +++ b/usr/src/lib/libnsl/rpc/authsys_prot.c @@ -21,6 +21,10 @@ */ /* + * Copyright 2014 Nexenta Systems, Inc. All rights reserved. + */ + +/* * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -33,8 +37,6 @@ * California. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * XDR for UNIX style authentication parameters for RPC */ @@ -45,9 +47,6 @@ #include <rpc/auth.h> #include <rpc/auth_sys.h> -extern bool_t xdr_uid_t(XDR *, uid_t *); -extern bool_t xdr_gid_t(XDR *, gid_t *); - /* * XDR for unix authentication parameters. */ diff --git a/usr/src/uts/common/fs/nfs/nfs_auth_xdr.c b/usr/src/uts/common/fs/nfs/nfs_auth_xdr.c index d9981bafd7..8fcec0e7b7 100644 --- a/usr/src/uts/common/fs/nfs/nfs_auth_xdr.c +++ b/usr/src/uts/common/fs/nfs/nfs_auth_xdr.c @@ -18,15 +18,18 @@ * * CDDL HEADER END */ + /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright 2014 Nexenta Systems, Inc. All rights reserved. */ + /* - * Copyright 2014 Nexenta Systems, Inc. All rights reserved. + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. */ #include <nfs/auth.h> +#include <rpc/auth_sys.h> bool_t xdr_varg(XDR *xdrs, varg_t *vap) @@ -63,9 +66,9 @@ xdr_nfsauth_arg(XDR *xdrs, nfsauth_arg_t *argp) return (FALSE); if (!xdr_int(xdrs, &argp->areq.req_flavor)) return (FALSE); - if (!xdr_u_int(xdrs, &argp->areq.req_clnt_uid)) + if (!xdr_uid_t(xdrs, &argp->areq.req_clnt_uid)) return (FALSE); - if (!xdr_u_int(xdrs, &argp->areq.req_clnt_gid)) + if (!xdr_gid_t(xdrs, &argp->areq.req_clnt_gid)) return (FALSE); return (TRUE); } @@ -77,9 +80,9 @@ xdr_nfsauth_res(XDR *xdrs, nfsauth_res_t *argp) return (FALSE); if (!xdr_int(xdrs, &argp->ares.auth_perm)) return (FALSE); - if (!xdr_u_int(xdrs, &argp->ares.auth_srv_uid)) + if (!xdr_uid_t(xdrs, &argp->ares.auth_srv_uid)) return (FALSE); - if (!xdr_u_int(xdrs, &argp->ares.auth_srv_gid)) + if (!xdr_gid_t(xdrs, &argp->ares.auth_srv_gid)) return (FALSE); return (TRUE); } diff --git a/usr/src/uts/common/rpc/auth_sys.h b/usr/src/uts/common/rpc/auth_sys.h index 214c781bac..157546842b 100644 --- a/usr/src/uts/common/rpc/auth_sys.h +++ b/usr/src/uts/common/rpc/auth_sys.h @@ -18,6 +18,11 @@ * * CDDL HEADER END */ + +/* + * Copyright 2014 Nexenta Systems, Inc. All rights reserved. + */ + /* * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. @@ -100,8 +105,8 @@ struct short_hand_verf { struct svc_req; -extern bool_t xdr_gid_t(XDR *, gid_t *ip); -extern bool_t xdr_uid_t(XDR *, gid_t *ip); +extern bool_t xdr_gid_t(XDR *, gid_t *); +extern bool_t xdr_uid_t(XDR *, uid_t *); #ifdef _KERNEL extern bool_t xdr_authkern(XDR *); diff --git a/usr/src/uts/common/sys/fs/autofs.h b/usr/src/uts/common/sys/fs/autofs.h index 7435f90e17..33aaeac2f1 100644 --- a/usr/src/uts/common/sys/fs/autofs.h +++ b/usr/src/uts/common/sys/fs/autofs.h @@ -18,7 +18,9 @@ * * CDDL HEADER END */ + /* + * Copyright 2014 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved. */ @@ -285,10 +287,6 @@ extern int unmount_subtree(fnnode_t *, boolean_t); extern void unmount_tree(struct autofs_globals *, boolean_t); extern void autofs_free_globals(struct autofs_globals *); extern void autofs_shutdown_zone(struct autofs_globals *); -/* - * external routines not defined in any header file - */ -extern bool_t xdr_uid_t(XDR *, uid_t *); #endif /* _KERNEL */ |