Fix using --dev unprivileged (without --proc)

If using --dev we need a special workaround to make it possible to
mount devpts. Unfortunately the workaround was erronously enabled
if you added --proc, not --dev. This moves this check to the right
place.

To test, try:
 ./bwrap  --ro-bind / /  --dev /dev true

Closes: #48
Approved by: cgwalters
This commit is contained in:
Alexander Larsson
2016-05-06 12:29:40 +02:00
committed by Colin Walters (automation)
parent 8a53e3a664
commit 055f58c245

View File

@@ -939,7 +939,6 @@ parse_args (int *argcp,
op = setup_op_new (SETUP_MOUNT_PROC);
op->dest = argv[1];
opt_needs_devpts = TRUE;
argv += 1;
argc -= 1;
@@ -978,6 +977,7 @@ parse_args (int *argcp,
op = setup_op_new (SETUP_MOUNT_DEV);
op->dest = argv[1];
opt_needs_devpts = TRUE;
argv += 1;
argc -= 1;