From b3ccd7786f77efef5e10f7b331ee22f940940171 Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Thu, 5 Jul 2001 16:15:42 +0000 Subject: * configure.in: Add AC_TYPE_GETGROUPS to determine argument to getgroups. * auth_unix.c (authunix_create_default): Use GETGROUPS_T array in call to getgroups. Copy into array of int for call to authunix_create. Note: If auth_unix protection ever used with this code, we will need to cleanup assumptions in int being 32 bits in OTW transfer of gids. * clnt_tcp.c, svc_tcp.c: Change writetcp and readtcp to take char * as first argument to be compatible with xdrrec_create. * xdr.c (xdr_opaque): Cast argument in call to XDR_GETBYTES. * svc.h: Add prototype for gssrpc_svcudp_enablecache. * svc_auth_gssapi.c (_gssrpc_svcauth_gssapi): Change _svcauth_gssapi to _gssrpc_svcauth_gssapi for consistancy. * svc_auth.c: Move prototypes for _gssrpc_svcauth_{unix, null, short, gssapi} to: * svc_auth.h: here. * svc_auth_unix.c: Update _gssrpc_svcauth_short and _gssrpc_svcauth_unix to match prototype. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13563 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/rpc/auth_unix.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/lib/rpc/auth_unix.c') diff --git a/src/lib/rpc/auth_unix.c b/src/lib/rpc/auth_unix.c index 696bb1f1e0..9411fdc8a3 100644 --- a/src/lib/rpc/auth_unix.c +++ b/src/lib/rpc/auth_unix.c @@ -176,7 +176,8 @@ authunix_create_default() char machname[MAX_MACHINE_NAME + 1]; register int uid; register int gid; - int gids[NGRPS]; + GETGROUPS_T gids[NGRPS]; + int igids[NGRPS], i; if (gethostname(machname, MAX_MACHINE_NAME) == -1) abort(); @@ -185,7 +186,10 @@ authunix_create_default() gid = getegid(); if ((len = getgroups(NGRPS, gids)) < 0) abort(); - return (authunix_create(machname, uid, gid, len, gids)); + for(i = 0; i < NGRPS; i++) { + igids[i] = gids[i]; + } + return (authunix_create(machname, uid, gid, len, igids)); } /* -- cgit