diff options
author | Joe Orton <jorton@apache.org> | 2007-04-26 16:13:33 +0000 |
---|---|---|
committer | Joe Orton <jorton@apache.org> | 2007-04-26 16:13:33 +0000 |
commit | 3e1192c7392e3f24e04b4103be6ed04166eca7bd (patch) | |
tree | ce9edbdb2cc2ceb71365fe08b151cc4226d2534d /user | |
parent | 9ac7311a2e77181baecd9e171d1a83c44d3cc9f2 (diff) | |
download | apr-3e1192c7392e3f24e04b4103be6ed04166eca7bd.tar.gz |
* user/unix/groupinfo.c (apr_gid_name_get, apr_gid_get): Use
GRBUF_SIZE for getgr*_r buffer size and bump to 8192 bytes.
PR: 41105
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@532789 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'user')
-rw-r--r-- | user/unix/groupinfo.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/user/unix/groupinfo.c b/user/unix/groupinfo.c index 89ae966b6..7967219f8 100644 --- a/user/unix/groupinfo.c +++ b/user/unix/groupinfo.c @@ -28,6 +28,8 @@ #include <unistd.h> /* for _POSIX_THREAD_SAFE_FUNCTIONS */ #endif +#define GRBUF_SIZE 8192 + APR_DECLARE(apr_status_t) apr_gid_name_get(char **groupname, apr_gid_t groupid, apr_pool_t *p) { @@ -35,7 +37,7 @@ APR_DECLARE(apr_status_t) apr_gid_name_get(char **groupname, apr_gid_t groupid, #if APR_HAS_THREADS && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && defined(HAVE_GETGRGID_R) struct group grp; - char grbuf[512]; + char grbuf[GRBUF_SIZE]; apr_status_t rv; /* See comment in getpwnam_safe on error handling. */ @@ -63,7 +65,7 @@ APR_DECLARE(apr_status_t) apr_gid_get(apr_gid_t *groupid, #if APR_HAS_THREADS && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && defined(HAVE_GETGRNAM_R) struct group grp; - char grbuf[512]; + char grbuf[GRBUF_SIZE]; apr_status_t rv; /* See comment in getpwnam_safe on error handling. */ |