cvs: phpdoc-zh /features safe-mode.xml
| From: | Dallas Thunder | Date: | Mon, 30 Sep 2002 04:23:35 +0000 |
| Subject: | cvs: phpdoc-zh /features safe-mode.xml | ||
| Groups: | php.doc.zh | ||
| Request: | Send a blank email to doc-zh+get-705@lists.php.net to get a copy of this message | ||
dallas Mon Sep 30 00:23:35 2002 EDT
Modified files:
/phpdoc-zh/features safe-mode.xml
Log:
Update with EN ver.
Index: phpdoc-zh/features/safe-mode.xml diff -u phpdoc-zh/features/safe-mode.xml:1.6 phpdoc-zh/features/safe-mode.xml:1.7 --- phpdoc-zh/features/safe-mode.xml:1.6 Thu Sep 26 05:11:26 2002 +++ phpdoc-zh/features/safe-mode.xml Mon Sep 30 00:23:35 2002 @@ -1,78 +1,224 @@ <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.4 $ --> <!-- $Author: gregory $ --> -<!-- EN-Revision: 1.25 Maintainer: thomaslio Status: ready --> +<!-- EN-Revision: 1.26 Maintainer: thomaslio Status: ready --> <!-- CREDITS: Gregory --> - <chapter id="features.safe-mode"> - <title>°²È«Ä£Ê½</title> +<!-- CREDITS: dallas --> +<chapter id="features.safe-mode"> + <title>°²È«Ä£Ê½</title> - <para> - PHP µÄ°²È«Ä£Ê½ÊÇΪÁËÊÔͼ½â¾ö¹²Ïí·þÎñÆ÷£¨shared-server£©°²È«ÎÊÌâ¶øÉèÁ¢µÄ¡£ÔڽṹÉÏ£¬ÊÔͼÔÚ PHP ²ãÉϽâ¾öÕâ¸öÎÊÌâÊDz»ºÏÀíµÄ£¬µ«ÐÞ¸Ä WEB ·þÎñÆ÷²ãºÍ²Ù×÷ϵͳ²ãÏԵ÷dz£²»ÏÖʵ¡£Òò´ËÐí¶àÈË£¬ÌرðÊÇ ISP£¬Ä¿Ç°Ê¹Óð²È«Ä£Ê½¡£ - </para> + <para> + PHP µÄ°²È«Ä£Ê½ÊÇΪÁËÊÔͼ½â¾ö¹²Ïí·þÎñÆ÷£¨shared-server£©°²È«ÎÊÌâ¶øÉèÁ¢µÄ¡£ÔڽṹÉÏ£¬ÊÔͼÔÚ PHP ²ãÉϽâ¾öÕâ¸öÎÊÌâÊDz»ºÏÀíµÄ£¬µ«ÐÞ¸Ä WEB ·þÎñÆ÷²ãºÍ²Ù×÷ϵͳ²ãÏԵ÷dz£²»ÏÖʵ¡£Òò´ËÐí¶àÈË£¬ÌرðÊÇ ISP£¬Ä¿Ç°Ê¹Óð²È«Ä£Ê½¡£ + </para> + + <sect1 id="ini.sect.safe-mode"> + <title>±£°²´ëÊ©ºÍ°²È«Ä£Ê½</title> <para> <table> - <title>¿ØÖư²È«Ä£Ê½µÄÉèÖÃÑ¡ÏîÓУº</title> - <tgroup cols="2"> + <title>±£°²´ëÊ©ºÍ°²È«Ä£Ê½ÅäÖÃÖ¸Áî</title> + <tgroup cols="3"> <thead> <row> - <entry>ÉèÖÃÑ¡Ïî</entry> + <entry>Ãû³Æ</entry> <entry>ĬÈÏÖµ</entry> + <entry>×÷Ó÷¶Î§</entry> </row> </thead> <tbody> - <row> - <entry> - <link linkend="ini.safe-mode">safe_mode</link> - </entry> - <entry><literal>Off</literal></entry> - </row> - <row> - <entry> - <link linkend="ini.safe-mode-gid">safe_mode_gid</link> - </entry> - <entry><literal>0</literal></entry> - </row> - <row> - <entry> - <link linkend="ini.safe-mode-include-dir">safe_mode_include_dir</link> - </entry> - <entry><literal>""</literal></entry> - </row> - <row> - <entry> - <link linkend="ini.safe-mode-exec-dir">safe_mode_exec_dir</link> - </entry> - <entry><literal>1</literal></entry> - </row> - <row> - <entry> - <link linkend="ini.open-basedir">open_basedir</link> - </entry> - <entry><literal>""</literal></entry> - </row> - <row> - <entry> - <literal>safe_mode_allowed_env_vars</literal> - </entry> - <entry><literal>PHP_</literal></entry> - </row> - <row> - <entry> - <literal>safe_mode_protected_env_vars</literal> - </entry> - <entry><literal>LD_LIBRARY_PATH</literal></entry> - </row> - <row> - <entry> - <literal>disable_functions</literal> - </entry> - <entry><literal>""</literal></entry> - </row> + <row> + <entry>safe_mode</entry> + <entry>"0"</entry> + <entry>PHP_INI_SYSTEM</entry> + </row> + <row> + <entry>safe_mode_gid</entry> + <entry>"0"</entry> + <entry>PHP_INI_SYSTEM</entry> + </row> + <row> + <entry>safe_mode_include_dir</entry> + <entry>NULL</entry> + <entry>PHP_INI_SYSTEM</entry> + </row> + <row> + <entry>safe_mode_exec_dir</entry> + <entry>""</entry> + <entry>PHP_INI_SYSTEM</entry> + </row> + <row> + <entry>safe_mode_allowed_env_vars</entry> + <entry>PHP_</entry> + <entry>PHP_INI_SYSTEM</entry> + </row> + <row> + <entry>safe_mode_protected_env_vars</entry> + <entry>LD_LIBRARY_PATH</entry> + <entry>PHP_INI_SYSTEM</entry> + </row> + <row> + <entry>open_basedir</entry> + <entry>NULL</entry> + <entry>PHP_INI_SYSTEM</entry> + </row> + <row> + <entry>disable_functions</entry> + <entry>""</entry> + <entry>PHP_INI_SYSTEM</entry> + </row> </tbody> </tgroup> </table> + PHP_INI_* ³£Á¿µÄ½øÒ»²½Ïêϸ˵Ã÷Ó붨Òå¼û <function>ini_set</function>¡£ + </para> + <para> + ÕâÀïÊÇÅäÖÃÖ¸ÁîµÄһЩ¼ò¶Ì½âÊÍ¡£ + <variablelist> + <varlistentry id="ini.safe-mode"> + <term> + <parameter>safe_mode</parameter> + <type>boolean</type> + </term> + <listitem> + <para> + ÊÇ·ñÆôÓà PHP µÄ°²È«Ä£Ê½¡£¸ü¶àÐÅÏ¢ÇëÔĶÁ<link + linkend="security">°²È«</link>Ò»Õ¡£ + </para> + </listitem> + </varlistentry> + <varlistentry id="ini.safe-mode-gid"> + <term> + <parameter>safe_mode_gid</parameter> + <type>boolean</type> + </term> + <listitem> + <para> + ĬÈÏÇé¿öÏ£¬°²È«Ä£Ê½ÔÚ´ò¿ªÎļþʱ»á×ö UID ±È½Ï¼ì²é¡£Èç¹ûÄãÏ뽫Æä·Å¿íµ½ + GID ±È½Ï£¬Ôò´ò¿ª safe_mode_gid¡£ÊÇ·ñÔÚÎļþ·ÃÎÊʱʹÓà + <literal>UID</literal>£¨&false;£©»òÕß + <literal>GID</literal>£¨&true;£©À´×ö¼ì²é¡£ + </para> + </listitem> + </varlistentry> + <varlistentry id="ini.safe-mode-include-dir"> + <term> + <parameter>safe_mode_include_dir</parameter> + <type>string</type> + </term> + <listitem> + <para> + µ±´Ó´ËĿ¼¼°Æä×ÓĿ¼£¨Ä¿Â¼±ØÐëÔÚ <link linkend="ini.include-path">include_path</link> + ÖлòÕßÓÃÍêÕû·¾¶À´°üº¬£©°üº¬ÎļþʱԽ¹ý + <literal>UID</literal>/<literal>GID</literal> ¼ì²é¡£ + </para> + <simpara> + ´Ó PHP 4.2.0 ¿ªÊ¼£¬±¾Ö¸Áî¿ÉÒÔ½ÓÊÜºÍ <link + linkend="ini.include-path">include_path</link> + Ö¸ÁîÀàËÆµÄ·ç¸ñÓ÷ֺŸô¿ªµÄ·¾¶£¬¶ø²»Ö»ÊÇÒ»¸öĿ¼¡£ + </simpara> + </listitem> + </varlistentry> + <varlistentry id="ini.safe-mode-exec-dir"> + <term> + <parameter>safe_mode_exec_dir</parameter> + <type>string</type> + </term> + <listitem> + <para> + Èç¹û PHP ʹÓÃÁ˰²È«Ä£Ê½£¬<function>system</function> ºÍÆäËü<link + linkend="ref.exec">Ö´ÐÐϵͳ³ÌÐòµÄº¯Êý</link>½«¾Ü¾øÆô¶¯²»ÔÚ´ËĿ¼ÖеijÌÐò¡£ + </para> + </listitem> + </varlistentry> + <varlistentry id="ini.safe-mode-allowed-env-vars"> + <term> + <parameter>safe_mode_allowed_env_vars</parameter> + <type>string</type> + </term> + <listitem> + <para> + ÉèÖÃijЩ»·¾³±äÁ¿¿ÉÄÜÊÇDZÔڵݲȫȱ¿Ú¡£±¾Ö¸Áî°üº¬ÓÐÒ»¸ö¶ººÅ·Ö¸ôµÄǰ׺ÁÐ±í¡£ÔÚ°²È«Ä£Ê½Ï£¬Óû§Ö»ÄܸıäÄÇЩÃû×Ö¾ßÓÐÔÚÕâÀïÌṩµÄǰ׺µÄ»·¾³±äÁ¿¡£Ä¬ÈÏÇé¿öÏ£¬Óû§Ö»ÄÜÉèÖÃÒÔ + PHP_ ¿ªÍ·µÄ»·¾³±äÁ¿£¨ÀýÈç PHP_FOO = BAR£©¡£ + </para> + <note> + <para> + Èç¹û±¾Ö¸ÁîΪ¿Õ£¬PHP ½«Ê¹Óû§¿ÉÒÔÐÞ¸ÄÈκλ·¾³±äÁ¿£¡ + </para> + </note> + </listitem> + </varlistentry> + <varlistentry id="ini.safe-mode-protected-env-vars"> + <term> + <parameter>safe_mode_protected_env_vars</parameter> + <type>string</type> + </term> + <listitem> + <para> + ±¾Ö¸Áî°üº¬ÓÐÒ»¸ö¶ººÅ·Ö¸ôµÄ»·¾³±äÁ¿µÄÁÐ±í£¬×îÖÕÓû§²»ÄÜÓà + <function>putenv</function> À´¸Ä±äÕâЩ»·¾³±äÁ¿¡£ÉõÖÁÔÚ + safe_mode_allowed_env_vars ÖÐÉèÖÃÁËÔÊÐíÐÞ¸ÄʱҲ²»ÄܸıäÕâЩ±äÁ¿¡£ + </para> + </listitem> + </varlistentry> + <varlistentry id="ini.open-basedir"> + <term> + <parameter>open_basedir</parameter> + <type>string</type> + </term> + <listitem> + <para> + ½« PHP ËùÄÜ´ò¿ªµÄÎļþÏÞÖÆÔÚÖ¸¶¨µÄĿ¼Ê÷¡£±¾Ö¸Áî<emphasis>²»ÊÜ</emphasis>°²È«Ä£Ê½´ò¿ª»òÕ߹رյÄÓ°Ïì¡£ + </para> + <para> + µ±Ò»¸ö½Å±¾ÊÔͼÓÃÀýÈç fopen »òÕß gzopen ´ò¿ªÒ»¸öÎļþʱ£¬¸ÃÎļþµÄλÖý«±»¼ì²é¡£µ±ÎļþÔÚÖ¸¶¨µÄĿ¼Ê÷Ö®Íâʱ + PHP ½«¾Ü¾ø´ò¿ªËü¡£ËùÓеķûºÅÁ¬½Ó¶¼»á±»½âÎö£¬ËùÒÔ²»¿ÉÄÜͨ¹ý·ûºÅÁ¬½ÓÀ´±Ü¿ª´ËÏÞÖÆ¡£ + </para> + <para> + ÌØÊâÖµ <systemitem class="constant">.</systemitem> + Ö¸¶¨ÁË´æ·Å¸Ã½Å±¾µÄĿ¼½«±»µ±×ö»ù׼Ŀ¼¡£ + </para> + <para> + ÔÚ Windows ÖУ¬Ó÷ֺŷָôĿ¼¡£ÔÚÈÎºÎÆäËüϵͳÖÐÓÃðºÅ·Ö¸ôĿ¼¡£×÷Ϊ + Apache Ä£¿éʱ£¬¸¸Ä¿Â¼ÖÐµÄ open_basedir ·¾¶×Ô¶¯±»¼Ì³Ð¡£ + </para> + <para> + Óà open_basedir Ö¸¶¨µÄÏÞÖÆÊµ¼ÊÉÏÊÇǰ׺£¬²»ÊÇĿ¼Ãû¡£Ò²¾ÍÊÇ˵ + "open_basedir = /dir/incl" Ò²»áÔÊÐí·ÃÎÊ "/dir/include" ºÍ + "/dir/incls"£¬Èç¹ûËüÃÇ´æÔڵϰ¡£Èç¹ûÒª½«·ÃÎÊÏÞÖÆÔÚ½öΪָ¶¨µÄĿ¼£¬ÓÃбÏß½áÊøÂ·¾¶Ãû¡£ÀýÈ磺"open_basedir = /dir/incl/"¡£ + </para> + <note> + <para> + Ö§³Ö¶à¸öĿ¼ÊÇ 3.0.7 ¼ÓÈëµÄ¡£ + </para> + </note> + <para> + ĬÈÏÊÇÔÊÐí´ò¿ªËùÓÐÎļþ¡£ + </para> + </listitem> + </varlistentry> + <varlistentry id="ini.disable-functions"> + <term> + <parameter>disable_functions</parameter> + <type>string</type> + </term> + <listitem> + <simpara> + ±¾Ö¸ÁîÔÊÐíÄã»ùÓÚ<link linkend="security">°²È«</link>ÔÒò½ûֹijЩº¯Êý¡£½ÓÊܶººÅ·Ö¸ôµÄº¯ÊýÃûÁбí×÷Ϊ²ÎÊý¡£ + disable_functions ²»ÊÜ<link linkend="ini.safe-mode">°²È«Ä£Ê½</link>µÄÓ°Ïì¡£ + </simpara> + <simpara> + ±¾Ö¸ÁîÖ»ÄÜÉèÖÃÔÚ &php.ini; ÖС£ÀýÈçÄã²»Äܽ«ÆäÉèÖÃÔÚ <filename>httpd.conf</filename>¡£ + </simpara> + </listitem> + </varlistentry> + </variablelist> </para> <para> + ²Î¼û <link linkend="ini.register-globals">register_globals</link>£¬<link + linkend="ini.display-errors">display_errors</link> ºÍ <link + linkend="ini.log-errors">log_errors</link>¡£ + </para> + + <para> µ± <link linkend="ini.safe-mode">safe_mode</link> ÉèÖÃΪ on£¬PHP ½«¼ì²éµ±Ç°½Å±¾µÄÓµÓÐÕßÊÇ·ñºÍ½«±»Îļþº¯Êý²Ù×÷µÄÎļþµÄÓµÓÐÕßÏàÆ¥Åä¡£ÀýÈ磺 <programlisting role="ls"> <![CDATA[ @@ -132,209 +278,206 @@ ]]> </screen> </para> - - <sect1 id="features.safe-mode.functions"> - <title>±»°²È«Ä£Ê½ÏÞÖÆ»òÆÁ±ÎµÄº¯Êý</title> - <para> - ÒÔÏÂ<link linkend="features.safe-mode">°²È«Ä£Ê½</link>Áбí¿ÉÄܲ»ÍêÕû»ò²»ÕýÈ·¡£ - <!-- TODO: add ¬e.sm.*; to the functions mentioned here. - That entity should link to this section --> - <table> - <title>°²È«Ä£Ê½ÏÞÖÆº¯Êý</title> - <tgroup cols="2"> - <thead> - <row> - <entry>º¯ÊýÃû</entry> - <entry>ÏÞÖÆ</entry> - </row> - </thead> - <tbody> - <row> - <entry><function>dbmopen</function></entry> - <entry>&sm.uidcheck;</entry> - </row> - <row> - <entry><function>dbase_open</function></entry> - <entry>&sm.uidcheck;</entry> - </row> - <row> - <entry><function>filepro</function></entry> - <entry>&sm.uidcheck;</entry> - </row> - <row> - <entry><function>filepro_rowcount</function></entry> - <entry>&sm.uidcheck;</entry> - </row> - <row> - <entry><function>filepro_retrieve</function></entry> - <entry>&sm.uidcheck;</entry> - </row> - <row> - <entry><function>ifx_*</function></entry> - <entry>sql_safe_mode ÏÞÖÆ, (!= safe mode)</entry> - <!-- TODO: more info on sql-safe-mode --> - </row> - <row> - <entry><function>ingres_*</function></entry> - <entry>sql_safe_mode ÏÞÖÆ, (!= safe mode)</entry> - <!-- TODO: more info on sql-safe-mode --> - </row> - <row> - <entry><function>mysql_*</function></entry> - <entry>sql_safe_mode ÏÞÖÆ, (!= safe mode)</entry> - <!-- TODO: more info on sql-safe-mode --> - </row> - <row> - <entry><function>pg_loimport</function></entry> - <entry>&sm.uidcheck;</entry> - <!-- source TODO: there is no PHP-warning for that safe-mode-restriction --> - </row> - <row> - <entry><function>posix_mkfifo</function></entry> - <entry>&sm.uidcheck.dir;</entry> - </row> - <row> - <entry><function>putenv</function></entry> - <entry> - ×ñÑ ini ÉèÖÃµÄ safe_mode_protected_env_vars ºÍ safe_mode_allowed_env_vars Ñ¡Ïî¡£Çë²Î¿¼ <function>putenv</function> º¯ÊýµÄÓйØÎĵµ¡£ - </entry> - <!-- TODO: document those directives in chapters/config.xml --> - </row> - <row> - <entry><function>move_uploaded_file</function></entry> - <entry>&sm.uidcheck; <!-- TODO: check this --></entry> - </row> - + </sect1> + + <sect1 id="features.safe-mode.functions"> + <title>±»°²È«Ä£Ê½ÏÞÖÆ»òÆÁ±ÎµÄº¯Êý</title> + <para> + ÒÔÏÂ<link linkend="features.safe-mode">°²È«Ä£Ê½</link>Áбí¿ÉÄܲ»ÍêÕû»ò²»ÕýÈ·¡£ + <!-- TODO: add ¬e.sm.*; to the functions mentioned here. + That entity should link to this section --> + <table> + <title>°²È«Ä£Ê½ÏÞÖÆº¯Êý</title> + <tgroup cols="2"> + <thead> + <row> + <entry>º¯ÊýÃû</entry> + <entry>ÏÞÖÆ</entry> + </row> + </thead> + <tbody> + <row> + <entry><function>dbmopen</function></entry> + <entry>&sm.uidcheck;</entry> + </row> + <row> + <entry><function>dbase_open</function></entry> + <entry>&sm.uidcheck;</entry> + </row> + <row> + <entry><function>filepro</function></entry> + <entry>&sm.uidcheck;</entry> + </row> + <row> + <entry><function>filepro_rowcount</function></entry> + <entry>&sm.uidcheck;</entry> + </row> + <row> + <entry><function>filepro_retrieve</function></entry> + <entry>&sm.uidcheck;</entry> + </row> + <row> + <entry><function>ifx_*</function></entry> + <entry>sql_safe_mode ÏÞÖÆ, (!= safe mode)</entry> + <!-- TODO: more info on sql-safe-mode --> + </row> + <row> + <entry><function>ingres_*</function></entry> + <entry>sql_safe_mode ÏÞÖÆ, (!= safe mode)</entry> + <!-- TODO: more info on sql-safe-mode --> + </row> + <row> + <entry><function>mysql_*</function></entry> + <entry>sql_safe_mode ÏÞÖÆ, (!= safe mode)</entry> + <!-- TODO: more info on sql-safe-mode --> + </row> + <row> + <entry><function>pg_loimport</function></entry> + <entry>&sm.uidcheck;</entry> + <!-- source TODO: there is no PHP-warning for that safe-mode-restriction --> + </row> + <row> + <entry><function>posix_mkfifo</function></entry> + <entry>&sm.uidcheck.dir;</entry> + </row> + <row> + <entry><function>putenv</function></entry> + <entry> + ×ñÑ ini ÉèÖÃµÄ safe_mode_protected_env_vars ºÍ safe_mode_allowed_env_vars Ñ¡Ïî¡£Çë²Î¿¼ <function>putenv</function> º¯ÊýµÄÓйØÎĵµ¡£ + </entry> + <!-- TODO: document those directives in chapters/config.xml --> + </row> + <row> + <entry><function>move_uploaded_file</function></entry> + <entry>&sm.uidcheck; <!-- TODO: check this --></entry> + </row> <!-- TODO: from here on, add warning to the function itself --> - - <row> - <entry><function>chdir</function></entry> - <entry>&sm.uidcheck.dir;</entry> - </row> - <row> - <entry><function>dl</function></entry> - <entry>&sm.disabled;</entry> - </row> - <row> - <entry><link linkend="language.operators.execution">backtick operator</link></entry> - <entry>&sm.disabled;</entry> - </row> - <row> - <entry><function>shell_exec</function>£¨ÔÚ¹¦ÄÜÉÏºÍ backticks º¯ÊýÏàͬ£©</entry> - <entry>&sm.disabled;</entry> - </row> - <row> - <entry><function>exec</function></entry> - <entry>ÄúÖ»ÄÜÔÚ <link linkend="ini.safe-mode-exec-dir">safe_mode_exec_dir</link> ÉèÖõÄĿ¼Ï½øÐÐÖ´ÐвÙ×÷¡£»ùÓÚijЩÔÒò£¬Ä¿Ç°²»ÄÜÔÚ¿ÉÖ´ÐжÔÏóµÄ·¾¶ÖÐʹÓà <literal>..</literal>¡£ - </entry> - </row> <row> - <entry><function>system</function></entry> - <entry> - ÄúÖ»ÄÜÔÚ <link linkend="ini.safe-mode-exec-dir">safe_mode_exec_dir</link> ÉèÖõÄĿ¼Ï½øÐÐÖ´ÐвÙ×÷¡£»ùÓÚijЩÔÒò£¬Ä¿Ç°²»ÄÜÔÚ¿ÉÖ´ÐжÔÏóµÄ·¾¶ÖÐʹÓà <literal>..</literal>¡£ - </entry> - </row> - <row> - <entry><function>passthru</function></entry> - <entry> + <entry><function>chdir</function></entry> + <entry>&sm.uidcheck.dir;</entry> + </row> + <row> + <entry><function>dl</function></entry> + <entry>&sm.disabled;</entry> + </row> + <row> + <entry><link linkend="language.operators.execution">backtick operator</link></entry> + <entry>&sm.disabled;</entry> + </row> + <row> + <entry><function>shell_exec</function>£¨ÔÚ¹¦ÄÜÉÏºÍ backticks º¯ÊýÏàͬ£©</entry> + <entry>&sm.disabled;</entry> + </row> + <row> + <entry><function>exec</function></entry> + <entry>ÄúÖ»ÄÜÔÚ <link linkend="ini.safe-mode-exec-dir">safe_mode_exec_dir</link> ÉèÖõÄĿ¼Ï½øÐÐÖ´ÐвÙ×÷¡£»ùÓÚijЩÔÒò£¬Ä¿Ç°²»ÄÜÔÚ¿ÉÖ´ÐжÔÏóµÄ·¾¶ÖÐʹÓà <literal>..</literal>¡£ + </entry> + </row> + <row> + <entry><function>system</function></entry> + <entry> ÄúÖ»ÄÜÔÚ <link linkend="ini.safe-mode-exec-dir">safe_mode_exec_dir</link> ÉèÖõÄĿ¼Ï½øÐÐÖ´ÐвÙ×÷¡£»ùÓÚijЩÔÒò£¬Ä¿Ç°²»ÄÜÔÚ¿ÉÖ´ÐжÔÏóµÄ·¾¶ÖÐʹÓà <literal>..</literal>¡£ - </entry> - </row> - <row> - <entry><function>popen</function></entry> - <entry> + </entry> + </row> + <row> + <entry><function>passthru</function></entry> + <entry> + ÄúÖ»ÄÜÔÚ <link linkend="ini.safe-mode-exec-dir">safe_mode_exec_dir</link> ÉèÖõÄĿ¼Ï½øÐÐÖ´ÐвÙ×÷¡£»ùÓÚijЩÔÒò£¬Ä¿Ç°²»ÄÜÔÚ¿ÉÖ´ÐжÔÏóµÄ·¾¶ÖÐʹÓà <literal>..</literal>¡£ + </entry> + </row> + <row> + <entry><function>popen</function></entry> + <entry> ÄúÖ»ÄÜÔÚ <link linkend="ini.safe-mode-exec-dir">safe_mode_exec_dir</link> ÉèÖõÄĿ¼Ï½øÐÐÖ´ÐвÙ×÷¡£»ùÓÚijЩÔÒò£¬Ä¿Ç°²»ÄÜÔÚ¿ÉÖ´ÐжÔÏóµÄ·¾¶ÖÐʹÓà <literal>..</literal>¡£ - </entry> - <!-- TODO: not sure. popen uses a completely different implementation - Don't know why, don't know whether it's behaving the same --> - </row> - <row> - <entry><function>mkdir</function></entry> - <entry>&sm.uidcheck.dir;</entry> - </row> - <row> - <entry><function>rmdir</function></entry> - <entry>&sm.uidcheck;</entry> - </row> - <row> - <entry><function>rename</function></entry> - <entry>&sm.uidcheck; &sm.uidcheck.dir;<!-- on the old name only, it seems. Is rename preventing moving files? --></entry> - </row> - <row> - <entry><function>unlink</function></entry> - <entry>&sm.uidcheck; &sm.uidcheck.dir;</entry> - </row> - <row> - <entry><function>copy</function></entry> - <entry>&sm.uidcheck; &sm.uidcheck.dir; (on - <parameter>source</parameter> and - <parameter>target</parameter>) </entry> - </row> - <row> - <entry><function>chgrp</function></entry> - <entry>&sm.uidcheck;</entry> - </row> - <row> - <entry><function>chown</function></entry> - <entry>&sm.uidcheck;</entry> - </row> - <row> - <entry><function>chmod</function></entry> - <entry>&sm.uidcheck; ÁíÍ⣬Äú²»ÄÜÉèÖà SUID¡¢SGID ºÍ sticky bits - </entry> - </row> - <row> - <entry><function>touch</function></entry> - <entry>&sm.uidcheck; &sm.uidcheck.dir;</entry> - </row> - <row> - <entry><function>symlink</function></entry> - <entry>&sm.uidcheck; &sm.uidcheck.dir; £¨×¢Ò⣺½ö²âÊÔ target£©</entry> - </row> - <row> - <entry><function>link</function></entry> - <entry>&sm.uidcheck; &sm.uidcheck.dir; £¨×¢Ò⣺½ö²âÊÔ target£©</entry> - </row> - <row> - <entry><function>getallheaders</function></entry> - <entry>ÔÚ°²È«Ä£Ê½Ï£¬ÒÔ¡°authorization¡±£¨Çø·Ö´óСд£©¿ªÍ·µÄÍ·ÐÅÏ¢½«²»»á±»·µ»Ø¡£¾¯¸æ£º<function>getallheaders</function> ÎÞ·¨ÔÚ aol-server ÏÂʵÏÖ£¡ - </entry> - </row> - <row> - <entry><function>header</function></entry> - <entry>ÔÚ°²È«Ä£Ê½Ï£¬Èç¹ûÄúÉèÖÃÁË <literal>WWW-Authenticate</literal>£¬µ±Ç°½Å±¾µÄ uid ½«±»Ìí¼Óµ½¸ÃÍ·ÐÅÏ¢µÄ <literal>realm</literal> ²¿·Ö¡£ - </entry> - </row> - <row> - <entry> - <function>highlight_file</function>, - <function>show_source</function> - </entry> - <entry> - &sm.uidcheck; &sm.uidcheck.dir; £¨×¢Ò⣬½öÔÚ 4.2.1 °æ±¾ºóÓÐЧ£© - </entry> - </row> - <row> - <entry> - <function>parse_ini_file</function> - </entry> - <entry> - &sm.uidcheck; &sm.uidcheck.dir; £¨×¢Ò⣬½öÔÚ 4.2.1 °æ±¾ºóÓÐЧ£© - </entry> - </row> - <row> - <entry>ÈκÎʹÓà - <filename>php4/main/fopen_wrappers.c</filename> µÄº¯Êý - </entry> - <entry>??</entry> - </row> - </tbody> - </tgroup> - </table> - </para> - </sect1> + </entry> + <!-- TODO: not sure. popen uses a completely different implementation + Don't know why, don't know whether it's behaving the same --> + </row> + <row> + <entry><function>mkdir</function></entry> + <entry>&sm.uidcheck.dir;</entry> + </row> + <row> + <entry><function>rmdir</function></entry> + <entry>&sm.uidcheck;</entry> + </row> + <row> + <entry><function>rename</function></entry> + <entry>&sm.uidcheck; &sm.uidcheck.dir;<!-- on the old name only, it seems. Is rename preventing moving files? --></entry> + </row> + <row> + <entry><function>unlink</function></entry> + <entry>&sm.uidcheck; &sm.uidcheck.dir;</entry> + </row> + <row> + <entry><function>copy</function></entry> + <entry>&sm.uidcheck; &sm.uidcheck.dir; (on + <parameter>source</parameter> and + <parameter>target</parameter>) </entry> + </row> + <row> + <entry><function>chgrp</function></entry> + <entry>&sm.uidcheck;</entry> + </row> + <row> + <entry><function>chown</function></entry> + <entry>&sm.uidcheck;</entry> + </row> + <row> + <entry><function>chmod</function></entry> + <entry>&sm.uidcheck; ÁíÍ⣬Äú²»ÄÜÉèÖà SUID¡¢SGID ºÍ sticky bits</entry> + </row> + <row> + <entry><function>touch</function></entry> + <entry>&sm.uidcheck; &sm.uidcheck.dir;</entry> + </row> + <row> + <entry><function>symlink</function></entry> + <entry>&sm.uidcheck; &sm.uidcheck.dir; £¨×¢Ò⣺½ö²âÊÔ target£©</entry> + </row> + <row> + <entry><function>link</function></entry> + <entry>&sm.uidcheck; &sm.uidcheck.dir; £¨×¢Ò⣺½ö²âÊÔ target£©</entry> + </row> + <row> + <entry><function>getallheaders</function></entry> + <entry>ÔÚ°²È«Ä£Ê½Ï£¬ÒÔ¡°authorization¡±£¨Çø·Ö´óСд£©¿ªÍ·µÄÍ·ÐÅÏ¢½«²»»á±»·µ»Ø¡£¾¯¸æ£º<function>getallheaders</function> ÎÞ·¨ÔÚ aol-server ÏÂʵÏÖ£¡ + </entry> + </row> + <row> + <entry><function>header</function></entry> + <entry>ÔÚ°²È«Ä£Ê½Ï£¬Èç¹ûÄúÉèÖÃÁË <literal>WWW-Authenticate</literal>£¬µ±Ç°½Å±¾µÄ uid ½«±»Ìí¼Óµ½¸ÃÍ·ÐÅÏ¢µÄ <literal>realm</literal> ²¿·Ö¡£</entry> + </row> + <row> + <entry> + <function>highlight_file</function>, + <function>show_source</function> + </entry> + <entry> + &sm.uidcheck; &sm.uidcheck.dir; £¨×¢Ò⣬½öÔÚ 4.2.1 °æ±¾ºóÓÐЧ£© + </entry> + </row> + <row> + <entry> + <function>parse_ini_file</function> + </entry> + <entry> + &sm.uidcheck; &sm.uidcheck.dir; £¨×¢Ò⣬½öÔÚ 4.2.1 °æ±¾ºóÓÐЧ£© + </entry> + </row> + <row> + <entry>ÈκÎʹÓà + <filename>php4/main/fopen_wrappers.c</filename> µÄº¯Êý + </entry> + <entry>??</entry> + </row> + </tbody> + </tgroup> + </table> + </para> + </sect1> - </chapter> +</chapter> <!-- Keep this comment at the end of the file Local variables:
Index: phpdoc-zh/features/safe-mode.xml diff -u phpdoc-zh/features/safe-mode.xml:1.6 phpdoc-zh/features/safe-mode.xml:1.7 --- phpdoc-zh/features/safe-mode.xml:1.6 Thu Sep 26 05:11:26 2002 +++ phpdoc-zh/features/safe-mode.xml Mon Sep 30 00:23:35 2002 @@ -1,78 +1,224 @@ <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.4 $ --> <!-- $Author: gregory $ --> -<!-- EN-Revision: 1.25 Maintainer: thomaslio Status: ready --> +<!-- EN-Revision: 1.26 Maintainer: thomaslio Status: ready --> <!-- CREDITS: Gregory --> - <chapter id="features.safe-mode"> - <title>°²È«Ä£Ê½</title> +<!-- CREDITS: dallas --> +<chapter id="features.safe-mode"> + <title>°²È«Ä£Ê½</title> - <para> - PHP µÄ°²È«Ä£Ê½ÊÇΪÁËÊÔͼ½â¾ö¹²Ïí·þÎñÆ÷£¨shared-server£©°²È«ÎÊÌâ¶øÉèÁ¢µÄ¡£ÔڽṹÉÏ£¬ÊÔͼÔÚ PHP ²ãÉϽâ¾öÕâ¸öÎÊÌâÊDz»ºÏÀíµÄ£¬µ«ÐÞ¸Ä WEB ·þÎñÆ÷²ãºÍ²Ù×÷ϵͳ²ãÏԵ÷dz£²»ÏÖʵ¡£Òò´ËÐí¶àÈË£¬ÌرðÊÇ ISP£¬Ä¿Ç°Ê¹Óð²È«Ä£Ê½¡£ - </para> + <para> + PHP µÄ°²È«Ä£Ê½ÊÇΪÁËÊÔͼ½â¾ö¹²Ïí·þÎñÆ÷£¨shared-server£©°²È«ÎÊÌâ¶øÉèÁ¢µÄ¡£ÔڽṹÉÏ£¬ÊÔͼÔÚ PHP ²ãÉϽâ¾öÕâ¸öÎÊÌâÊDz»ºÏÀíµÄ£¬µ«ÐÞ¸Ä WEB ·þÎñÆ÷²ãºÍ²Ù×÷ϵͳ²ãÏԵ÷dz£²»ÏÖʵ¡£Òò´ËÐí¶àÈË£¬ÌرðÊÇ ISP£¬Ä¿Ç°Ê¹Óð²È«Ä£Ê½¡£ + </para> + + <sect1 id="ini.sect.safe-mode"> + <title>±£°²´ëÊ©ºÍ°²È«Ä£Ê½</title> <para> <table> - <title>¿ØÖư²È«Ä£Ê½µÄÉèÖÃÑ¡ÏîÓУº</title> - <tgroup cols="2"> + <title>±£°²´ëÊ©ºÍ°²È«Ä£Ê½ÅäÖÃÖ¸Áî</title> + <tgroup cols="3"> <thead> <row> - <entry>ÉèÖÃÑ¡Ïî</entry> + <entry>Ãû³Æ</entry> <entry>ĬÈÏÖµ</entry> + <entry>×÷Ó÷¶Î§</entry> </row> </thead> <tbody> - <row> - <entry> - <link linkend="ini.safe-mode">safe_mode</link> - </entry> - <entry><literal>Off</literal></entry> - </row> - <row> - <entry> - <link linkend="ini.safe-mode-gid">safe_mode_gid</link> - </entry> - <entry><literal>0</literal></entry> - </row> - <row> - <entry> - <link linkend="ini.safe-mode-include-dir">safe_mode_include_dir</link> - </entry> - <entry><literal>""</literal></entry> - </row> - <row> - <entry> - <link linkend="ini.safe-mode-exec-dir">safe_mode_exec_dir</link> - </entry> - <entry><literal>1</literal></entry> - </row> - <row> - <entry> - <link linkend="ini.open-basedir">open_basedir</link> - </entry> - <entry><literal>""</literal></entry> - </row> - <row> - <entry> - <literal>safe_mode_allowed_env_vars</literal> - </entry> - <entry><literal>PHP_</literal></entry> - </row> - <row> - <entry> - <literal>safe_mode_protected_env_vars</literal> - </entry> - <entry><literal>LD_LIBRARY_PATH</literal></entry> - </row> - <row> - <entry> - <literal>disable_functions</literal> - </entry> - <entry><literal>""</literal></entry> - </row> + <row> + <entry>safe_mode</entry> + <entry>"0"</entry> + <entry>PHP_INI_SYSTEM</entry> + </row> + <row> + <entry>safe_mode_gid</entry> + <entry>"0"</entry> + <entry>PHP_INI_SYSTEM</entry> + </row> + <row> + <entry>safe_mode_include_dir</entry> + <entry>NULL</entry> + <entry>PHP_INI_SYSTEM</entry> + </row> + <row> + <entry>safe_mode_exec_dir</entry> + <entry>""</entry> + <entry>PHP_INI_SYSTEM</entry> + </row> + <row> + <entry>safe_mode_allowed_env_vars</entry> + <entry>PHP_</entry> + <entry>PHP_INI_SYSTEM</entry> + </row> + <row> + <entry>safe_mode_protected_env_vars</entry> + <entry>LD_LIBRARY_PATH</entry> + <entry>PHP_INI_SYSTEM</entry> + </row> + <row> + <entry>open_basedir</entry> + <entry>NULL</entry> + <entry>PHP_INI_SYSTEM</entry> + </row> + <row> + <entry>disable_functions</entry> + <entry>""</entry> + <entry>PHP_INI_SYSTEM</entry> + </row> </tbody> </tgroup> </table> + PHP_INI_* ³£Á¿µÄ½øÒ»²½Ïêϸ˵Ã÷Ó붨Òå¼û <function>ini_set</function>¡£ + </para> + <para> + ÕâÀïÊÇÅäÖÃÖ¸ÁîµÄһЩ¼ò¶Ì½âÊÍ¡£ + <variablelist> + <varlistentry id="ini.safe-mode"> + <term> + <parameter>safe_mode</parameter> + <type>boolean</type> + </term> + <listitem> + <para> + ÊÇ·ñÆôÓà PHP µÄ°²È«Ä£Ê½¡£¸ü¶àÐÅÏ¢ÇëÔĶÁ<link + linkend="security">°²È«</link>Ò»Õ¡£ + </para> + </listitem> + </varlistentry> + <varlistentry id="ini.safe-mode-gid"> + <term> + <parameter>safe_mode_gid</parameter> + <type>boolean</type> + </term> + <listitem> + <para> + ĬÈÏÇé¿öÏ£¬°²È«Ä£Ê½ÔÚ´ò¿ªÎļþʱ»á×ö UID ±È½Ï¼ì²é¡£Èç¹ûÄãÏ뽫Æä·Å¿íµ½ + GID ±È½Ï£¬Ôò´ò¿ª safe_mode_gid¡£ÊÇ·ñÔÚÎļþ·ÃÎÊʱʹÓà + <literal>UID</literal>£¨&false;£©»òÕß + <literal>GID</literal>£¨&true;£©À´×ö¼ì²é¡£ + </para> + </listitem> + </varlistentry> + <varlistentry id="ini.safe-mode-include-dir"> + <term> + <parameter>safe_mode_include_dir</parameter> + <type>string</type> + </term> + <listitem> + <para> + µ±´Ó´ËĿ¼¼°Æä×ÓĿ¼£¨Ä¿Â¼±ØÐëÔÚ <link linkend="ini.include-path">include_path</link> + ÖлòÕßÓÃÍêÕû·¾¶À´°üº¬£©°üº¬ÎļþʱԽ¹ý + <literal>UID</literal>/<literal>GID</literal> ¼ì²é¡£ + </para> + <simpara> + ´Ó PHP 4.2.0 ¿ªÊ¼£¬±¾Ö¸Áî¿ÉÒÔ½ÓÊÜºÍ <link + linkend="ini.include-path">include_path</link> + Ö¸ÁîÀàËÆµÄ·ç¸ñÓ÷ֺŸô¿ªµÄ·¾¶£¬¶ø²»Ö»ÊÇÒ»¸öĿ¼¡£ + </simpara> + </listitem> + </varlistentry> + <varlistentry id="ini.safe-mode-exec-dir"> + <term> + <parameter>safe_mode_exec_dir</parameter> + <type>string</type> + </term> + <listitem> + <para> + Èç¹û PHP ʹÓÃÁ˰²È«Ä£Ê½£¬<function>system</function> ºÍÆäËü<link + linkend="ref.exec">Ö´ÐÐϵͳ³ÌÐòµÄº¯Êý</link>½«¾Ü¾øÆô¶¯²»ÔÚ´ËĿ¼ÖеijÌÐò¡£ + </para> + </listitem> + </varlistentry> + <varlistentry id="ini.safe-mode-allowed-env-vars"> + <term> + <parameter>safe_mode_allowed_env_vars</parameter> + <type>string</type> + </term> + <listitem> + <para> + ÉèÖÃijЩ»·¾³±äÁ¿¿ÉÄÜÊÇDZÔڵݲȫȱ¿Ú¡£±¾Ö¸Áî°üº¬ÓÐÒ»¸ö¶ººÅ·Ö¸ôµÄǰ׺ÁÐ±í¡£ÔÚ°²È«Ä£Ê½Ï£¬Óû§Ö»ÄܸıäÄÇЩÃû×Ö¾ßÓÐÔÚÕâÀïÌṩµÄǰ׺µÄ»·¾³±äÁ¿¡£Ä¬ÈÏÇé¿öÏ£¬Óû§Ö»ÄÜÉèÖÃÒÔ + PHP_ ¿ªÍ·µÄ»·¾³±äÁ¿£¨ÀýÈç PHP_FOO = BAR£©¡£ + </para> + <note> + <para> + Èç¹û±¾Ö¸ÁîΪ¿Õ£¬PHP ½«Ê¹Óû§¿ÉÒÔÐÞ¸ÄÈκλ·¾³±äÁ¿£¡ + </para> + </note> + </listitem> + </varlistentry> + <varlistentry id="ini.safe-mode-protected-env-vars"> + <term> + <parameter>safe_mode_protected_env_vars</parameter> + <type>string</type> + </term> + <listitem> + <para> + ±¾Ö¸Áî°üº¬ÓÐÒ»¸ö¶ººÅ·Ö¸ôµÄ»·¾³±äÁ¿µÄÁÐ±í£¬×îÖÕÓû§²»ÄÜÓà + <function>putenv</function> À´¸Ä±äÕâЩ»·¾³±äÁ¿¡£ÉõÖÁÔÚ + safe_mode_allowed_env_vars ÖÐÉèÖÃÁËÔÊÐíÐÞ¸ÄʱҲ²»ÄܸıäÕâЩ±äÁ¿¡£ + </para> + </listitem> + </varlistentry> + <varlistentry id="ini.open-basedir"> + <term> + <parameter>open_basedir</parameter> + <type>string</type> + </term> + <listitem> + <para> + ½« PHP ËùÄÜ´ò¿ªµÄÎļþÏÞÖÆÔÚÖ¸¶¨µÄĿ¼Ê÷¡£±¾Ö¸Áî<emphasis>²»ÊÜ</emphasis>°²È«Ä£Ê½´ò¿ª»òÕ߹رյÄÓ°Ïì¡£ + </para> + <para> + µ±Ò»¸ö½Å±¾ÊÔͼÓÃÀýÈç fopen »òÕß gzopen ´ò¿ªÒ»¸öÎļþʱ£¬¸ÃÎļþµÄλÖý«±»¼ì²é¡£µ±ÎļþÔÚÖ¸¶¨µÄĿ¼Ê÷Ö®Íâʱ + PHP ½«¾Ü¾ø´ò¿ªËü¡£ËùÓеķûºÅÁ¬½Ó¶¼»á±»½âÎö£¬ËùÒÔ²»¿ÉÄÜͨ¹ý·ûºÅÁ¬½ÓÀ´±Ü¿ª´ËÏÞÖÆ¡£ + </para> + <para> + ÌØÊâÖµ <systemitem class="constant">.</systemitem> + Ö¸¶¨ÁË´æ·Å¸Ã½Å±¾µÄĿ¼½«±»µ±×ö»ù׼Ŀ¼¡£ + </para> + <para> + ÔÚ Windows ÖУ¬Ó÷ֺŷָôĿ¼¡£ÔÚÈÎºÎÆäËüϵͳÖÐÓÃðºÅ·Ö¸ôĿ¼¡£×÷Ϊ + Apache Ä£¿éʱ£¬¸¸Ä¿Â¼ÖÐµÄ open_basedir ·¾¶×Ô¶¯±»¼Ì³Ð¡£ + </para> + <para> + Óà open_basedir Ö¸¶¨µÄÏÞÖÆÊµ¼ÊÉÏÊÇǰ׺£¬²»ÊÇĿ¼Ãû¡£Ò²¾ÍÊÇ˵ + "open_basedir = /dir/incl" Ò²»áÔÊÐí·ÃÎÊ "/dir/include" ºÍ + "/dir/incls"£¬Èç¹ûËüÃÇ´æÔڵϰ¡£Èç¹ûÒª½«·ÃÎÊÏÞÖÆÔÚ½öΪָ¶¨µÄĿ¼£¬ÓÃбÏß½áÊøÂ·¾¶Ãû¡£ÀýÈ磺"open_basedir = /dir/incl/"¡£ + </para> + <note> + <para> + Ö§³Ö¶à¸öĿ¼ÊÇ 3.0.7 ¼ÓÈëµÄ¡£ + </para> + </note> + <para> + ĬÈÏÊÇÔÊÐí´ò¿ªËùÓÐÎļþ¡£ + </para> + </listitem> + </varlistentry> + <varlistentry id="ini.disable-functions"> + <term> + <parameter>disable_functions</parameter> + <type>string</type> + </term> + <listitem> + <simpara> + ±¾Ö¸ÁîÔÊÐíÄã»ùÓÚ<link linkend="security">°²È«</link>ÔÒò½ûֹijЩº¯Êý¡£½ÓÊܶººÅ·Ö¸ôµÄº¯ÊýÃûÁбí×÷Ϊ²ÎÊý¡£ + disable_functions ²»ÊÜ<link linkend="ini.safe-mode">°²È«Ä£Ê½</link>µÄÓ°Ïì¡£ + </simpara> + <simpara> + ±¾Ö¸ÁîÖ»ÄÜÉèÖÃÔÚ &php.ini; ÖС£ÀýÈçÄã²»Äܽ«ÆäÉèÖÃÔÚ <filename>httpd.conf</filename>¡£ + </simpara> + </listitem> + </varlistentry> + </variablelist> </para> <para> + ²Î¼û <link linkend="ini.register-globals">register_globals</link>£¬<link + linkend="ini.display-errors">display_errors</link> ºÍ <link + linkend="ini.log-errors">log_errors</link>¡£ + </para> + + <para> µ± <link linkend="ini.safe-mode">safe_mode</link> ÉèÖÃΪ on£¬PHP ½«¼ì²éµ±Ç°½Å±¾µÄÓµÓÐÕßÊÇ·ñºÍ½«±»Îļþº¯Êý²Ù×÷µÄÎļþµÄÓµÓÐÕßÏàÆ¥Åä¡£ÀýÈ磺 <programlisting role="ls"> <![CDATA[ @@ -132,209 +278,206 @@ ]]> </screen> </para> - - <sect1 id="features.safe-mode.functions"> - <title>±»°²È«Ä£Ê½ÏÞÖÆ»òÆÁ±ÎµÄº¯Êý</title> - <para> - ÒÔÏÂ<link linkend="features.safe-mode">°²È«Ä£Ê½</link>Áбí¿ÉÄܲ»ÍêÕû»ò²»ÕýÈ·¡£ - <!-- TODO: add ¬e.sm.*; to the functions mentioned here. - That entity should link to this section --> - <table> - <title>°²È«Ä£Ê½ÏÞÖÆº¯Êý</title> - <tgroup cols="2"> - <thead> - <row> - <entry>º¯ÊýÃû</entry> - <entry>ÏÞÖÆ</entry> - </row> - </thead> - <tbody> - <row> - <entry><function>dbmopen</function></entry> - <entry>&sm.uidcheck;</entry> - </row> - <row> - <entry><function>dbase_open</function></entry> - <entry>&sm.uidcheck;</entry> - </row> - <row> - <entry><function>filepro</function></entry> - <entry>&sm.uidcheck;</entry> - </row> - <row> - <entry><function>filepro_rowcount</function></entry> - <entry>&sm.uidcheck;</entry> - </row> - <row> - <entry><function>filepro_retrieve</function></entry> - <entry>&sm.uidcheck;</entry> - </row> - <row> - <entry><function>ifx_*</function></entry> - <entry>sql_safe_mode ÏÞÖÆ, (!= safe mode)</entry> - <!-- TODO: more info on sql-safe-mode --> - </row> - <row> - <entry><function>ingres_*</function></entry> - <entry>sql_safe_mode ÏÞÖÆ, (!= safe mode)</entry> - <!-- TODO: more info on sql-safe-mode --> - </row> - <row> - <entry><function>mysql_*</function></entry> - <entry>sql_safe_mode ÏÞÖÆ, (!= safe mode)</entry> - <!-- TODO: more info on sql-safe-mode --> - </row> - <row> - <entry><function>pg_loimport</function></entry> - <entry>&sm.uidcheck;</entry> - <!-- source TODO: there is no PHP-warning for that safe-mode-restriction --> - </row> - <row> - <entry><function>posix_mkfifo</function></entry> - <entry>&sm.uidcheck.dir;</entry> - </row> - <row> - <entry><function>putenv</function></entry> - <entry> - ×ñÑ ini ÉèÖÃµÄ safe_mode_protected_env_vars ºÍ safe_mode_allowed_env_vars Ñ¡Ïî¡£Çë²Î¿¼ <function>putenv</function> º¯ÊýµÄÓйØÎĵµ¡£ - </entry> - <!-- TODO: document those directives in chapters/config.xml --> - </row> - <row> - <entry><function>move_uploaded_file</function></entry> - <entry>&sm.uidcheck; <!-- TODO: check this --></entry> - </row> - + </sect1> + + <sect1 id="features.safe-mode.functions"> + <title>±»°²È«Ä£Ê½ÏÞÖÆ»òÆÁ±ÎµÄº¯Êý</title> + <para> + ÒÔÏÂ<link linkend="features.safe-mode">°²È«Ä£Ê½</link>Áбí¿ÉÄܲ»ÍêÕû»ò²»ÕýÈ·¡£ + <!-- TODO: add ¬e.sm.*; to the functions mentioned here. + That entity should link to this section --> + <table> + <title>°²È«Ä£Ê½ÏÞÖÆº¯Êý</title> + <tgroup cols="2"> + <thead> + <row> + <entry>º¯ÊýÃû</entry> + <entry>ÏÞÖÆ</entry> + </row> + </thead> + <tbody> + <row> + <entry><function>dbmopen</function></entry> + <entry>&sm.uidcheck;</entry> + </row> + <row> + <entry><function>dbase_open</function></entry> + <entry>&sm.uidcheck;</entry> + </row> + <row> + <entry><function>filepro</function></entry> + <entry>&sm.uidcheck;</entry> + </row> + <row> + <entry><function>filepro_rowcount</function></entry> + <entry>&sm.uidcheck;</entry> + </row> + <row> + <entry><function>filepro_retrieve</function></entry> + <entry>&sm.uidcheck;</entry> + </row> + <row> + <entry><function>ifx_*</function></entry> + <entry>sql_safe_mode ÏÞÖÆ, (!= safe mode)</entry> + <!-- TODO: more info on sql-safe-mode --> + </row> + <row> + <entry><function>ingres_*</function></entry> + <entry>sql_safe_mode ÏÞÖÆ, (!= safe mode)</entry> + <!-- TODO: more info on sql-safe-mode --> + </row> + <row> + <entry><function>mysql_*</function></entry> + <entry>sql_safe_mode ÏÞÖÆ, (!= safe mode)</entry> + <!-- TODO: more info on sql-safe-mode --> + </row> + <row> + <entry><function>pg_loimport</function></entry> + <entry>&sm.uidcheck;</entry> + <!-- source TODO: there is no PHP-warning for that safe-mode-restriction --> + </row> + <row> + <entry><function>posix_mkfifo</function></entry> + <entry>&sm.uidcheck.dir;</entry> + </row> + <row> + <entry><function>putenv</function></entry> + <entry> + ×ñÑ ini ÉèÖÃµÄ safe_mode_protected_env_vars ºÍ safe_mode_allowed_env_vars Ñ¡Ïî¡£Çë²Î¿¼ <function>putenv</function> º¯ÊýµÄÓйØÎĵµ¡£ + </entry> + <!-- TODO: document those directives in chapters/config.xml --> + </row> + <row> + <entry><function>move_uploaded_file</function></entry> + <entry>&sm.uidcheck; <!-- TODO: check this --></entry> + </row> <!-- TODO: from here on, add warning to the function itself --> - - <row> - <entry><function>chdir</function></entry> - <entry>&sm.uidcheck.dir;</entry> - </row> - <row> - <entry><function>dl</function></entry> - <entry>&sm.disabled;</entry> - </row> - <row> - <entry><link linkend="language.operators.execution">backtick operator</link></entry> - <entry>&sm.disabled;</entry> - </row> - <row> - <entry><function>shell_exec</function>£¨ÔÚ¹¦ÄÜÉÏºÍ backticks º¯ÊýÏàͬ£©</entry> - <entry>&sm.disabled;</entry> - </row> - <row> - <entry><function>exec</function></entry> - <entry>ÄúÖ»ÄÜÔÚ <link linkend="ini.safe-mode-exec-dir">safe_mode_exec_dir</link> ÉèÖõÄĿ¼Ï½øÐÐÖ´ÐвÙ×÷¡£»ùÓÚijЩÔÒò£¬Ä¿Ç°²»ÄÜÔÚ¿ÉÖ´ÐжÔÏóµÄ·¾¶ÖÐʹÓà <literal>..</literal>¡£ - </entry> - </row> <row> - <entry><function>system</function></entry> - <entry> - ÄúÖ»ÄÜÔÚ <link linkend="ini.safe-mode-exec-dir">safe_mode_exec_dir</link> ÉèÖõÄĿ¼Ï½øÐÐÖ´ÐвÙ×÷¡£»ùÓÚijЩÔÒò£¬Ä¿Ç°²»ÄÜÔÚ¿ÉÖ´ÐжÔÏóµÄ·¾¶ÖÐʹÓà <literal>..</literal>¡£ - </entry> - </row> - <row> - <entry><function>passthru</function></entry> - <entry> + <entry><function>chdir</function></entry> + <entry>&sm.uidcheck.dir;</entry> + </row> + <row> + <entry><function>dl</function></entry> + <entry>&sm.disabled;</entry> + </row> + <row> + <entry><link linkend="language.operators.execution">backtick operator</link></entry> + <entry>&sm.disabled;</entry> + </row> + <row> + <entry><function>shell_exec</function>£¨ÔÚ¹¦ÄÜÉÏºÍ backticks º¯ÊýÏàͬ£©</entry> + <entry>&sm.disabled;</entry> + </row> + <row> + <entry><function>exec</function></entry> + <entry>ÄúÖ»ÄÜÔÚ <link linkend="ini.safe-mode-exec-dir">safe_mode_exec_dir</link> ÉèÖõÄĿ¼Ï½øÐÐÖ´ÐвÙ×÷¡£»ùÓÚijЩÔÒò£¬Ä¿Ç°²»ÄÜÔÚ¿ÉÖ´ÐжÔÏóµÄ·¾¶ÖÐʹÓà <literal>..</literal>¡£ + </entry> + </row> + <row> + <entry><function>system</function></entry> + <entry> ÄúÖ»ÄÜÔÚ <link linkend="ini.safe-mode-exec-dir">safe_mode_exec_dir</link> ÉèÖõÄĿ¼Ï½øÐÐÖ´ÐвÙ×÷¡£»ùÓÚijЩÔÒò£¬Ä¿Ç°²»ÄÜÔÚ¿ÉÖ´ÐжÔÏóµÄ·¾¶ÖÐʹÓà <literal>..</literal>¡£ - </entry> - </row> - <row> - <entry><function>popen</function></entry> - <entry> + </entry> + </row> + <row> + <entry><function>passthru</function></entry> + <entry> + ÄúÖ»ÄÜÔÚ <link linkend="ini.safe-mode-exec-dir">safe_mode_exec_dir</link> ÉèÖõÄĿ¼Ï½øÐÐÖ´ÐвÙ×÷¡£»ùÓÚijЩÔÒò£¬Ä¿Ç°²»ÄÜÔÚ¿ÉÖ´ÐжÔÏóµÄ·¾¶ÖÐʹÓà <literal>..</literal>¡£ + </entry> + </row> + <row> + <entry><function>popen</function></entry> + <entry> ÄúÖ»ÄÜÔÚ <link linkend="ini.safe-mode-exec-dir">safe_mode_exec_dir</link> ÉèÖõÄĿ¼Ï½øÐÐÖ´ÐвÙ×÷¡£»ùÓÚijЩÔÒò£¬Ä¿Ç°²»ÄÜÔÚ¿ÉÖ´ÐжÔÏóµÄ·¾¶ÖÐʹÓà <literal>..</literal>¡£ - </entry> - <!-- TODO: not sure. popen uses a completely different implementation - Don't know why, don't know whether it's behaving the same --> - </row> - <row> - <entry><function>mkdir</function></entry> - <entry>&sm.uidcheck.dir;</entry> - </row> - <row> - <entry><function>rmdir</function></entry> - <entry>&sm.uidcheck;</entry> - </row> - <row> - <entry><function>rename</function></entry> - <entry>&sm.uidcheck; &sm.uidcheck.dir;<!-- on the old name only, it seems. Is rename preventing moving files? --></entry> - </row> - <row> - <entry><function>unlink</function></entry> - <entry>&sm.uidcheck; &sm.uidcheck.dir;</entry> - </row> - <row> - <entry><function>copy</function></entry> - <entry>&sm.uidcheck; &sm.uidcheck.dir; (on - <parameter>source</parameter> and - <parameter>target</parameter>) </entry> - </row> - <row> - <entry><function>chgrp</function></entry> - <entry>&sm.uidcheck;</entry> - </row> - <row> - <entry><function>chown</function></entry> - <entry>&sm.uidcheck;</entry> - </row> - <row> - <entry><function>chmod</function></entry> - <entry>&sm.uidcheck; ÁíÍ⣬Äú²»ÄÜÉèÖà SUID¡¢SGID ºÍ sticky bits - </entry> - </row> - <row> - <entry><function>touch</function></entry> - <entry>&sm.uidcheck; &sm.uidcheck.dir;</entry> - </row> - <row> - <entry><function>symlink</function></entry> - <entry>&sm.uidcheck; &sm.uidcheck.dir; £¨×¢Ò⣺½ö²âÊÔ target£©</entry> - </row> - <row> - <entry><function>link</function></entry> - <entry>&sm.uidcheck; &sm.uidcheck.dir; £¨×¢Ò⣺½ö²âÊÔ target£©</entry> - </row> - <row> - <entry><function>getallheaders</function></entry> - <entry>ÔÚ°²È«Ä£Ê½Ï£¬ÒÔ¡°authorization¡±£¨Çø·Ö´óСд£©¿ªÍ·µÄÍ·ÐÅÏ¢½«²»»á±»·µ»Ø¡£¾¯¸æ£º<function>getallheaders</function> ÎÞ·¨ÔÚ aol-server ÏÂʵÏÖ£¡ - </entry> - </row> - <row> - <entry><function>header</function></entry> - <entry>ÔÚ°²È«Ä£Ê½Ï£¬Èç¹ûÄúÉèÖÃÁË <literal>WWW-Authenticate</literal>£¬µ±Ç°½Å±¾µÄ uid ½«±»Ìí¼Óµ½¸ÃÍ·ÐÅÏ¢µÄ <literal>realm</literal> ²¿·Ö¡£ - </entry> - </row> - <row> - <entry> - <function>highlight_file</function>, - <function>show_source</function> - </entry> - <entry> - &sm.uidcheck; &sm.uidcheck.dir; £¨×¢Ò⣬½öÔÚ 4.2.1 °æ±¾ºóÓÐЧ£© - </entry> - </row> - <row> - <entry> - <function>parse_ini_file</function> - </entry> - <entry> - &sm.uidcheck; &sm.uidcheck.dir; £¨×¢Ò⣬½öÔÚ 4.2.1 °æ±¾ºóÓÐЧ£© - </entry> - </row> - <row> - <entry>ÈκÎʹÓà - <filename>php4/main/fopen_wrappers.c</filename> µÄº¯Êý - </entry> - <entry>??</entry> - </row> - </tbody> - </tgroup> - </table> - </para> - </sect1> + </entry> + <!-- TODO: not sure. popen uses a completely different implementation + Don't know why, don't know whether it's behaving the same --> + </row> + <row> + <entry><function>mkdir</function></entry> + <entry>&sm.uidcheck.dir;</entry> + </row> + <row> + <entry><function>rmdir</function></entry> + <entry>&sm.uidcheck;</entry> + </row> + <row> + <entry><function>rename</function></entry> + <entry>&sm.uidcheck; &sm.uidcheck.dir;<!-- on the old name only, it seems. Is rename preventing moving files? --></entry> + </row> + <row> + <entry><function>unlink</function></entry> + <entry>&sm.uidcheck; &sm.uidcheck.dir;</entry> + </row> + <row> + <entry><function>copy</function></entry> + <entry>&sm.uidcheck; &sm.uidcheck.dir; (on + <parameter>source</parameter> and + <parameter>target</parameter>) </entry> + </row> + <row> + <entry><function>chgrp</function></entry> + <entry>&sm.uidcheck;</entry> + </row> + <row> + <entry><function>chown</function></entry> + <entry>&sm.uidcheck;</entry> + </row> + <row> + <entry><function>chmod</function></entry> + <entry>&sm.uidcheck; ÁíÍ⣬Äú²»ÄÜÉèÖà SUID¡¢SGID ºÍ sticky bits</entry> + </row> + <row> + <entry><function>touch</function></entry> + <entry>&sm.uidcheck; &sm.uidcheck.dir;</entry> + </row> + <row> + <entry><function>symlink</function></entry> + <entry>&sm.uidcheck; &sm.uidcheck.dir; £¨×¢Ò⣺½ö²âÊÔ target£©</entry> + </row> + <row> + <entry><function>link</function></entry> + <entry>&sm.uidcheck; &sm.uidcheck.dir; £¨×¢Ò⣺½ö²âÊÔ target£©</entry> + </row> + <row> + <entry><function>getallheaders</function></entry> + <entry>ÔÚ°²È«Ä£Ê½Ï£¬ÒÔ¡°authorization¡±£¨Çø·Ö´óСд£©¿ªÍ·µÄÍ·ÐÅÏ¢½«²»»á±»·µ»Ø¡£¾¯¸æ£º<function>getallheaders</function> ÎÞ·¨ÔÚ aol-server ÏÂʵÏÖ£¡ + </entry> + </row> + <row> + <entry><function>header</function></entry> + <entry>ÔÚ°²È«Ä£Ê½Ï£¬Èç¹ûÄúÉèÖÃÁË <literal>WWW-Authenticate</literal>£¬µ±Ç°½Å±¾µÄ uid ½«±»Ìí¼Óµ½¸ÃÍ·ÐÅÏ¢µÄ <literal>realm</literal> ²¿·Ö¡£</entry> + </row> + <row> + <entry> + <function>highlight_file</function>, + <function>show_source</function> + </entry> + <entry> + &sm.uidcheck; &sm.uidcheck.dir; £¨×¢Ò⣬½öÔÚ 4.2.1 °æ±¾ºóÓÐЧ£© + </entry> + </row> + <row> + <entry> + <function>parse_ini_file</function> + </entry> + <entry> + &sm.uidcheck; &sm.uidcheck.dir; £¨×¢Ò⣬½öÔÚ 4.2.1 °æ±¾ºóÓÐЧ£© + </entry> + </row> + <row> + <entry>ÈκÎʹÓà + <filename>php4/main/fopen_wrappers.c</filename> µÄº¯Êý + </entry> + <entry>??</entry> + </row> + </tbody> + </tgroup> + </table> + </para> + </sect1> - </chapter> +</chapter> <!-- Keep this comment at the end of the file Local variables: