From: Steve Dickson Date: Wed, 28 Jan 2009 17:44:46 +0000 (-0500) Subject: Converted all uid and gid variables of the type uid_t and gid_t. X-Git-Tag: 0.0.10~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=951a1b9b0195cbe58e1e62142e84d7ec4658943f;p=libtirpc Converted all uid and gid variables of the type uid_t and gid_t. Signed-off-by: Steve Dickson --- diff --git a/src/auth_unix.c b/src/auth_unix.c index c2727e0..04ee5dd 100644 --- a/src/auth_unix.c +++ b/src/auth_unix.c @@ -84,10 +84,10 @@ struct audata { AUTH * authunix_create(machname, uid, gid, len, aup_gids) char *machname; - int uid; - int gid; + uid_t uid; + gid_t gid; int len; - int *aup_gids; + gid_t *aup_gids; { struct authunix_parms aup; char mymem[MAX_AUTH_BYTES]; @@ -189,8 +189,7 @@ authunix_create_default() if ((len = getgroups(NGRPS, gids)) < 0) abort(); /* XXX: interface problem; those should all have been unsigned */ - return (authunix_create(machname, (int)uid, (int)gid, len, - (int *)gids)); + return (authunix_create(machname, uid, gid, len, gids)); } /* diff --git a/src/authunix_prot.c b/src/authunix_prot.c index 01c1711..79f2fb6 100644 --- a/src/authunix_prot.c +++ b/src/authunix_prot.c @@ -57,8 +57,8 @@ xdr_authunix_parms(xdrs, p) if (xdr_u_long(xdrs, &(p->aup_time)) && xdr_string(xdrs, &(p->aup_machname), MAX_MACHINE_NAME) - && xdr_int(xdrs, &(p->aup_uid)) - && xdr_int(xdrs, &(p->aup_gid)) + && xdr_u_int(xdrs, &(p->aup_uid)) + && xdr_u_int(xdrs, &(p->aup_gid)) && xdr_array(xdrs, (caddr_t *)&(p->aup_gids), &(p->aup_len), NGRPS, sizeof(int), (xdrproc_t)xdr_int) ) { return (TRUE); diff --git a/src/svc_auth_unix.c b/src/svc_auth_unix.c index 77a1272..7a7eeaa 100644 --- a/src/svc_auth_unix.c +++ b/src/svc_auth_unix.c @@ -59,7 +59,7 @@ _svcauth_unix(rqst, msg) struct area { struct authunix_parms area_aup; char area_machname[MAX_MACHINE_NAME+1]; - int area_gids[NGRPS]; + gid_t area_gids[NGRPS]; } *area; u_int auth_len; size_t str_len, gid_len; diff --git a/tirpc/rpc/auth.h b/tirpc/rpc/auth.h index c6c418c..532a8cb 100644 --- a/tirpc/rpc/auth.h +++ b/tirpc/rpc/auth.h @@ -279,8 +279,7 @@ int authany_wrap(void), authany_unwrap(void); * int *aup_gids; */ __BEGIN_DECLS -extern AUTH *authunix_create(char *, int, int, int, - int *); +extern AUTH *authunix_create(char *, uid_t, uid_t, int, uid_t *); extern AUTH *authunix_create_default(void); /* takes no parameters */ extern AUTH *authnone_create(void); /* takes no parameters */ __END_DECLS diff --git a/tirpc/rpc/auth_unix.h b/tirpc/rpc/auth_unix.h index 41f0f44..0839fb3 100644 --- a/tirpc/rpc/auth_unix.h +++ b/tirpc/rpc/auth_unix.h @@ -60,10 +60,10 @@ struct authunix_parms { u_long aup_time; char *aup_machname; - int aup_uid; - int aup_gid; + uid_t aup_uid; + gid_t aup_gid; u_int aup_len; - int *aup_gids; + gid_t *aup_gids; }; #define authsys_parms authunix_parms