* tst-getpw failure
@ 2022-06-29 14:31 Yann Droneaud
2022-06-29 14:38 ` Yann Droneaud
0 siblings, 1 reply; 2+ messages in thread
From: Yann Droneaud @ 2022-06-29 14:31 UTC (permalink / raw)
To: GNU C Library
Hi,
I chased a failure in pwd/tst-getpw earlier this week: $ ./testrun.sh
pwd/tst-getpw PASS: NULL buffer returns -1 and sets errno to EINVAL.
PASS: Read a password line given a uid. FAIL: Did not find even one
invalid uid.
I've found a related bug report there in ubuntu's launchpad:
https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1869364
There's no fix for the issue, only a workaround.
But Florian made the following comment
> I believe this is related to the kind of NSS modules which are active
> on the system. I believe it's related how the way errno is (not) set.
> I'm not sure if this is a bug in the NSS framework, in the NSS module,
> or simply a case of incorrect test expectations.
It turned out my system (an Ubuntu 22.04, upgraded multiple times from
previous releases) had a /etc/nsswitch.conf that contained the following:
passwd: files systemd sss group: files systemd sss
shadow: files sss gshadow: files But sssd wasn't
running on this system, go figure ... And libnss_sss's
_nss_sss_getpwuid_r() seems to return|NSS_STATUS_UNAVAIL (-1) and set
errno to ENOENT (2) when it failed to connect to its sssd daemon. ||Then
getpw() returns a failure, and doesn't set errno to 0. ||So tst-getpw fails as it expects errno to be set to 0 if there's no
entry associated to an UID. I'm pondering whether or not opening a bug
on SSSD ... What a waste of time for a deprecated API. Regards. -- Yann
Droneaud OPTEYA |
||
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: tst-getpw failure
2022-06-29 14:31 tst-getpw failure Yann Droneaud
@ 2022-06-29 14:38 ` Yann Droneaud
0 siblings, 0 replies; 2+ messages in thread
From: Yann Droneaud @ 2022-06-29 14:38 UTC (permalink / raw)
To: libc-alpha
Hi,
Le 29/06/2022 à 16:31, Yann Droneaud a écrit :
>
> I chased a failure in pwd/tst-getpw earlier this week: $
> ./testrun.sh pwd/tst-getpw PASS: NULL buffer returns -1 and sets
> errno to EINVAL. PASS: Read a password line given a uid. FAIL: Did
> not find even one invalid uid.
> I've found a related bug report there in ubuntu's launchpad:
> https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1869364
>
> There's no fix for the issue, only a workaround.
> But Florian made the following comment
>
>> I believe this is related to the kind of NSS modules which are active
>> on the system. I believe it's related how the way errno is (not) set.
>> I'm not sure if this is a bug in the NSS framework, in the NSS module,
>> or simply a case of incorrect test expectations.
> It turned out my system (an Ubuntu 22.04, upgraded multiple times from
> previous releases) had a /etc/nsswitch.conf that contained the following:
>
> passwd: files systemd sss group: files systemd
> sss shadow: files sss gshadow: files But sssd
> wasn't running on this system, go figure ... And libnss_sss's
> _nss_sss_getpwuid_r() seems to return|NSS_STATUS_UNAVAIL (-1) and set
> errno to ENOENT (2) when it failed to connect to its sssd daemon.
> ||Then getpw() returns a failure, and doesn't set errno to 0. ||So
> tst-getpw fails as it expects errno to be set to 0 if there's no entry
> associated to an UID. I'm pondering whether or not opening a bug on
> SSSD ... What a waste of time for a deprecated API. Regards. -- Yann
> Droneaud OPTEYA |
>
> ||
>
Oh boy, that's the worst formatted email I've ever sent. Sorry.
--
Yann Droneaud
OPTEYA
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-06-29 14:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-29 14:31 tst-getpw failure Yann Droneaud
2022-06-29 14:38 ` Yann Droneaud
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).