From 6c0711e00e73a5db966b413b61027a39d8519f5e Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Wed, 28 Jan 2009 17:58:07 +0000 Subject: [PATCH] Converted all uids and uids to type uid_t and gid_t (sf 2446314) --- libtirpc-0.1.10-uuid_t.patch | 96 ++++++++++++++++++++++++++++++++++++ libtirpc.spec | 7 ++- 2 files changed, 102 insertions(+), 1 deletion(-) create mode 100644 libtirpc-0.1.10-uuid_t.patch diff --git a/libtirpc-0.1.10-uuid_t.patch b/libtirpc-0.1.10-uuid_t.patch new file mode 100644 index 0000000..08c0ede --- /dev/null +++ b/libtirpc-0.1.10-uuid_t.patch @@ -0,0 +1,96 @@ +commit 951a1b9b0195cbe58e1e62142e84d7ec4658943f +Author: Steve Dickson +Date: Wed Jan 28 12:44:46 2009 -0500 + + 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 diff --git a/libtirpc.spec b/libtirpc.spec index 0495feb..3554be6 100644 --- a/libtirpc.spec +++ b/libtirpc.spec @@ -1,6 +1,6 @@ Name: libtirpc Version: 0.1.10 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Transport Independent RPC Library Group: System Environment/Libraries License: SISSL @@ -35,6 +35,7 @@ Patch02: libtirpc-0.1.10-errmess-unlock.patch Patch03: libtirpc-0.1.10-C++declares.patch Patch04: libtirpc-0.1.10-svcreq-compat.patch Patch05: libtirpc-0.1.10-warnings.patch +Patch06: libtirpc-0.1.10-uuid_t.patch Patch100: libtirpc-0.1.7-compile.patch @@ -50,6 +51,7 @@ developing programs which use the tirpc library. %patch03 -p1 %patch04 -p1 %patch05 -p1 +%patch06 -p1 %patch100 -p1 @@ -148,6 +150,9 @@ rm -rf %{buildroot} %{_mandir}/*/* %changelog +* Wed Jan 28 2009 Steve Dickson 0.1.10-4 +- Converted all uids and uids to type uid_t and gid_t (sf 2446314) + * Wed Jan 28 2009 Steve Dickson 0.1.10-3 - backwards compatibility: fix order of fields in TI-RPC's svc_req (bz 481388)