Revision 405bffe2 test/ganeti.backend_unittest-runasroot.py
b/test/ganeti.backend_unittest-runasroot.py | ||
---|---|---|
51 | 51 |
tmpname = self._PrepareTest() |
52 | 52 |
|
53 | 53 |
os.chown(tmpname, 0, 0) |
54 |
(status, value) = backend._CommonRemoteCommandCheck(tmpname, None)
|
|
54 |
(status, value) = backend._CommonRestrictedCmdCheck(tmpname, None)
|
|
55 | 55 |
self.assertTrue(status) |
56 | 56 |
self.assertTrue(value) |
57 | 57 |
|
... | ... | |
68 | 68 |
self.assertFalse(uid == os.getuid() and gid == os.getgid()) |
69 | 69 |
os.chown(tmpname, uid, gid) |
70 | 70 |
|
71 |
(status, errmsg) = backend._CommonRemoteCommandCheck(tmpname, None)
|
|
71 |
(status, errmsg) = backend._CommonRestrictedCmdCheck(tmpname, None)
|
|
72 | 72 |
self.assertFalse(status) |
73 | 73 |
self.assertTrue("foobar' is not owned by " in errmsg) |
74 | 74 |
|
Also available in: Unified diff