mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-10 22:37:12 +00:00
test-sogo-tool.py: Use sudo instead of su -
This commit is contained in:
1 parent
8d9cfdb3b4
commit
1e4f737a7d
1 file changed
+1
-1
@@ -32,7 +32,7 @@ class sogoToolTest(unittest.TestCase):
|
||||
self.assertEqual(os.getuid(), 0, "this test must run as root...")
|
||||
|
||||
os.chown(self.backupdir, uid, gid)
|
||||
status = os.system("su - %s -c \"(cd %s && %s backup . ALL >/dev/null 2>&1)\""
|
||||
status = os.system("sudo -u %s bash -c \"(cd %s && %s backup . ALL >/dev/null 2>&1)\""
|
||||
% (sogo_user, self.backupdir, sogo_tool_path))
|
||||
|
||||
rc=os.WEXITSTATUS(status)
|
||||
|
||||
Reference in new issue
Block a user