lkml.org 
[lkml]   [2010]   [Nov]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Subjectprocfs doesnt honor cap_dac_override
Date
From
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.



\
 
 \ /
  Last update: 2010-11-05 23:37    [W:0.055 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site