2006-12-28 21:52:27

by Aaron Cohen

[permalink] [raw]
Subject: CAP_LINUX_IMMUTABLE question

CAP_LINUX_IMMUTABLE currently makes it impossible both to chattr +i or
chattr -i.

I think it would be convenient if there was someone to make it only
illegal for chattr -i. So that I could still make files unchangeable,
while not allowing myself to ever make them changeable again without
the capability.

I'm currently using CAP_LINUX_IMMUTABLE (along with CAP_SYS_RAWIO and
CAP_SYS_MODULE) to make a poor-man's readonly bootable USB key for USB
drives that don't have a physical R/W switch. (The priviledges are
dropped in my initscripts).

The only problem is that such a USB key isn't able to make a copy of
itself because it can't remove the mutability of files which is a
little inconvenient. :)

I doubt it would be possible to change the semantics for
CAP_LINUX_IMMUTABLE but would it be stupid of me to try to add a
CAP_LINUX_MUTABLE flag that does what I want?

Thanks,
Aaron