cvs: php-src(PHP_5_2) / NEWS /ext/posix config.m4 php_posix.h posix.c

From: Date: Mon, 19 Jun 2006 02:19:13 +0000
Subject: cvs: php-src(PHP_5_2) / NEWS /ext/posix config.m4 php_posix.h posix.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-38785@lists.php.net to get a copy of this message
iliaa Mon Jun 19 02:19:13 2006 UTC Modified files: (Branch: PHP_5_2) /php-src NEWS /php-src/ext/posix config.m4 php_posix.h posix.c Log: Added posix_initgroups() function. http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2027.2.547.2.88&r2=1.2027.2.547.2.89&diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.88 php-src/NEWS:1.2027.2.547.2.89 --- php-src/NEWS:1.2027.2.547.2.88 Fri Jun 16 14:09:00 2006 +++ php-src/NEWS Mon Jun 19 02:19:13 2006 @@ -43,6 +43,7 @@ . Added readInnerXML(), readOuterXML(), readString(), setSchema(). (2.6.20+) . Changed to passing libxml options when loading reader. +- Added posix_initgroups() function. (Ilia) - Added allow_url_include ini directive to complement allow_url_fopen. (Rasmus) - Added automatic module globals management. (Dmitry) - Added RFC2397 (data: stream) support. (Marcus) http://cvs.php.net/viewcvs.cgi/php-src/ext/posix/config.m4?r1=1.12&r2=1.12.4.1&diff_format=u Index: php-src/ext/posix/config.m4 diff -u php-src/ext/posix/config.m4:1.12 php-src/ext/posix/config.m4:1.12.4.1 --- php-src/ext/posix/config.m4:1.12 Thu Jun 30 13:39:42 2005 +++ php-src/ext/posix/config.m4 Mon Jun 19 02:19:13 2006 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.12 2005/06/30 13:39:42 sniper Exp $ +dnl $Id: config.m4,v 1.12.4.1 2006/06/19 02:19:13 iliaa Exp $ dnl PHP_ARG_ENABLE(posix,whether to enable POSIX-like functions, @@ -11,5 +11,5 @@ AC_CHECK_HEADERS(sys/mkdev.h) - AC_CHECK_FUNCS(seteuid setegid setsid getsid setpgid getpgid ctermid mkfifo mknod getrlimit getlogin getgroups makedev) + AC_CHECK_FUNCS(seteuid setegid setsid getsid setpgid getpgid ctermid mkfifo mknod getrlimit getlogin getgroups makedev initgroups) fi http://cvs.php.net/viewcvs.cgi/php-src/ext/posix/php_posix.h?r1=1.18.2.1&r2=1.18.2.1.2.1&diff_format=u Index: php-src/ext/posix/php_posix.h diff -u php-src/ext/posix/php_posix.h:1.18.2.1 php-src/ext/posix/php_posix.h:1.18.2.1.2.1 --- php-src/ext/posix/php_posix.h:1.18.2.1 Sun Jan 1 12:50:12 2006 +++ php-src/ext/posix/php_posix.h Mon Jun 19 02:19:13 2006 @@ -17,7 +17,7 @@ */ -/* $Id: php_posix.h,v 1.18.2.1 2006/01/01 12:50:12 sniper Exp $ */ +/* $Id: php_posix.h,v 1.18.2.1.2.1 2006/06/19 02:19:13 iliaa Exp $ */ #ifndef PHP_POSIX_H #define PHP_POSIX_H @@ -110,6 +110,10 @@ PHP_FUNCTION(posix_getrlimit); #endif +#ifdef HAVE_INITGROUPS +PHP_FUNCTION(posix_initgroups); +#endif + PHP_FUNCTION(posix_get_last_error); PHP_FUNCTION(posix_strerror); http://cvs.php.net/viewcvs.cgi/php-src/ext/posix/posix.c?r1=1.70.2.3.2.1&r2=1.70.2.3.2.2&diff_format=u Index: php-src/ext/posix/posix.c diff -u php-src/ext/posix/posix.c:1.70.2.3.2.1 php-src/ext/posix/posix.c:1.70.2.3.2.2 --- php-src/ext/posix/posix.c:1.70.2.3.2.1 Thu Jun 15 18:33:08 2006 +++ php-src/ext/posix/posix.c Mon Jun 19 02:19:13 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: posix.c,v 1.70.2.3.2.1 2006/06/15 18:33:08 dmitry Exp $ */ +/* $Id: posix.c,v 1.70.2.3.2.2 2006/06/19 02:19:13 iliaa Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -134,6 +134,9 @@ PHP_FE(posix_get_last_error, NULL) PHP_FALIAS(posix_errno, posix_get_last_error, NULL) PHP_FE(posix_strerror, NULL) +#ifdef HAVE_INITGROUPS + PHP_FE(posix_initgroups, NULL) +#endif {NULL, NULL, NULL} }; @@ -144,7 +147,7 @@ static PHP_MINFO_FUNCTION(posix) { php_info_print_table_start(); - php_info_print_table_row(2, "Revision", "$Revision: 1.70.2.3.2.1 $"); + php_info_print_table_row(2, "Revision", "$Revision: 1.70.2.3.2.2 $"); php_info_print_table_end(); } /* }}} */ @@ -1056,6 +1059,22 @@ #endif +/* {{{ proto bool initgroups(string name, int base_group_id) + Calculate the group access list for the user specified in name. */ +PHP_FUNCTION(posix_initgroups) +{ + long basegid; + char *name; + int name_len; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sl", &name, &name_len, &basegid) == FAILURE) { + RETURN_FALSE; + } + + RETURN_BOOL(!initgroups((const char *)name, basegid)); +} +/* }}} */ + /* * Local variables: * tab-width: 4

« previous php.cvs (#38785) next »