diff options
author | 2020-10-09 08:21:25 +0200 | |
---|---|---|
committer | 2020-10-09 08:21:25 +0200 | |
commit | 869e5e749f958cbd70802da571b509f2fd50d335 (patch) | |
tree | 2085f55ff8557943a30b6e90310244ad47d6df48 | |
parent | fix command test in jail_prober.py (diff) | |
download | firejail-869e5e749f958cbd70802da571b509f2fd50d335.tar.gz firejail-869e5e749f958cbd70802da571b509f2fd50d335.tar.zst firejail-869e5e749f958cbd70802da571b509f2fd50d335.zip |
jail_prober : first pass without any argument
-rwxr-xr-x | contrib/jail_prober.py | 11 |
1 files 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): | |||
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: |
118 | print('Running with', arg) | ||
119 | else: | ||
120 | print('Running without profile') | ||
117 | #We are adding the argument in a copy of the actual list to avoid modify it now. | 121 | #We are adding the argument in a copy of the actual list to avoid modify it now. |
118 | myargs=goodArgs.copy() | 122 | myargs=goodArgs.copy() |
119 | myargs.insert(-1,arg) | 123 | if arg: |
124 | myargs.insert(-1,arg) | ||
120 | subprocess.call(myargs) | 125 | subprocess.call(myargs) |
121 | ans = input('Did %s run correctly? [y]/n ' % program) | 126 | ans = input('Did %s run correctly? [y]/n ' % program) |
122 | if ans in ['n', 'N']: | 127 | if ans in ['n', 'N']: |
123 | badArgs.append(arg) | 128 | badArgs.append(arg) |
124 | else: | 129 | elif arg: |
125 | goodArgs.insert(-1, arg) | 130 | goodArgs.insert(-1, arg) |
126 | print('\n') | 131 | print('\n') |
127 | # Don't include 'firejail', '--noprofile', or program name in arguments | 132 | # Don't include 'firejail', '--noprofile', or program name in arguments |