From 4b01cb254473ef95f99220b08a2d3e5f2e74ab11 Mon Sep 17 00:00:00 2001 From: Jamie Strandboge Date: Thu, 6 Feb 2014 15:15:48 -0500 Subject: [PATCH] Move os.chdir(old_cwd) to before the aa-exec call it remove the side-effect of the chdir to $HOME when using Xpra. Acked-By: Jamie Strandboge Acked-by: Steve Beattie --- utils/apparmor/sandbox.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/apparmor/sandbox.py b/utils/apparmor/sandbox.py index dc2d19151..51048f6ff 100644 --- a/utils/apparmor/sandbox.py +++ b/utils/apparmor/sandbox.py @@ -706,6 +706,7 @@ def run_xsandbox(command, opt): x.start() except Exception as e: error(e) + os.chdir(old_cwd) if not opt.read_path: opt.read_path = [] @@ -721,6 +722,5 @@ def run_xsandbox(command, opt): x.cleanup() raise x.cleanup() - os.chdir(old_cwd) return rc, report