"Inherit Permissions" request for comments

Kyle Herbert kyleh at firstnetimpressions.com
Wed May 31 14:24:00 GMT 2000

** I don't think this made it to the list last night.  Forgive me if this is
a re-post.


   After review of the source code, "uid.c" seemed to me to be the right
place for inheriting the GID from the parent directory.  Only a few lines of
code below the bulk of my patch is a section of code devoted to implementing
the "force group" feature.  The process of forcing a group is almost
identical to the process of inheriting a group; the only difference being
that the forced group is statically defined while the inherited group is
dynamic to a parent directory.  Assuming that "uid.c" is not the right place
for this implementation, what would be the recommended location and would
moving it also apply to the "force group" implementation?

   My first attempt at patching the source code placed the implementation in
"dosmode.c" -- just as David suggested in a recent post.  It makes sense.
However, that patch was rendered ineffective by the call to
"become_gid(...)" in the function "become_user(...)" within the file
"uid.c".  I surmised from this that Samba managed group and user ownership
of files internally by switching group-and-user context before affecting the
files.  It made sense to me, so I tried following suit and it panned out.
Can anyone verify this supposition with a bit of history?  Am I off base?


Kyle Herbert
Information Technology Director
First 'Net' Impressions, LLC

More information about the samba-technical mailing list