[comp.unix.questions] can't set enforced file locking

decot@hpisod2.HP.COM (Dave Decot) (01/23/88)

On a SVID-conforming system, the chmod() system call silently refuses to set
the "enforced file locking" bit on a file whose group execute bit is clear and
whose user ID matches that of the invoking user, if the effective group ID
(or list of supplementary group IDs) of the calling process does not match
the group ID of the file.  That is:

   % touch foo
   % chgrp other foo
   % chmod g-x,g+s file
   % ls -l foo
   -rw-rw-r--   1 decot    other            0 Jan 22 18:47 foo
   % 

I would expect that if the group execute bit is off, I should be able to
set the enforced-file-locking bit (shared with the set-group-ID-on-execution
bit).

This is correct according to the SVID, because the set-group-ID on execution
bit must be cleared if chmod() is used by other than the owning group or the
superuser.

Is there any reason why this should not be changed so that this silent
clearing occurs only if the group execute bit is set?

Dave Decot
hpda!decot