diff options
author | Thorsten Lockert <tholo@cvs.openbsd.org> | 1996-12-14 06:49:48 +0000 |
---|---|---|
committer | Thorsten Lockert <tholo@cvs.openbsd.org> | 1996-12-14 06:49:48 +0000 |
commit | 4710cee5ae9d061cf473bea056acdd4b8c8ce7c9 (patch) | |
tree | 34d25eb6b04d160d108a4b861891d8a86ad09b88 /lib/libc/rpc/auth_unix.c | |
parent | a397beefe4d81184307c7db3393b718a7ba2ab0c (diff) |
Clean up lint and compile warnings
Diffstat (limited to 'lib/libc/rpc/auth_unix.c')
-rw-r--r-- | lib/libc/rpc/auth_unix.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/libc/rpc/auth_unix.c b/lib/libc/rpc/auth_unix.c index 47273617f8a..56c4e2eb204 100644 --- a/lib/libc/rpc/auth_unix.c +++ b/lib/libc/rpc/auth_unix.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: auth_unix.c,v 1.6 1996/11/14 05:45:16 etheisen Exp $"; +static char *rcsid = "$OpenBSD: auth_unix.c,v 1.7 1996/12/14 06:49:40 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -170,11 +170,12 @@ authunix_create(machname, uid, gid, len, aup_gids) AUTH * authunix_create_default() { - register int len; + register int len, i; char machname[MAX_MACHINE_NAME + 1]; register uid_t uid; register gid_t gid; gid_t gids[NGRPS]; + int gids2[NGRPS]; if (gethostname(machname, MAX_MACHINE_NAME) == -1) abort(); @@ -183,7 +184,9 @@ authunix_create_default() gid = getegid(); if ((len = getgroups(NGRPS, gids)) < 0) abort(); - return (authunix_create(machname, uid, gid, len, gids)); + for (i = 0; i < len; i++) + gids2[i] = gids[i]; + return (authunix_create(machname, uid, gid, len, gids2)); } /* |