This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: nscd paranoia mode restart functionality

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/ --library-path "$PWD:$PWD/nptl" ./nscd/nscd ...
> main would only see the ..., but the restart needs the full ./elf/ ... 
> 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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]