diff options
author | 2016-03-01 07:58:02 -0500 | |
---|---|---|
committer | 2016-03-01 07:58:02 -0500 | |
commit | 4e17da02e2df8f8f4f3dda12ba590de432fc1b0c (patch) | |
tree | ada42011d1b79e269a6c357255272dbcbb7e7340 /src | |
parent | Merge pull request #340 from vn971/master (diff) | |
download | firejail-4e17da02e2df8f8f4f3dda12ba590de432fc1b0c.tar.gz firejail-4e17da02e2df8f8f4f3dda12ba590de432fc1b0c.tar.zst firejail-4e17da02e2df8f8f4f3dda12ba590de432fc1b0c.zip |
scp fixes
Diffstat (limited to 'src')
-rw-r--r-- | src/firejail/main.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/firejail/main.c b/src/firejail/main.c index 9e0be7bfa..31c58d8ae 100644 --- a/src/firejail/main.c +++ b/src/firejail/main.c | |||
@@ -560,7 +560,6 @@ int main(int argc, char **argv) { | |||
560 | int highest_errno = errno_highest_nr(); | 560 | int highest_errno = errno_highest_nr(); |
561 | #endif | 561 | #endif |
562 | 562 | ||
563 | |||
564 | // drop permissions by default and rise them when required | 563 | // drop permissions by default and rise them when required |
565 | EUID_INIT(); | 564 | EUID_INIT(); |
566 | EUID_USER(); | 565 | EUID_USER(); |
@@ -579,6 +578,10 @@ int main(int argc, char **argv) { | |||
579 | found = 1; | 578 | found = 1; |
580 | break; | 579 | break; |
581 | } | 580 | } |
581 | if (strcmp(argv[i], "--") == 0) | ||
582 | break; | ||
583 | if (strncmp(argv[i], "--", 2) != 0) | ||
584 | break; | ||
582 | } | 585 | } |
583 | 586 | ||
584 | if (found == 0) { | 587 | if (found == 0) { |
@@ -1475,6 +1478,9 @@ int main(int argc, char **argv) { | |||
1475 | if (strstr(argv[i + prog_index], "&&") || strstr(argv[i + prog_index], "||")) { | 1478 | if (strstr(argv[i + prog_index], "&&") || strstr(argv[i + prog_index], "||")) { |
1476 | sprintf(ptr1, "%s ", argv[i + prog_index]); | 1479 | sprintf(ptr1, "%s ", argv[i + prog_index]); |
1477 | } | 1480 | } |
1481 | else if (arg_command){ | ||
1482 | sprintf(ptr1, "%s ", argv[i + prog_index]); | ||
1483 | } | ||
1478 | else { | 1484 | else { |
1479 | sprintf(ptr1, "\"%s\" ", argv[i + prog_index]); | 1485 | sprintf(ptr1, "\"%s\" ", argv[i + prog_index]); |
1480 | } | 1486 | } |