Skip to content

Commit

Permalink
check also open result of fdu
Browse files Browse the repository at this point in the history
  • Loading branch information
glensc committed Jul 21, 2018
1 parent e446872 commit eeb60b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nsenter1.c
Expand Up @@ -22,7 +22,7 @@ int main(int argc, char **argv) {
int fdi = open("/proc/1/ns/ipc", O_RDONLY);
int froot = open("/proc/1/root", O_RDONLY);

if (fdm == -1 || fdn == -1 || fdi == -1 || froot == -1) {
if (fdm == -1 || fdu == -1 || fdn == -1 || fdi == -1 || froot == -1) {
fprintf(stderr, "Failed to open /proc/1 files, are you root?\n");
exit(1);
}
Expand Down

0 comments on commit eeb60b7

Please sign in to comment.