All of lore.kernel.org
 help / color / mirror / Atom feed
* CAP_LINUX_IMMUTABLE question
@ 2001-08-07 11:08 Sean Hunter
  2001-08-07 16:50 ` Andreas Dilger
  0 siblings, 1 reply; 3+ messages in thread
From: Sean Hunter @ 2001-08-07 11:08 UTC (permalink / raw)
  To: linux-kernel

Hi there

I am currently trying to tie down the capability bounding set on one of my
servers.  CAP_SYS_RAWIO and CAP_SYS_MODULE have been a great success (although
dropping CAP_SYS_RAWIO seems to prevent reading /proc/sys/kernel/cap-bound).

I now want to drop CAP_LINUX_IMMUTABLE, and have (I think) done that.  However,
it seems to make no difference to my ability to set or clear the immutable
attribute.  I tried this on ext2 and ext3 filesystems just to be on the safe
side.

[root@henry /boot]# lcap CAP_LINUX_IMMUTABLE
[root@henry /boot]# lsattr ./vmlinux-2.4.2-2smp
---i--------- ./vmlinux-2.4.2-2smp
[root@henry /boot]# chattr -i ./vmlinux-2.4.2-2smp
[root@henry /boot]# lsattr ./vmlinux-2.4.2-2smp
------------- ./vmlinux-2.4.2-2smp
[root@henry /boot]# chattr +i ./vmlinux-2.4.2-2smp
[root@henry /boot]# lsattr ./vmlinux-2.4.2-2smp
---i--------- ./vmlinux-2.4.2-2smp

I thought that giving up CAP_SYS_RAWIO may have forfeited my ability to drop
any further caps, so I rebooted and dropped CAP_SYS_MODULE and
CAP_LINUX_IMMUTABLE first, just to be on the safe side.  This made no visible
difference.

Am I doing anything obviously dumb?

Sean

^ permalink raw reply	[flat|nested] 3+ messages in thread
* CAP_LINUX_IMMUTABLE question
@ 2006-12-28 21:52 Aaron Cohen
  0 siblings, 0 replies; 3+ messages in thread
From: Aaron Cohen @ 2006-12-28 21:52 UTC (permalink / raw)
  To: LKML List

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-12-28 21:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-08-07 11:08 CAP_LINUX_IMMUTABLE question Sean Hunter
2001-08-07 16:50 ` Andreas Dilger
  -- strict thread matches above, loose matches on Subject: below --
2006-12-28 21:52 Aaron Cohen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.