next up previous contents
Next: options.php Up: 目錄 plugins Previous: 檔案比對   Contents

auth.php

  1. 設定管理認證檔位置在 /etc/squirrelmail/plugins/administrator-admins。
    [root@mail squirrelmail-1.4.8]# diff -wuN ./plugins/administrator/auth.php /var/www/squirrelmail/plugins/administrator/auth.php
    --- ./plugins/administrator/auth.php	2006-02-04 06:27:51.000000000 +0800
    +++ /var/www/squirrelmail/plugins/administrator/auth.php	2006-12-31 08:18:14.000000000 +0800
    @@ -37,11 +37,11 @@
             $auths = file(SM_PATH . 'plugins/administrator/admins');
             array_walk($auths, 'adm_array_trim');
             $auth = in_array($username, $auths);
    -    } else if (file_exists(SM_PATH . 'config/admins')) {
    -        $auths = file(SM_PATH . 'config/admins');
    +    } else if (file_exists('/etc/squirrelmail/plugins/administrator-admins')) {
    +        $auths = file('/etc/squirrelmail/plugins/administrator-admins');
             array_walk($auths, 'adm_array_trim');
             $auth = in_array($username, $auths);
    
  2. 設定設定檔位置在 /etc/squirrelmail/config.php。
    -    } else if (($adm_id = fileowner(SM_PATH . 'config/config.php')) &&
    +    } else if (($adm_id = fileowner('/etc/squirrelmail/config.php')) &&
                    function_exists('posix_getpwuid')) {
             $adm = posix_getpwuid( $adm_id );
             $auth = ($username == $adm['name']);
    



2016-03-11