apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject svn commit: r571744 - in /apr/apr/branches/1.2.x/user/unix: groupinfo.c userinfo.c
Date Sat, 01 Sep 2007 08:19:02 GMT
Author: bojan
Date: Sat Sep  1 01:19:01 2007
New Revision: 571744

URL: http://svn.apache.org/viewvc?rev=571744&view=rev
Log:
Backport r532789 and r390410 from the trunk
Use GRBUF_SIZE for getgr*_r buffer size and bump to 8192 bytes
Bump to 2048 to avoid issues with LDAP-backed lookups on FreeBSD

Modified:
    apr/apr/branches/1.2.x/user/unix/groupinfo.c
    apr/apr/branches/1.2.x/user/unix/userinfo.c

Modified: apr/apr/branches/1.2.x/user/unix/groupinfo.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.2.x/user/unix/groupinfo.c?rev=571744&r1=571743&r2=571744&view=diff
==============================================================================
--- apr/apr/branches/1.2.x/user/unix/groupinfo.c (original)
+++ apr/apr/branches/1.2.x/user/unix/groupinfo.c Sat Sep  1 01:19:01 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. */

Modified: apr/apr/branches/1.2.x/user/unix/userinfo.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.2.x/user/unix/userinfo.c?rev=571744&r1=571743&r2=571744&view=diff
==============================================================================
--- apr/apr/branches/1.2.x/user/unix/userinfo.c (original)
+++ apr/apr/branches/1.2.x/user/unix/userinfo.c Sat Sep  1 01:19:01 2007
@@ -30,7 +30,7 @@
 #define APR_WANT_MEMFUNC
 #include "apr_want.h"
 
-#define PWBUF_SIZE 512
+#define PWBUF_SIZE 2048
 
 static apr_status_t getpwnam_safe(const char *username,
                                   struct passwd *pw,



Mime
View raw message