Honor setgit bit on directories
authorBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 20 Jul 2011 20:10:07 +0000 (13:10 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 20 Jul 2011 21:07:13 +0000 (14:07 -0700)
commit9fd91daeef4df4e2bc66f54bb97c88225c6dd2c7
tree2df4c016c37cd9c56645fcf49100466c1e947932
parentfe0ed8f910c1e4288dc190546cfe98ecf545b547
Honor setgit bit on directories

Newly created files were always being created with the fsuid/fsgid
in the current users credentials.  This is correct except in the
case when the parent directory sets the 'setgit' bit.  In this
case according to posix the newly created file/directory should
inherit the gid of the parent directory.  Additionally, in the
case of a subdirectory it should also inherit the 'setgit' bit.

Finally, this commit performs a little cleanup of the vattr_t
initialization by moving it to a common helper function.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #262
module/zfs/zpl_inode.c