mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: abirvalg@lavabit.com
To: linux-kernel@vger.kernel.org
Subject: procfs doesnt honor cap_dac_override
Date: Fri, 05 Nov 2010 18:33:45 -0400	[thread overview]
Message-ID: <op.vlpyahbg25uvhe@wwwwww-701sd> (raw)

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.


                 reply	other threads:[~2010-11-05 22:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=op.vlpyahbg25uvhe@wwwwww-701sd \
    --to=abirvalg@lavabit.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®