nscd paranoia mode restart functionality
Florian Weimer
fweimer@redhat.com
Sun Mar 1 22:59:00 GMT 2015
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
More information about the Libc-alpha
mailing list