bug-parted
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] link parted against glibc dynamically, everything else stati


From: Neal H Walfield
Subject: Re: [PATCH] link parted against glibc dynamically, everything else static
Date: Fri, 17 Aug 2001 22:41:03 +0200
User-agent: Mutt/1.3.18i

> The attached patch adds a configure flag that results in a parted
> binary that is dynamically linked against libc and statically against
> everything else.  parted currently uses NSS functionality
> (getlogin()), which uses dlopen.  When you dlopen a library that
> dlopens another in a totally static program it's a bit tricky (insert
> muck about the symbol tables and such).  nss_ldap does this, so if
> you're running nss_ldap you'll segfault.

The only reason that parted uses getlogin and, thereby, NSS is so that
it can call initgroups.  For parted, however, initgroups is useless: it
an extension designed for simplifying programs that do login services.
I.e. a program which runs as root and, when a user correctly
authenticats himself, calls initgroups to initialize the secondary
groups and follows that with a call to seteuid to assume the user's id
before forking a shell.  This is all that initgroups was ever intended
for.  It is not useful for much else, if fact, it really is restricted
to this use: this function _only_ ever succeeds for the super user.

Please, let us remove this cruft from parted.

Attachment: pgpxpLSzS21x9.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]