diff options
author | 2015-01-16 16:48:51 +0000 | |
---|---|---|
committer | 2015-01-16 16:48:51 +0000 | |
commit | aea60bee5e9bad0aab62f480f19c2fb34c068de4 (patch) | |
tree | 1e7befbc10e28796528939427d4fdbd94b60d9af /lib/libc/gen/initgroups.c | |
parent | More evil bootstrap code. #ifndef ALIGNBYTES #define ALIGNBYTES 3. (diff) | |
download | wireguard-openbsd-aea60bee5e9bad0aab62f480f19c2fb34c068de4.tar.xz wireguard-openbsd-aea60bee5e9bad0aab62f480f19c2fb34c068de4.zip |
Move to the <limits.h> universe.
review by millert, binary checking process with doug, concept with guenther
Diffstat (limited to 'lib/libc/gen/initgroups.c')
-rw-r--r-- | lib/libc/gen/initgroups.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/libc/gen/initgroups.c b/lib/libc/gen/initgroups.c index c7a717a1410..9d7727a9c2b 100644 --- a/lib/libc/gen/initgroups.c +++ b/lib/libc/gen/initgroups.c @@ -1,4 +1,4 @@ -/* $OpenBSD: initgroups.c,v 1.8 2005/08/08 08:05:34 espie Exp $ */ +/* $OpenBSD: initgroups.c,v 1.9 2015/01/16 16:48:51 deraadt Exp $ */ /* * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. @@ -28,19 +28,18 @@ * SUCH DAMAGE. */ -#include <sys/param.h> - #include <err.h> #include <stdio.h> #include <unistd.h> +#include <limits.h> int initgroups(const char *uname, gid_t agroup) { - gid_t groups[NGROUPS]; + gid_t groups[NGROUPS_MAX]; int ngroups; - ngroups = NGROUPS; + ngroups = NGROUPS_MAX; (void) getgrouplist(uname, agroup, groups, &ngroups); if (setgroups(ngroups, groups) < 0) return (-1); |