mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-30 05:48:05 +00:00
mountpoints: don't re-create /dev/null
Signed-off-by: Andrew Vagin <avagin@virtuozzo.com> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
17c0461939
commit
66468976c4
@ -76,7 +76,6 @@ int main(int argc, char **argv)
|
||||
int fd, tmpfs_fd, have_bfmtm = 0;
|
||||
unsigned fs_cnt, fs_cnt_last = 0;
|
||||
struct ns_exec_args args;
|
||||
mode_t old_mask;
|
||||
pid_t pid = -1;
|
||||
|
||||
test_init(argc, argv);
|
||||
@ -266,17 +265,6 @@ done:
|
||||
"binfmt_misc", 0, "") == 0)
|
||||
have_bfmtm = 1;
|
||||
|
||||
unlink("/dev/null");
|
||||
/*
|
||||
* Clear umask first, create readable & writeable /dev/null,
|
||||
* and change it back. This is done to ensure that file mode
|
||||
* creation mask will not impede it to create file that grants
|
||||
* read and write permission to all users.
|
||||
*/
|
||||
old_mask = umask(0);
|
||||
mknod("/dev/null", 0777 | S_IFCHR, makedev(1, 3));
|
||||
umask(old_mask);
|
||||
|
||||
fd = open(MPTS_ROOT"/kernel/meminfo", O_RDONLY);
|
||||
if (fd == -1)
|
||||
return 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user