aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Fred Barclay <Fred-Barclay@users.noreply.github.com>2020-10-10 11:10:45 -0500
committerLibravatar GitHub <noreply@github.com>2020-10-10 11:10:45 -0500
commit98f98fe5450deaff3ee586483231e1a6816470c3 (patch)
tree7ebb0d9422ebebb4b42655110d0d96692ac28b3c
parentbuild: add -fPIE to LDFLAGS (diff)
parentjail_prober : first pass without any argument (diff)
downloadfirejail-98f98fe5450deaff3ee586483231e1a6816470c3.tar.gz
firejail-98f98fe5450deaff3ee586483231e1a6816470c3.tar.zst
firejail-98f98fe5450deaff3ee586483231e1a6816470c3.zip
Merge pull request #3653 from briaeros/master
fix command test in jail_prober.py
-rwxr-xr-xcontrib/jail_prober.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/contrib/jail_prober.py b/contrib/jail_prober.py
index 6f8e98b6a..dad790b57 100755
--- a/contrib/jail_prober.py
+++ b/contrib/jail_prober.py
@@ -111,14 +111,22 @@ def run_firejail(program, allArgs):
111 """ 111 """
112 goodArgs = ['firejail', '--noprofile', program] 112 goodArgs = ['firejail', '--noprofile', program]
113 badArgs = [] 113 badArgs = []
114 allArgs.insert(0,"")
114 print('Attempting to run %s in Firejail' % program) 115 print('Attempting to run %s in Firejail' % program)
115 for arg in allArgs: 116 for arg in allArgs:
116 print('Running with', arg) 117 if arg:
117 subprocess.call(goodArgs) 118 print('Running with', arg)
119 else:
120 print('Running without profile')
121 #We are adding the argument in a copy of the actual list to avoid modify it now.
122 myargs=goodArgs.copy()
123 if arg:
124 myargs.insert(-1,arg)
125 subprocess.call(myargs)
118 ans = input('Did %s run correctly? [y]/n ' % program) 126 ans = input('Did %s run correctly? [y]/n ' % program)
119 if ans in ['n', 'N']: 127 if ans in ['n', 'N']:
120 badArgs.append(arg) 128 badArgs.append(arg)
121 else: 129 elif arg:
122 goodArgs.insert(-1, arg) 130 goodArgs.insert(-1, arg)
123 print('\n') 131 print('\n')
124 # Don't include 'firejail', '--noprofile', or program name in arguments 132 # Don't include 'firejail', '--noprofile', or program name in arguments