diff options
author | 1996-12-14 06:49:36 +0000 | |
---|---|---|
committer | 1996-12-14 06:49:36 +0000 | |
commit | 198c6cf51167a9bc60fc9a12c29bdced0df8c37a (patch) | |
tree | 2fefa1099cd0f864190c186748307f8d10bba747 /lib/libc/rpc/auth_unix.c | |
parent | Now does not display responses to other peoples stuff, like UDP packets (diff) | |
download | wireguard-openbsd-198c6cf51167a9bc60fc9a12c29bdced0df8c37a.tar.xz wireguard-openbsd-198c6cf51167a9bc60fc9a12c29bdced0df8c37a.zip |
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)); } /* |