Subject: chflags(2) & user settable attributes
To: None <tech-kern@netbsd.org>
From: Jaromir Dolecek <dolecek@ics.muni.cz>
List: tech-kern
Date: 05/02/2000 23:59:09
Hi,
according to chflags(2):

"""
     The SF_ARCHIVED, SF_IMMUTABLE, and SF_APPEND flags may only be set or un-
     set by the super-user.  Attempts by the non-super-user to set the super-
     user only flags are silently ignored.  
"""

At least ffs returns EPERM if user attempts to set super-user settable
flags (see ffs_vnops.c: 367-372). Who is right here ? Shouldn't
ffs just return 0 in that case instead of EPERM ? SUS doesn't
mention chflags(2) at all.

This inconsistency is the cause of bin/9990 & bin/8439 (msdosfs
sets flag SF_ARCHIVED in msdosfs_setattr()/getattr() and this
is causing problems if moving "archived" files/directories).

Jaromir
-- 
Jaromir Dolecek <dolecek@ics.muni.cz>	http://www.ics.muni.cz/~dolecek/
-------------------------------------------------------------------------
It is better never to have been born.  But who among us has such luck?
One in a million, perhaps.