Dmitri Monakhov <dmonakhov@xxxxxxxxxx> writes: >> Are we sure that should_remove_suid() is not and never will used for >> directories? > This bits are meaningless for directory. Posix is quiet about this case. > Ok. Will do. My point is: it is improbable what some body(except me :) ) > want to set S_ISUID/S_ISGID bit for non regular files. But it is > technically possible and result in unexpected consequence. I don't know about the context, but SGID bits for directories are not magic, they mean the newly created files will inherit GID from the parent directory, and if the file is actually a subdirectory, it will also have SGID set. The same was also true WRT SUID bits on some systems. -- Krzysztof Halasa -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html