parent
ac3ff72032
commit
d259f0302f
|
|
@ -167,7 +167,7 @@ static int netns_exec(int argc, char **argv)
|
||||||
fprintf(stderr, "unshare failed: %s\n", strerror(errno));
|
fprintf(stderr, "unshare failed: %s\n", strerror(errno));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
/* Don't let any mounts propogate back to the parent */
|
/* Don't let any mounts propagate back to the parent */
|
||||||
if (mount("", "/", "none", MS_SLAVE | MS_REC, NULL)) {
|
if (mount("", "/", "none", MS_SLAVE | MS_REC, NULL)) {
|
||||||
fprintf(stderr, "\"mount --make-rslave /\" failed: %s\n",
|
fprintf(stderr, "\"mount --make-rslave /\" failed: %s\n",
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
|
|
@ -205,7 +205,7 @@ static int netns_exec(int argc, char **argv)
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If child failed, propogate status */
|
/* If child failed, propagate status */
|
||||||
if (WIFEXITED(status))
|
if (WIFEXITED(status))
|
||||||
exit(WEXITSTATUS(status));
|
exit(WEXITSTATUS(status));
|
||||||
|
|
||||||
|
|
@ -405,7 +405,7 @@ static int netns_add(int argc, char **argv)
|
||||||
/* Create the base netns directory if it doesn't exist */
|
/* Create the base netns directory if it doesn't exist */
|
||||||
mkdir(NETNS_RUN_DIR, S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH);
|
mkdir(NETNS_RUN_DIR, S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH);
|
||||||
|
|
||||||
/* Make it possible for network namespace mounts to propogate between
|
/* Make it possible for network namespace mounts to propagate between
|
||||||
* mount namespaces. This makes it likely that a unmounting a network
|
* mount namespaces. This makes it likely that a unmounting a network
|
||||||
* namespace file in one namespace will unmount the network namespace
|
* namespace file in one namespace will unmount the network namespace
|
||||||
* file in all namespaces allowing the network namespace to be freed
|
* file in all namespaces allowing the network namespace to be freed
|
||||||
|
|
|
||||||
|
|
@ -305,7 +305,7 @@ static int ipntable_modify(int cmd, int flags, int argc, char **argv)
|
||||||
if (!namep)
|
if (!namep)
|
||||||
missarg("NAME");
|
missarg("NAME");
|
||||||
if (!threshsp && !gc_intp && !parms_change) {
|
if (!threshsp && !gc_intp && !parms_change) {
|
||||||
fprintf(stderr, "Not enough information: changable attributes required.\n");
|
fprintf(stderr, "Not enough information: changeable attributes required.\n");
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue