• Al Viro's avatar
    mknod: take sanity checks on mode into the very beginning · 8e4bfca1
    Al Viro authored
    Note that applying umask can't affect their results.  While
    that affects errno in cases like
    	mknod("/no_such_directory/a", 030000)
    yielding -EINVAL (due to impossible mode_t) instead of
    -ENOENT (due to inexistent directory), IMO that makes a lot
    more sense, POSIX allows to return either and any software
    that relies on getting -ENOENT instead of -EINVAL in that
    case deserves everything it gets.
    Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
    8e4bfca1
namei.c 93.5 KB