From ba2518a60e795303bec5d5257ed00e18abe4db52 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 4 Feb 2010 06:21:36 +0000 Subject: [PATCH] fixed not working domain config user login --- filemanager/cli.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/filemanager/cli.php b/filemanager/cli.php index f3ec304e8a..7d8acd2d70 100755 --- a/filemanager/cli.php +++ b/filemanager/cli.php @@ -210,6 +210,7 @@ switch($cmd) usage(); } load_wrapper($url=$argv[0]); + if($argc > 1 && !egw_vfs::$is_root) { die("You need to be root to do that!\n"); @@ -224,7 +225,7 @@ switch($cmd) } elseif ($fstab === false) { - echo "URL '$url' not found or permission denied (are your root?)!\n"; + echo "URL '$url' not found or permission denied (are you root?)!\n"; } else { @@ -434,7 +435,7 @@ switch($cmd) function load_wrapper($url) { $scheme = parse_url($url,PHP_URL_SCHEME); - + if (!in_array($scheme,stream_get_wrappers())) { switch($scheme) @@ -503,8 +504,8 @@ function load_egw($user,$passwd,$domain='default') if ($user == 'root_'.$GLOBALS['egw_info']['server']['header_admin_user'] && _check_pw($GLOBALS['egw_info']['server']['header_admin_password'],$passwd) || - $user == 'root_'.$GLOBALS['egw_domain'][$_GET['domain']]['config_user'] && - _check_pw($GLOBALS['egw_domain'][$_GET['domain']]['config_passwd'],$passwd)) + $user == 'root_'.$GLOBALS['egw_domain'][$domain]['config_user'] && + _check_pw($GLOBALS['egw_domain'][$domain]['config_passwd'],$passwd)) { echo "\nRoot access granted!\n"; egw_vfs::$is_root = true;