Tracing the syscalls, shows that both gnu and rust mknod do the same
mknodat() call, but gnu's mknod later does an fchmod:


gnu-mknod.strace:43336 execve("/usr/bin/mknod", ["mknod", "--mode", "0666", 
"null", "c", "1", "3"], 0x7ffe9cbf02c8 /* 25 vars */) = 0
gnu-mknod.strace:43336 mknodat(AT_FDCWD, "null", S_IFCHR|0666, makedev(0x1, 
0x3)) = 0
gnu-mknod.strace:43336 fchmodat2(AT_FDCWD, "null", 0666, AT_SYMLINK_NOFOLLOW) = 0

rust-mknod.strace:42748 execve("/usr/bin/mknod", ["mknod", "--mode", "0666", 
"null", "c", "1", "3"], 0x7ffe7b71bcf8 /* 25 vars */) = 0
rust-mknod.strace:42748 mknodat(AT_FDCWD, "null", S_IFCHR|0666, makedev(0x1, 
0x3)) = 0

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2116973

Title:
  mknod doesn't respect --mode argument

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/rust-coreutils/+bug/2116973/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to