[lkml]   [2009]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectEUID != root + EGID = root, and CAP_SETGID
Hi guys,

Currently, if a process is started with EUID which is non-root, and EGID
which IS root (for example by set-group-ID file permission + file group
owner "root", or an account in /etc/passwd with group=0), then the
processes is not granted CAP_SETGID.

As a result, such a process cannot change its EGID to an arbitrary one,
even though the current EGID is the super-user "root" one. Therefore,
such a process cannot easily drop its EGID "root" privileges to non-root
ones, for security reasons.

This is not the case if the process starts with EUID=0. Then the
processes is granted *both* CAP_SETUID and CAP_SETGID.

Is this an intended behavior? Shouldn't a process which is started with
EGID=0 get CAP_SETGID too?

Thank you.

Best regads,
Ivan Zahariev

P.S. For more detailed info:

 \ /
  Last update: 2009-12-11 12:35    [W:0.051 / U:1.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site