setattr_should_drop_sgid(9)
π setattr_should_drop_sgid π
okay bestie, welcome to this page from the Kernel API Manual β it's all about setattr_should_drop_sgid, and yes, the name is a mouthful but we move. π
π NAME π
setattr_should_drop_sgid β determine whether the setgid bit needs to be removed. iconic little helper behavior, honestly.
β¨ SYNOPSIS β¨
int setattr_should_drop_sgid (struct mnt_idmap *idmap , const struct inode *inode );
π¦ ARGUMENTS π¦
idmapβ theidmapof the mount theinodewas found from.inodeβ theinodeto check.
πΈ DESCRIPTION πΈ
so like, this function determines whether the setgid bit needs to be removed. that's the whole vibe check. π
for backwards compatibility, we require the setgid bit to be removed unconditionally if S_IXGRP is set. no cap.
otherwise, we have the exact same requirements as setattr_prepare and setattr_copy. periodt.
π₯ RETURN π₯
returns ATTR_KILL_SGID if the setgid bit needs to be removed, and 0 otherwise. simple, cute, done. β¨
π«Ά SEE ALSO π«Ά
Kernel file ./fs/attr.c: setattr_should_drop_suidgid(9), chown_ok(9), chgrp_ok(9), setattr_prepare(9), inode_newsize_ok(9), setattr_copy_mgtime(9), setattr_copy(9), notify_change(9).
that's the whole page, bestie π β brought to you by ./fs, October 2026, for setattr_should_drop_sgid(9). slay! π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms