cvs: php-src /ext/standard filestat.c
| From: | Andrei Zmievski | Date: | Fri, 01 Dec 2006 18:42:24 +0000 |
| Subject: | cvs: php-src /ext/standard filestat.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-41819@lists.php.net to get a copy of this message | ||
andrei Fri Dec 1 18:42:24 2006 UTC
Modified files:
/php-src/ext/standard filestat.c
Log:
Fix group macro access.
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/filestat.c?r1=1.152&r2=1.153&diff_format=u
Index: php-src/ext/standard/filestat.c
diff -u php-src/ext/standard/filestat.c:1.152 php-src/ext/standard/filestat.c:1.153
--- php-src/ext/standard/filestat.c:1.152 Wed Nov 29 23:46:25 2006
+++ php-src/ext/standard/filestat.c Fri Dec 1 18:42:24 2006
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: filestat.c,v 1.152 2006/11/29 23:46:25 iliaa Exp $ */
+/* $Id: filestat.c,v 1.153 2006/12/01 18:42:24 andrei Exp $ */
#include "php.h"
#include "fopen_wrappers.h"
@@ -424,8 +424,8 @@
char *grbuf = emalloc(grbuflen);
convert_to_string(group);
- if (getgrnam_r(Z_STRVAL_PP(group), &gr, grbuf, grbuflen, &retgrptr) != 0 || retgrptr ==
NULL) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find gid for %s",
Z_STRVAL_PP(group));
+ if (getgrnam_r(Z_STRVAL_P(group), &gr, grbuf, grbuflen, &retgrptr) != 0 || retgrptr ==
NULL) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find gid for %s",
Z_STRVAL_P(group));
efree(grbuf);
RETURN_FALSE;
}
@@ -528,8 +528,8 @@
char *pwbuf = emalloc(pwbuflen);
convert_to_string(user);
- if (getpwnam_r(Z_STRVAL_PP(user), &pw, pwbuf, pwbuflen, &retpwptr) != 0 || retpwptr ==
NULL) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find uid for %s",
Z_STRVAL_PP(user));
+ if (getpwnam_r(Z_STRVAL_P(user), &pw, pwbuf, pwbuflen, &retpwptr) != 0 || retpwptr ==
NULL) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find uid for %s",
Z_STRVAL_P(user));
efree(pwbuf);
RETURN_FALSE;
}