From cfe004465bef534b5fd2f12042f5a0487367b8a5 Mon Sep 17 00:00:00 2001 From: Jan Zarsky Date: Mon, 11 Mar 2019 09:59:24 +0100 Subject: [PATCH] Restore working directory In load_policy(), when the '-l' option is not set, working directory is not restored back after setting it to TEMPLATES_STORE. Fix this by calling chdir(). --- udica/policy.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/udica/policy.py b/udica/policy.py index 91357b1..b4168cd 100644 --- a/udica/policy.py +++ b/udica/policy.py @@ -196,3 +196,5 @@ def load_policy(opts): print('\nPlease load these modules using: \n# semodule -i ' + opts['ContainerName'] + '.cil ' + TEMPLATES_STORE + "/{" + templates + '}') else: print('\nPlease load these modules using: \n# semodule -i ' + opts['ContainerName'] + '.cil ' + TEMPLATES_STORE + "/" + templates + '') + + chdir(PWD)