Whamcloud - gitweb
mke2fs: fix permissions setting with "mke2fs -d /path/files"
authorTheodore Ts'o <tytso@mit.edu>
Sat, 7 Mar 2020 17:35:48 +0000 (12:35 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 7 Mar 2020 17:42:39 +0000 (12:42 -0500)
commitf106b01c98d7abc12af39aad4024f17ffa14dc06
tree3b4294e3c1eebf6e352b750d15842e5d5fb4c1b0
parent947315c86645e3ac3e814a49a7e7ab4b3498f64b
mke2fs: fix permissions setting with "mke2fs -d /path/files"

Set the directory for directories in cases where the owner permissions
is not rwx.  This was reported[1] by Robert Yang but we are using a
different approach to fixing the issue.

[1] https://lore.kernel.org/r/1582542522-97508-1-git-send-email-liezhi.yang@windriver.com

Also set the permissions in a more portable way by making a
distinction between the host OS's permissions stats and Linux's
permissions.  We still assume the low 12 bits are the historical Unix
assignments, but we don't assume ST_IFMT bits are the same as Linux's.

Reported-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/create_inode.c