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/getgrent.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/getgrent.c')
-rw-r--r-- | lib/libc/gen/getgrent.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/gen/getgrent.c b/lib/libc/gen/getgrent.c index 0acf4e8183c..080ea55cc8b 100644 --- a/lib/libc/gen/getgrent.c +++ b/lib/libc/gen/getgrent.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getgrent.c,v 1.36 2009/12/19 22:41:39 schwarze Exp $ */ +/* $OpenBSD: getgrent.c,v 1.37 2011/04/25 20:10:10 sthen Exp $ */ /* * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. @@ -53,7 +53,7 @@ static struct group_storage { #define MAXLINELENGTH 1024 char line[MAXLINELENGTH]; } gr_storage; -#define GETGR_R_SIZE_MAX (1024+200*sizeof(char*)) +#define GETGR_R_SIZE_MAX _GR_BUF_LEN /* File pointers are locked with the 'gr' mutex */ _THREAD_PRIVATE_KEY(gr); |