mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* procfs doesnt honor cap_dac_override
@ 2010-11-05 22:33 abirvalg
  0 siblings, 0 replies; only message in thread
From: abirvalg @ 2010-11-05 22:33 UTC (permalink / raw)
  To: linux-kernel

We have a folder /proc/1/fd which contains symlinks.
A superuser can do readlink() on those symlinks.
I expected that a non-root process with cap_dac_override capability set to  
EP could also readlink() those symlinks in /proc/1/fd, but alas  
"Permission denied".
Just to make sure that my process isn't the culprit, I ran it as a regular  
user with UID=1000, I set cap_dac_override=ep and navigated to /root  
folder (which is readable only by root) and did readlink() there. It  
worked. (/root folder is on ext4.)
Bottom line: procfs doesnt allow readlink() on certain symlinks owned by  
root even with cap_dac_override set.

Is this an expected behaviour or is this a bug?
Cheers.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-11-05 22:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-05 22:33 procfs doesnt honor cap_dac_override abirvalg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®