[3208] in bugtraq
Re: libresolv+ bug
daemon@ATHENA.MIT.EDU (Don Lewis)
Mon Aug 19 13:54:36 1996
Date: Mon, 19 Aug 1996 01:12:08 -0700
Reply-To: Bugtraq List <BUGTRAQ@NETSPACE.ORG>
From: Don Lewis <Don.Lewis@tsc.tdk.com>
To: Multiple recipients of list BUGTRAQ <BUGTRAQ@NETSPACE.ORG>
In-Reply-To: Casper Dik <casper@holland.Sun.COM> "Re: libresolv+ bug" (Aug 19,
9:19am)
On Aug 19, 9:19am, Casper Dik wrote:
} Subject: Re: libresolv+ bug
[someone wrote]
} >The better solution is probably to do things such as ld.so does, and only
} >remove the variables if it is a suid or sgid program, although removing
} >support for them totally works too :).
} Unfortunately, there's a big difference between when ld.so gets called
} first and when your routine gets called first. ld.so can have a notion of
} whether a program was set-uid, as it is called at program start.
} Library functions, on the other hand, are called possibly after a program
} may have altered its uids/gids. (E.g., it may have set all its uids to zero)
You can't count on ld.so either, because the program may have been
statically linked.
} You could, of course, bracket all such environment variable use with
} seteuid()/setegid() in the library, but that isn't fullproof.
Especially since you have to track all these down.
--- Truck