lkml.org 
[lkml]   [2003]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectexecve setting capabilities incorrectly ?

Please cc me in replies.

quoting from message dated 1998/06 to this list from Andrew Morgan
Subject: Fwd: Re: Capabilities
...
[root@godzilla progs]# ./execcap cap_net_bind_service=i sleep 1000 &
[1] 600
[root@godzilla progs]# cat /proc/600/status
...
CapInh: 0000000000000400
CapPrm: 0000000000000400
CapEff: 0000000000000400

My corresponding output ends up with
CapInh: 0000000000000400
CapPrm: 00000000fffffeff
CapEff: 00000000fffffeff

I've tried in 2.4.18 and in 2.2.16, both give the same result so
I guess it's been this way for some time.

The caps seem to be set correctly by execcap but execve resets them.
Is this intentional?
If so, how is one now supposed to get the desired effects?


What's really weird (can someone explain this?) is that things
seem to work better under strace:
strace ./execcap = head <some file root has no permission to read>
=> permission denied
whereas without the strace it reads the file.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:32    [W:0.075 / U:0.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site