cvs: php4 /main main.c

From: Date: Thu, 13 Jul 2000 17:52:01 +0000
Subject: cvs: php4 /main main.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-734@lists.php.net to get a copy of this message
zeev Thu Jul 13 10:52:01 2000 EDT Modified files: /php4/main main.c Log: Fix disable_functions feature Index: php4/main/main.c diff -u php4/main/main.c:1.281 php4/main/main.c:1.282 --- php4/main/main.c:1.281 Wed Jul 12 04:59:09 2000 +++ php4/main/main.c Thu Jul 13 10:52:00 2000 @@ -19,7 +19,7 @@ */ -/* $Id: main.c,v 1.281 2000/07/12 11:59:09 thies Exp $ */ +/* $Id: main.c,v 1.282 2000/07/13 17:52:00 zeev Exp $ */ #include <stdio.h> @@ -144,19 +144,18 @@ } -static PHP_INI_MH(OnDisableFunctions) +static void php_disable_functions() { char *func; - char *new_value_dup = zend_strndup(new_value, new_value_length); /* This is an intentional leak, - * it's not a big deal as it's process-wide - */ + char *new_value_dup = strdup(INI_STR("disable_functions")); /* This is an intentional leak, + * it's not a big deal as it's process-wide + */ func = strtok(new_value_dup, ", "); while (func) { zend_disable_function(func, strlen(func)); func = strtok(NULL, ", "); } - return SUCCESS; } @@ -257,7 +256,7 @@ PHP_INI_ENTRY("sendmail_from", NULL, PHP_INI_ALL, NULL) PHP_INI_ENTRY("sendmail_path", DEFAULT_SENDMAIL_PATH, PHP_INI_SYSTEM, NULL) - PHP_INI_ENTRY("disable_functions", "", PHP_INI_SYSTEM, OnDisableFunctions) + PHP_INI_ENTRY("disable_functions", "", PHP_INI_SYSTEM, NULL) PHP_INI_END() @@ -876,6 +875,7 @@ php_printf("Unable to start builtin modules\n"); return FAILURE; } + php_disable_functions(); module_initialized = 1; sapi_deactivate(SLS_C); return SUCCESS;

« previous php.cvs (#734) next »