mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-09 03:35:20 +00:00
Merge pull request #2078 from tych0/usernsexec-exit-status
fix up lxc-usernsexec's exit status
This commit is contained in:
commit
6ddb17ff99
@ -71,7 +71,6 @@ static void usage(const char *name)
|
|||||||
printf(" Note: This program uses newuidmap(2) and newgidmap(2).\n");
|
printf(" Note: This program uses newuidmap(2) and newgidmap(2).\n");
|
||||||
printf(" As such, /etc/subuid and /etc/subgid must grant the\n");
|
printf(" As such, /etc/subuid and /etc/subgid must grant the\n");
|
||||||
printf(" calling user permission to use the mapped ranges\n");
|
printf(" calling user permission to use the mapped ranges\n");
|
||||||
exit(EXIT_SUCCESS);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void opentty(const char * tty, int which) {
|
static void opentty(const char * tty, int which) {
|
||||||
@ -300,10 +299,18 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
while ((c = getopt(argc, argv, "m:h")) != EOF) {
|
while ((c = getopt(argc, argv, "m:h")) != EOF) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 'm': if (parse_map(optarg)) usage(argv[0]); break;
|
case 'm':
|
||||||
|
if (parse_map(optarg)) {
|
||||||
|
usage(argv[0]);
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
break;
|
||||||
case 'h':
|
case 'h':
|
||||||
|
usage(argv[0]);
|
||||||
|
exit(EXIT_SUCCESS);
|
||||||
default:
|
default:
|
||||||
usage(argv[0]);
|
usage(argv[0]);
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user