lkml.org 
[lkml]   [2013]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectseteuid and /proc/<pid>/exe
Hello,

I have a user with uid=1000 that runs a process, let's say with pid 42.

If I do a readlink on /proc/42/exe from another process run by that
same user,
it reads the link correctly.
If root calls readlink on that same link, it works correctly.

The problem is that I have another process that is run by root, and
then calls
seteuid(1000). When it tries to read that link, it fails with
"permission denied".
I could just seteuid(0), read the link and seteuid(1000) again
(I checked it and it works) but I wonder if that's really the expected
behaviour.

If any of the effective, real and saved uid of the process have
permissions to read the link,
is it expected that only because they're different, then the permission
is denied?

Thanks,

--
Antonio Larrosa


\
 
 \ /
  Last update: 2013-01-10 19:21    [W:0.034 / U:0.496 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site