This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: nscd paranoia mode restart functionality
- From: Florian Weimer <fweimer at redhat dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Sun, 01 Mar 2015 23:59:08 +0100
- Subject: Re: nscd paranoia mode restart functionality
- Authentication-results: sourceware.org; auth=none
- References: <54EDC3FB dot 6040007 at redhat dot com> <20150301193225 dot GD19363 at vapier>
On 03/01/2015 08:32 PM, Mike Frysinger wrote:
> On 25 Feb 2015 13:45, Florian Weimer wrote:
>> Does anybody know what's going on in the restart function in
>> nscd/connections.c?
>>
>> /* First determine the parameters. We do not use the parameters
>> passed to main() since in case nscd is started by running the
>> dynamic linker this will not work. Yes, this is not the usual
>> case but nscd is part of glibc and we occasionally do this. */
> i think the comments are misleading. it's not that the argc/argv main() sees
> can't be used, it's that the full argc/argv that the process was launched with
> are unavailable. so if you ran nscd:
> ./elf/ld.so --library-path "$PWD:$PWD/nptl" ./nscd/nscd ...
>
> main would only see the ..., but the restart needs the full ./elf/ld.so ...
> stuff to fully re-exec itself. it can't simply run `nscd` from $PATH.
Yeah, I figured that out eventually (see my other message).
I will include a comment tweak in an upcoming commit because I have to
touch restart function anyway.
--
Florian Weimer / Red Hat Product Security