diff options
-rw-r--r-- | include/grp.h | 3 | ||||
-rw-r--r-- | lib/libc/gen/getgrent.c | 4 | ||||
-rw-r--r-- | lib/libc/gen/sysconf.c | 5 |
3 files changed, 7 insertions, 5 deletions
diff --git a/include/grp.h b/include/grp.h index f4012eb6582..f4aa1539655 100644 --- a/include/grp.h +++ b/include/grp.h @@ -1,4 +1,4 @@ -/* $OpenBSD: grp.h,v 1.8 2005/12/13 00:35:22 millert Exp $ */ +/* $OpenBSD: grp.h,v 1.9 2011/04/25 20:10:10 sthen Exp $ */ /* $NetBSD: grp.h,v 1.7 1995/04/29 05:30:40 cgd Exp $ */ /*- @@ -45,6 +45,7 @@ #if __BSD_VISIBLE #define _PATH_GROUP "/etc/group" +#define _GR_BUF_LEN (1024+200*sizeof(char*)) #endif struct group { 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); 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); |