|
|
@ -1,5 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
import getpass
|
|
|
|
|
|
|
|
import os
|
|
|
|
import os
|
|
|
|
|
|
|
|
|
|
|
|
import mitogen
|
|
|
|
import mitogen
|
|
|
@ -67,7 +66,7 @@ class SuTest(testlib.DockerMixin, testlib.TestCase):
|
|
|
|
password='has_sudo_password',
|
|
|
|
password='has_sudo_password',
|
|
|
|
)
|
|
|
|
)
|
|
|
|
context = self.router.su(via=ssh, password='rootpassword')
|
|
|
|
context = self.router.su(via=ssh, password='rootpassword')
|
|
|
|
self.assertEquals('root', context.call(getpass.getuser))
|
|
|
|
self.assertEquals(0, context.call(os.getuid))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
if __name__ == '__main__':
|
|
|
|