Messages in this thread | | | Date | Tue, 10 Aug 1999 15:52:04 +0100 (GMT) | From | Matthew Kirkwood <> | Subject | Re: More file flags |
| |
On Tue, 10 Aug 1999, Simon Richter wrote:
> I thought of creating executables that contain the necessary routines > and the secret key that are protected by a special file flag which > does the following: > > - The flag can be set by any user
Fair. There are reasons why we don't allow this at the moment, though they may be going away soon.
> - The owner may not change
chattr +i $FILE
> - The file can not be read > - The file can be executed by the owner > - The file can not be written to.
chmod 0100 $FILE
> - The file can be renamed by the owner, if the owner is not root. > - The file can be deleted by the owner, if the owner is not root
# if not root chown file_owner `dirname $FILE` chmod og-w `dirname $FILE`
# if root chattr +i `dirname $FILE`
> - If the flag is set while the file is open for writing, do not allow > further opening or reading, and let the write()s proceed.
You've already stated that the flag bans writing.
The second half of that really requires a revoke(2) call.
> The last rule is meant for upgrading the software: You ask (with your > passphrase) that the module appends the secret key to file X. It then > opens that file in append/exclusive mode, sets the flag, then writes > the key.
I thought these were executables?
> What do you think? Is this possible?
It's almost already done.
Matthew.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |