From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp4-g21.free.fr (smtp4-g21.free.fr [IPv6:2a01:e0c:1:1599::13]) by sourceware.org (Postfix) with ESMTPS id 0057A3853560 for ; Wed, 29 Jun 2022 14:31:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0057A3853560 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=opteya.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=opteya.com Received: from [IPV6:2a01:e35:39f2:1220:bcc9:3a54:b0a9:de07] (unknown [IPv6:2a01:e35:39f2:1220:bcc9:3a54:b0a9:de07]) by smtp4-g21.free.fr (Postfix) with ESMTPS id 883BC19F5A5 for ; Wed, 29 Jun 2022 16:31:46 +0200 (CEST) Message-ID: <8f975613-d9a9-9e56-3e6a-f6f026ec936a@opteya.com> Date: Wed, 29 Jun 2022 16:31:45 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Content-Language: fr-FR From: Yann Droneaud Organization: OPTEYA To: GNU C Library Subject: tst-getpw failure X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00, BODY_8BITS, HTML_MESSAGE, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_SOFTFAIL, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Jun 2022 14:31:51 -0000 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 | ||