home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.protocols.appletalk
- Path: sparky!uunet!cs.utexas.edu!torn!watserv2.uwaterloo.ca!watdragon.uwaterloo.ca!jmsellen
- From: jmsellen@watdragon.uwaterloo.ca
- Subject: cap60/aufs: permissions in drop folders question
- Message-ID: <BtK4vC.L02@watdragon.uwaterloo.ca>
- Organization: DCS Software Activists Squad
- Date: Tue, 25 Aug 1992 20:57:12 GMT
- Lines: 40
-
- Given a directory that is mode 733, owner "A", group "1", an arbitrary
- user can use aufs to drop a file there. With the current code, if the
- user is a member of group "1", then the file gets created mode 777.
- If the user is not a member of group "1", then the file gets created
- mode 733 (i.e. the same mode as the directory). This means that the
- owner of the directory is unable to read the file, no one else can
- read the directory to discover the file is there, so it becomes just
- junk to be removed.
-
- In applications/aufs/afpos.c there is this:
-
- private int
- filemode(mode, uid, gid)
- int mode, uid, gid;
- {
- int mo = mode & 0777; /* convert st_mode to mode */
- if (uid != usruid) {
- /* check for conditions that would mean drop folder for us */
- /* (but, don't accept a drop folder on basis of group that is */
- /* world viewable even though it really is a drop folder for us) */
- if ((mo & 04) == 0 && (mo & 040) == 0 && OSInGroup(gid))
- mo |= 0666; /* let everyone else read/write */
- /* We need to do this because the poor person who get's the file */
- /* can't do anything with it otherwise */
- }
- return(mo);
- }
-
- which is what determines the mode. I think I think that the clause
- && OSInGroup(gid)
- should be removed. Perhaps if there is a group match, then the permissions
- for "other" should be curtailed? Perhaps there should be a test for
- BSD group inheritence semantics, in which case the file gets created
- with the group of the directory anyway.
-
- Opinions??
-
- John Sellens
- University of Waterloo
- jmsellens@watdragon.uwaterloo.ca
-