diff options
Diffstat (limited to 'toys/other/nsenter.c')
-rw-r--r-- | toys/other/nsenter.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/toys/other/nsenter.c b/toys/other/nsenter.c index 13757280..78a9d91a 100644 --- a/toys/other/nsenter.c +++ b/toys/other/nsenter.c @@ -152,8 +152,7 @@ void unshare_main(void) filename = toybuf; } - if (setns(fd = xopen(filename, O_RDONLY), flags[i])) - perror_exit("setns"); + if (setns(fd = xopenro(filename), flags[i])) perror_exit("setns"); close(fd); } nsnames += strlen(nsnames)+1; |