From f78f8cfbdef22b25be4ffe1fae4a4cc404bfbf5c Mon Sep 17 00:00:00 2001 From: alpha Date: Mon, 5 Oct 2020 18:01:00 +0200 Subject: fix command test in jail_prober.py --- contrib/jail_prober.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/contrib/jail_prober.py b/contrib/jail_prober.py index 6f8e98b6a..892e28f79 100755 --- a/contrib/jail_prober.py +++ b/contrib/jail_prober.py @@ -114,7 +114,10 @@ def run_firejail(program, allArgs): print('Attempting to run %s in Firejail' % program) for arg in allArgs: print('Running with', arg) - subprocess.call(goodArgs) + #We are adding the argument in a copy of the actual list to avoid modify it now. + myargs=goodArgs.copy() + myargs.insert(-1,arg) + subprocess.call(myargs) ans = input('Did %s run correctly? [y]/n ' % program) if ans in ['n', 'N']: badArgs.append(arg) -- cgit v1.2.3-54-g00ecf From 869e5e749f958cbd70802da571b509f2fd50d335 Mon Sep 17 00:00:00 2001 From: alpha Date: Fri, 9 Oct 2020 08:21:25 +0200 Subject: jail_prober : first pass without any argument --- contrib/jail_prober.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/contrib/jail_prober.py b/contrib/jail_prober.py index 892e28f79..dad790b57 100755 --- a/contrib/jail_prober.py +++ b/contrib/jail_prober.py @@ -111,17 +111,22 @@ def run_firejail(program, allArgs): """ goodArgs = ['firejail', '--noprofile', program] badArgs = [] + allArgs.insert(0,"") print('Attempting to run %s in Firejail' % program) for arg in allArgs: - print('Running with', arg) + if arg: + print('Running with', arg) + else: + print('Running without profile') #We are adding the argument in a copy of the actual list to avoid modify it now. myargs=goodArgs.copy() - myargs.insert(-1,arg) + if arg: + myargs.insert(-1,arg) subprocess.call(myargs) ans = input('Did %s run correctly? [y]/n ' % program) if ans in ['n', 'N']: badArgs.append(arg) - else: + elif arg: goodArgs.insert(-1, arg) print('\n') # Don't include 'firejail', '--noprofile', or program name in arguments -- cgit v1.2.3-54-g00ecf