Linux-kernel mailing list archive 1999-20,: Re: Capabilities done right [diff against 2.3.1]

# Re: Capabilities done right [diff against 2.3.1]

Pavel Machek (pavel@atrey.karlin.mff.cuni.cz)
Thu, 20 May 1999 12:43:50 +0200

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Wanderer: "Capabilities, wish list, and flame bait"
- Previous message: Peter Enderborg: "Re: wishlist for 2.3.x"

Hi!

> > I just came up with a random thought ---- and I'd need to do more
> > investigating about the ELF format to make sure this is actually doable,
> > but I believe we can control the order in which constructurs get run,
> > yes?
> >
> > So why not simply put the code which drops the privileges in a
> > constructor which is engineered to be run first? If the way that
> > constructor is setup uses a stylized code can be easily found by a
> > setcap or checkcap program (i.e., give the constructor a standard name,
> > and store the capability restriction in a standard variable referenced
> > by the constructor), then you can get the ability to query/set the
> > capabilities, but it's done in such a way which doesn't require any
> > special kernel hacks to enable the feature.
>
> We also might do it in the dynamic linker, which is `the very first
> constructor'.

Unfortunately:

* there are static executables out there.

* I'm afraid that people around dynamic linker would simply tell me to
put it into kernel

* there are 2 different dynamic linkers (libc5 a glibc), but there's
only one kernel.

I think that it is better to put into kernel than to put into dynamic
loader; which is in turn better than having it nowhere at all.

Pavel

    --
    The best software in life is free (not shareware)!		Pavel
    GCM d? s-: !g p?:+ au- a--@ w+ v- C++@ UL+++ L++ N++ E++ W--- M- Y- R+

    -
    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/

- Next message: Wanderer: "Capabilities, wish list, and flame bait"
- Previous message: Peter Enderborg: "Re: wishlist for 2.3.x"