diff options
author | 2011-04-25 20:10:10 +0000 | |
---|---|---|
committer | 2011-04-25 20:10:10 +0000 | |
commit | cabdb1ca34f4f79237effeb577ccac33c56e227a (patch) | |
tree | b68966fde927ecf44b2c2eb21f3f40684581f27f /lib/libc/gen/sysconf.c | |
parent | sync (diff) | |
download | wireguard-openbsd-cabdb1ca34f4f79237effeb577ccac33c56e227a.tar.xz wireguard-openbsd-cabdb1ca34f4f79237effeb577ccac33c56e227a.zip |
Teach sysconf(_SC_GETGR_R_SIZE_MAX) the correct size of a buffer for the
reentrant getgrent functions (getgrgid_r, getgrnam_r).
seems reasonable to millert@, ok deraadt@
Diffstat (limited to 'lib/libc/gen/sysconf.c')
-rw-r--r-- | lib/libc/gen/sysconf.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libc/gen/sysconf.c b/lib/libc/gen/sysconf.c index ce4f89a0b44..a7cefaa689b 100644 --- a/lib/libc/gen/sysconf.c +++ b/lib/libc/gen/sysconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sysconf.c,v 1.12 2010/10/28 02:06:00 deraadt Exp $ */ +/* $OpenBSD: sysconf.c,v 1.13 2011/04/25 20:10:10 sthen Exp $ */ /*- * Copyright (c) 1993 * The Regents of the University of California. All rights reserved. @@ -39,6 +39,7 @@ #include <sys/vmmeter.h> #include <errno.h> +#include <grp.h> #include <pwd.h> #include <unistd.h> @@ -119,7 +120,7 @@ sysconf(int name) return (_POSIX_THREAD_SAFE_FUNCTIONS); case _SC_GETGR_R_SIZE_MAX: - return (_PW_BUF_LEN); + return (_GR_BUF_LEN); case _SC_GETPW_R_SIZE_MAX: return (_PW_BUF_LEN); |