apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject svn commit: r532789 - /apr/apr/trunk/user/unix/groupinfo.c
Date Thu, 26 Apr 2007 16:13:34 GMT
Author: jorton
Date: Thu Apr 26 09:13:33 2007
New Revision: 532789

URL: http://svn.apache.org/viewvc?view=rev&rev=532789
Log:
* 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

Modified:
    apr/apr/trunk/user/unix/groupinfo.c

Modified: apr/apr/trunk/user/unix/groupinfo.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/user/unix/groupinfo.c?view=diff&rev=532789&r1=532788&r2=532789
==============================================================================
--- apr/apr/trunk/user/unix/groupinfo.c (original)
+++ apr/apr/trunk/user/unix/groupinfo.c Thu Apr 26 09:13:33 2007
@@ -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 @@
 
 #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 @@
 
 #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. */



Mime
View raw message