From ae8f570dc199dbe6277a26fe93d5624c0f31c8da Mon Sep 17 00:00:00 2001 From: Oskari Timperi Date: Tue, 26 Oct 2010 16:15:53 +0300 Subject: [PATCH] Changes: Test case testing that invoker specific credentials are no passed to launched app --- tests/TestScripts/test-security.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tests/TestScripts/test-security.py b/tests/TestScripts/test-security.py index 6ee73ad..b53fc1c 100644 --- a/tests/TestScripts/test-security.py +++ b/tests/TestScripts/test-security.py @@ -268,6 +268,29 @@ class SecurityTests(unittest.TestCase): self.assert_(creds2[0] != creds2[1], 'creds are same when applauncherd is running') + def test_006(self): + """ + Test that invoker specific credentials are not passed on to + the launched application. + """ + + # credentials that invoker should have, but shouldn't be + # passed to the application + creds_to_filter = ['applauncherd-launcher::access', + 'applauncherd-invoker::applauncherd-invoker'] + + # launch an application with and without a manifest + creds1 = launch_and_get_creds('/usr/bin/fala_ft_creds1') + creds2 = launch_and_get_creds('/usr/bin/fala_ft_hello') + + # see that the above creds are not included + for cred in creds_to_filter: + self.assert_(cred not in creds1, + '%s was passed to fala_ft_creds1' % cred) + + self.assert_(cred not in creds2, + '%s was passed to fala_ft_hello' % cred) + # main if __name__ == '__main__':