* Question to directory setgid bit FS implementation details
@ 2011-10-25 8:55 Markus Kolb
2011-10-25 9:19 ` Valdis.Kletnieks
0 siblings, 1 reply; 3+ messages in thread
From: Markus Kolb @ 2011-10-25 8:55 UTC (permalink / raw)
To: linux-kernel
Hello,
can you please explain in brief how the creation of files
in directories with setgid bit set is implemented in
filesystems.
I'd like to know this for a ext2/3/4 fs, jfs and nfs v3/4
if there are essential differences.
Which source part is responsible for setting the group on
the new file?
Is the effective group of the process changed before creating
the file?
Is there any sync for thread safety during the change of
process group?
Where can I find this sync in source?
Or how is this implemented that the file gets the same group
like the parent directory?
Many thanks
Markus
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Question to directory setgid bit FS implementation details
2011-10-25 8:55 Question to directory setgid bit FS implementation details Markus Kolb
@ 2011-10-25 9:19 ` Valdis.Kletnieks
2011-10-25 11:57 ` Markus Kolb
0 siblings, 1 reply; 3+ messages in thread
From: Valdis.Kletnieks @ 2011-10-25 9:19 UTC (permalink / raw)
To: Markus Kolb; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 259 bytes --]
On Tue, 25 Oct 2011 10:55:55 +0200, Markus Kolb said:
> can you please explain in brief how the creation of files
> in directories with setgid bit set is implemented in
> filesystems.
Look in fs/inode.c, function inode_init_owner(). All of 8 lines of code.
[-- Attachment #2: Type: application/pgp-signature, Size: 227 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Question to directory setgid bit FS implementation details
2011-10-25 9:19 ` Valdis.Kletnieks
@ 2011-10-25 11:57 ` Markus Kolb
0 siblings, 0 replies; 3+ messages in thread
From: Markus Kolb @ 2011-10-25 11:57 UTC (permalink / raw)
To: linux-kernel; +Cc: Valdis.Kletnieks
On Tue, 25 Oct 2011 05:19:24 -0400, Valdis.Kletnieks@vt.edu wrote:
> On Tue, 25 Oct 2011 10:55:55 +0200, Markus Kolb said:
>
>> can you please explain in brief how the creation of files
>> in directories with setgid bit set is implemented in
>> filesystems.
>
> Look in fs/inode.c, function inode_init_owner(). All of 8 lines of
> code.
Ok.
Looks for me that there are only changes in data structs.
To be on the safe side can you confirm that there should be no call
inside the kernel code to change the effective group of a process
which creates a file in a directory with setgid-bit set?!
Thanks
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-10-25 11:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-25 8:55 Question to directory setgid bit FS implementation details Markus Kolb
2011-10-25 9:19 ` Valdis.Kletnieks
2011-10-25 11:57 ` Markus Kolb
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®