FreeBSD Bugzilla – Attachment 218596 Details for
Bug 250185
lang/php81: Fail posix_getpwnam, posix_getpwuid, ...
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
php_FreeBSD_sysconf
php_FreeBSD_sysconf.patch (text/plain), 3.17 KB, created by
Andrey Linkevich
on 2020-10-07 17:13:34 UTC
(
hide
)
Description:
php_FreeBSD_sysconf
Filename:
MIME Type:
Creator:
Andrey Linkevich
Created:
2020-10-07 17:13:34 UTC
Size:
3.17 KB
patch
obsolete
>diff -ur php-7.4.10.orig/ext/posix/posix.c php-7.4.10/ext/posix/posix.c >--- php-7.4.10.orig/ext/posix/posix.c 2020-09-01 16:58:08.000000000 +0300 >+++ php-7.4.10/ext/posix/posix.c 2020-10-07 17:26:38.000000000 +0300 >@@ -1085,6 +1085,9 @@ > > #if defined(ZTS) && defined(HAVE_GETGRNAM_R) && defined(_SC_GETGR_R_SIZE_MAX) > buflen = sysconf(_SC_GETGR_R_SIZE_MAX); >+#if defined(__FreeBSD__) && defined(_SC_PAGESIZE) >+ if (buflen < 1) buflen = sysconf(_SC_PAGESIZE); >+#endif > if (buflen < 1) { > RETURN_FALSE; > } >@@ -1142,6 +1145,9 @@ > #if defined(ZTS) && defined(HAVE_GETGRGID_R) && defined(_SC_GETGR_R_SIZE_MAX) > > grbuflen = sysconf(_SC_GETGR_R_SIZE_MAX); >+#if defined(__FreeBSD__) && defined(_SC_PAGESIZE) >+ if (grbuflen < 1) grbuflen = sysconf(_SC_PAGESIZE); >+#endif > if (grbuflen < 1) { > RETURN_FALSE; > } >@@ -1217,6 +1223,9 @@ > > #if defined(ZTS) && defined(_SC_GETPW_R_SIZE_MAX) && defined(HAVE_GETPWNAM_R) > buflen = sysconf(_SC_GETPW_R_SIZE_MAX); >+#if defined(__FreeBSD__) && defined(_SC_PAGESIZE) >+ if (buflen < 1) buflen = sysconf(_SC_PAGESIZE); >+#endif > if (buflen < 1) { > RETURN_FALSE; > } >@@ -1273,6 +1282,9 @@ > > #if defined(ZTS) && defined(_SC_GETPW_R_SIZE_MAX) && defined(HAVE_GETPWUID_R) > pwbuflen = sysconf(_SC_GETPW_R_SIZE_MAX); >+#if defined(__FreeBSD__) && defined(_SC_PAGESIZE) >+ if (pwbuflen < 1) pwbuflen = sysconf(_SC_PAGESIZE); >+#endif > if (pwbuflen < 1) { > RETURN_FALSE; > } >diff -ur php-7.4.10.orig/ext/standard/filestat.c php-7.4.10/ext/standard/filestat.c >--- php-7.4.10.orig/ext/standard/filestat.c 2020-09-01 16:58:11.000000000 +0300 >+++ php-7.4.10/ext/standard/filestat.c 2020-10-07 17:27:39.000000000 +0300 >@@ -303,6 +303,9 @@ > struct group gr; > struct group *retgrptr; > long grbuflen = sysconf(_SC_GETGR_R_SIZE_MAX); >+#if defined(__FreeBSD__) && defined(_SC_PAGESIZE) >+ if (grbuflen < 1) grbuflen = sysconf(_SC_PAGESIZE); >+#endif > char *grbuf; > > if (grbuflen < 1) { >@@ -439,6 +442,9 @@ > struct passwd pw; > struct passwd *retpwptr = NULL; > long pwbuflen = sysconf(_SC_GETPW_R_SIZE_MAX); >+#if defined(__FreeBSD__) && defined(_SC_PAGESIZE) >+ if (pwbuflen < 1) pwbuflen = sysconf(_SC_PAGESIZE); >+#endif > char *pwbuf; > > if (pwbuflen < 1) { >diff -ur php-7.4.10.orig/main/fopen_wrappers.c php-7.4.10/main/fopen_wrappers.c >--- php-7.4.10.orig/main/fopen_wrappers.c 2020-09-01 16:58:08.000000000 +0300 >+++ php-7.4.10/main/fopen_wrappers.c 2020-10-07 17:06:20.000000000 +0300 >@@ -367,6 +367,9 @@ > #if defined(ZTS) && defined(HAVE_GETPWNAM_R) && defined(_SC_GETPW_R_SIZE_MAX) > struct passwd pwstruc; > long pwbuflen = sysconf(_SC_GETPW_R_SIZE_MAX); >+#if defined(__FreeBSD__) && defined(_SC_PAGESIZE) >+ if (pwbuflen < 1) pwbuflen = sysconf(_SC_PAGESIZE); >+#endif > char *pwbuf; > > if (pwbuflen < 1) { >diff -ur php-7.4.10.orig/main/main.c php-7.4.10/main/main.c >--- php-7.4.10.orig/main/main.c 2020-09-01 16:58:08.000000000 +0300 >+++ php-7.4.10/main/main.c 2020-10-07 17:06:16.000000000 +0300 >@@ -1487,6 +1487,9 @@ > struct passwd _pw; > struct passwd *retpwptr = NULL; > int pwbuflen = sysconf(_SC_GETPW_R_SIZE_MAX); >+#if defined(__FreeBSD__) && defined(_SC_PAGESIZE) >+ if (pwbuflen < 1) pwbuflen = sysconf(_SC_PAGESIZE); >+#endif > char *pwbuf; > > if (pwbuflen < 1) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 250185
: 218596