mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-30 22:05:27 +00:00
utils/apparmor/sandbox.py: fix up arg validation for --with-xserver
This commit is contained in:
@@ -66,12 +66,13 @@ def parse_args(args=None, parser=None):
|
||||
(my_opt, my_args) = parser.parse_args()
|
||||
if my_opt.debug == True:
|
||||
apparmor.common.DEBUGGING = True
|
||||
if my_opt.withx and my_opt.xserver.lower() != 'xpra' and \
|
||||
my_opt.xserver.lower() != 'xpra3d' and \
|
||||
my_opt.xserver.lower() != 'xephyr':
|
||||
error("Invalid server '%s'. Use 'xpra', ''xpra3d', or 'xephyr'" % \
|
||||
my_opt.xserver)
|
||||
if my_opt.template == "default":
|
||||
if my_opt.withx:
|
||||
if my_opt.xserver.lower() != 'xpra' and \
|
||||
my_opt.xserver.lower() != 'xephyr':
|
||||
error("Invalid server '%s'. Use 'xpra' or 'xephyr'" % \
|
||||
my_opt.xserver)
|
||||
my_opt.template = "sandbox-x"
|
||||
else:
|
||||
my_opt.template = "sandbox"
|
||||
|
Reference in New Issue
Block a user