Re: Bug in mkdir(2)?
Steve McIntyre <firstname.lastname@example.org> writes:
I find this difficult to believe, but I can't find any documentation to
say one way or the other. mkdir(2) takes a mode but ignores the
higher-order bits (e.g. the sticky bit). The following (simple) source
This is normal, I think. do_mkdir() in fs/namei.c in the kernel
contains the following fragment
mode &= 0777 & ~current->fs->umask;
which sets all the mode bits to 0 except the low-order ones. Thus, it
seems to me that this is expected behavior.