lkml.org 
[lkml]   [1999]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Capabilities done right [diff against 2.3.1]
On Sat, 15 May 1999, Linus Torvalds wrote:
> On Fri, 14 May 1999, Pavel Machek wrote:
> > Next try with capabilities, this time against 2.3.1. Patch is completely
> I'm not entirely convinced. The thing with ELF notes is that they only
> work with ELF. That may sound obvious, and it is, but it makes me wonder
> whether it's the right way at all.
I quess I should mention that my version of *elf* headers isn't as tied
into elf. One could in theory add similiar extraction code into other
*binary* formats like a.out . The elf note extraction code is very
generic. the real work is done with:
int do_cap_kill(struct linux_binprm *bprm,void *buf,size_t bufsiz);
> I suspect that it would be cleaner to have capabilities be a name-space
> issue rather than an inode issue. For example, the one thing I've always
> wanted to do with symlinks is to have symlinks that can change the
> privileges of the lookup - it's complex and maybe not a good idea, but
> it's a more intriguing concept and works with shellscripts and other
> systems where you can't add ELF notes..
With binfmt_script the real executables are bash, perl, python, etc.
With them I don't think any binary cap header restrictions should be used.
I do think that new some shell builtin(s) might be nice.
Also for perl and python, someone should use swig on the libcap.

Anyway I disagree that any of it should go into 2.3.x until some other
issues get worked out. Pavels and my patch are different in some of their
details concerning binary cap headers. I'd like to see if we can resolve
some of them. I also think that prepare_binprm and a few other things need
fixing up before the cap system can be truely useful.

This is something that should also be debated.
int sys_setresuid_c(uid_t ruid,uid_t euid,uid_t suid);
new syscall same as sys_setresuid except it is guarentied not to change
caps through cap_emulate_setxuid. In theory setuid, setreuid,setresuid
with its cap_emulate_setxuid stuff could be replaced with a libc that used
only getresuid,setresuid_c,setcap,getcap so it really is the most general
syscall. Anyway I'll put a new kernel patch and a patch against
libcap1.92, by Tommorrow afternoon(today is the weekend) on my web place.
Anyway none of it is really ready; I'd like to hear more feedback from
people like Pavel, Morgan, Jeremy, other lkml subscribers, and of course
Linus Torvalds.

--
Any caps I mention are *derived* from a withdrawn draft posix document.
See http://www.millenniumproductsllc.com/sjp/ for more info.


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

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