posix functions can be disabled or unavailable
authortokul <tokul@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 4 Oct 2004 16:09:03 +0000 (16:09 +0000)
committertokul <tokul@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 4 Oct 2004 16:09:03 +0000 (16:09 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@8146 7612ce4b-ef26-0410-bec9-ea0150e637f0

plugins/administrator/auth.php

index c32ccbe738715614e14dd065559ede84851406e5..120a3f5214d6e4d3a77866e64a1ffa00932042f7 100644 (file)
@@ -36,7 +36,8 @@ function adm_check_user() {
     } else if (file_exists(SM_PATH . 'config/admins')) {
         $auths = file(SM_PATH . 'config/admins');
         $auth = in_array("$username\n", $auths);
-    } else if ($adm_id = fileowner(SM_PATH . 'config/config.php')) {
+    } else if ($adm_id = fileowner(SM_PATH . 'config/config.php') &&
+               function_exists('posix_getpwuid')) {
         $adm = posix_getpwuid( $adm_id );
         $auth = ($username == $adm['name']);
     } else {