On 12/27/2016 12:17 AM, G. Schlisio wrote:
>> I managed to find where this is happening. It is not in glibc but in
>> systemd.
>>
>> If your /etc/nsswitch.conf has something like this:
>>
>>     passwd: compat mymachines systemd
>>
>> then the routines that are being used are systemd ones.
>>
>> The checks being done are here in the function valid_user_group_name:
>>
>> https://github.com/systemd/systemd/blob/master/src/basic/user-util.c
>>
>> and in the case that those checks fail then _nss_systemd_getpwnam_r from
>> systemd libraries returns EINVAL
>>
>> https://github.com/systemd/systemd/blob/master/src/nss-systemd/nss-systemd.c
>>
>> if (!valid_user_group_name(name)) {
>>                 r = -EINVAL;
>>                 goto fail;
>> }
>>
>> ...
>>
>> fail:
>>         *errnop = -r;
>> return NSS_STATUS_UNAVAIL;
>>
>> So the problem is that systemd version of getpwnam_r is deviating from
>> the standard of returning 0 for not found users.
>>
>> Either the systemd library module or the nsswitch.conf is probably what
>> changed during your upgrade.
>>
>> John
> hi john,
>
> both packages (filesystem containing nsswitch.conf and systemd) received
> an upgrade last week:
> upgraded systemd (231-4 -> 232-6)
> diff of old vs new nsswitch.conf:
>
> $ diff {,/}etc/nsswitch.conf
> 3,5c3,5
> < passwd: files
> < group: files
> < shadow: files
> ---
>> passwd: compat mymachines systemd
>> group: compat mymachines systemd
>> shadow: compat
> 9c9
> < hosts: files dns myhostname
> ---
>> hosts: files mymachines resolve [!UNAVAIL=return] dns myhostname
> so i might take this to the arch ML and also to the systemd bug tracker.
>
> thank you for your thorough investigation of this isssue!
> georg

I opened an issue directly on systemd bug tracker

https://github.com/systemd/systemd/issues/4983

John

Reply via email to