From unknown Sun Jun 22 08:01:45 2025 X-Loop: help-debbugs@gnu.org Subject: bug#35553: getlogin and getlogin_r fail with error ENXIO Resent-From: Bruno Haible Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 03 May 2019 23:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 35553 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 35553@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.155692463230395 (code B ref -1); Fri, 03 May 2019 23:04:01 +0000 Received: (at submit) by debbugs.gnu.org; 3 May 2019 23:03:52 +0000 Received: from localhost ([127.0.0.1]:49884 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMhDc-0007uB-60 for submit@debbugs.gnu.org; Fri, 03 May 2019 19:03:52 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60542) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMhDZ-0007tx-1s for submit@debbugs.gnu.org; Fri, 03 May 2019 19:03:50 -0400 Received: from lists.gnu.org ([209.51.188.17]:51660) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hMhDT-0002fB-Up for submit@debbugs.gnu.org; Fri, 03 May 2019 19:03:43 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46687) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMhDS-0001wx-TS for bug-guix@gnu.org; Fri, 03 May 2019 19:03:43 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hMhDR-0002eT-SR for bug-guix@gnu.org; Fri, 03 May 2019 19:03:42 -0400 Received: from mo6-p00-ob.smtp.rzone.de ([2a01:238:20a:202:5300::1]:13637) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hMhDQ-0002de-RK for bug-guix@gnu.org; Fri, 03 May 2019 19:03:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1556924618; s=strato-dkim-0002; d=clisp.org; h=Message-ID:Date:Subject:To:From:X-RZG-CLASS-ID:X-RZG-AUTH:From: Subject:Sender; bh=NlEEbkAj0LuADnoo10q+pRbOcJE2O/QS09cbyir3VMs=; b=lEjvsDdm8dEFxsVtg37YrCAN4jcbeM14miNcz9n7Yy7021IQ7i1R1JcSU+r86Hkifp 5kBGi7iC6d049vM0aWqYyn8sr5XD/zKwRalJYAwlpCrt9Ru79UCaQWgWLCVRFIZIr0BU SIJal+KhAHp44f93VLV6a5GqBGZx2gkWxDZeZHl8lc6GbXYcyleQFP6jri+PAiBL4JFC 0YFJjHt7LKGkqn7Na2pZ2VA8/aRQFNlbrUmJgiJXPT/4LSzGXtG414ztqkjEV6D/Ppig U+dsYQzIiA4udImQTC28Lq17Q6aopfwbrDHah02Y+uZzo7gRteSOLIEAW4LOzjrST386 uM4w== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH+AHjwLuWOGaf0y5RW" X-RZG-CLASS-ID: mo00 Received: from bruno.haible.de by smtp.strato.de (RZmta 44.18 DYNA|AUTH) with ESMTPSA id m03afev43N3cZM3 (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Sat, 4 May 2019 01:03:38 +0200 (CEST) From: Bruno Haible Date: Sat, 04 May 2019 01:03:37 +0200 Message-ID: <5210151.GY8qDU4yXC@omega> User-Agent: KMail/5.1.3 (Linux/4.4.0-145-generic; KDE/5.18.0; x86_64; ; ) MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a01:238:20a:202:5300::1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Running the guix-1.0 installation image (guix-system-vm-image-1.0.0.x86_64-linux) in qemu, I find that the glibc functions getlogin() and getlogin_r() fail with error ENXIO. Using the gnulib programs test-getlogin and test-getlogin_r I can see that the program is reading the contents of the file /proc/self/loginuid and its contents is "4294967295". Indeed, the file glibc/sysdeps/unix/sysv/linux/getlogin_r.c contains this code: /* If there is no login uid, linux sets /proc/self/loginid to the sentinel value of, (uid_t) -1, so check if that value is set and return early to avoid making unneeded nss lookups. */ if (uid == (uid_t) -1) { __set_errno (ENXIO); return ENXIO; } Is it the xfce4 desktop which is not setting a loginuid? Or is it the lack of a login screen? It's the first Linux distro I've seen where getlogin() and getlogin_r() fail when the user is running a normal desktop environment. Bruno From unknown Sun Jun 22 08:01:45 2025 X-Loop: help-debbugs@gnu.org Subject: bug#35553: getlogin and getlogin_r fail with error ENXIO Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 04 May 2019 13:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35553 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Bruno Haible , 35553@debbugs.gnu.org Received: via spool by 35553-submit@debbugs.gnu.org id=B35553.155697561719686 (code B ref 35553); Sat, 04 May 2019 13:14:01 +0000 Received: (at 35553) by debbugs.gnu.org; 4 May 2019 13:13:37 +0000 Received: from localhost ([127.0.0.1]:50563 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMuTr-00057N-4d for submit@debbugs.gnu.org; Sat, 04 May 2019 09:13:37 -0400 Received: from dd26836.kasserver.com ([85.13.145.193]:47342) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMuTn-00057B-GM for 35553@debbugs.gnu.org; Sat, 04 May 2019 09:13:28 -0400 Received: from localhost (178.113.194.41.wireless.dyn.drei.com [178.113.194.41]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 0FDB93360B77; Sat, 4 May 2019 15:13:25 +0200 (CEST) Date: Sat, 4 May 2019 15:13:10 +0200 From: Danny Milosavljevic Message-ID: <20190504151310.317c7f7b@scratchpost.org> In-Reply-To: <5210151.GY8qDU4yXC@omega> References: <5210151.GY8qDU4yXC@omega> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/PmqU0rBOAfiI/szqjeTSz.T"; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --Sig_/PmqU0rBOAfiI/szqjeTSz.T Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable http://man7.org/linux/man-pages/man8/pam_loginuid.8.html suggests that we s= hould use that for all "entry point"s for the user. I guess we can add it. Are you logging in using gdm? We don't refer to pam_loginuid.so anywhere, so it's understandable that /proc/self/loginuid is not set either. Apparently, Ubuntu has the following: /etc/pam.d/common-session-noninteractive: session [default=3D1] pam_permit.so session requisite pam_deny.so session required pam_permit.so session required pam_unix.so=20 session optional pam_winbind.so=20 session required pam_loginuid.so=20 And then they @include the file above in /etc/pam.d/gdm --Sig_/PmqU0rBOAfiI/szqjeTSz.T Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlzNj+YACgkQ5xo1VCww uqV0iwf/W5JLgtoHQnMAPrFI79Puu+ywJ739La/6uv6aKFRdyWSEVJVacsNkpqpq AoPeKUSqMeUtYnnnb+BUjjxgF6S04Ysw0GnuykySfNwbxSbUWdjNJTAPGGyQQfRY rgu/gWJHSyxGYdTaNKgEjvah9F+rDqaKncqElB6+I8lekTeeabr26RNC71+UIxaa LwjV8CWbkGhQ3HAynLsRPfjyq5L5wBQXwi5ByaEwI0hzAT6Oe4Fl08QOKxmoWccS QBocEsb6nHiNvnfH11h5F04QQkkH1+UV8vrbaE1Ssy8PPwdWHM61ADk5BHDVQQs3 qN/59lVbiRw/0P8LMHOxa5ExMNXUAA== =WkIW -----END PGP SIGNATURE----- --Sig_/PmqU0rBOAfiI/szqjeTSz.T-- From unknown Sun Jun 22 08:01:45 2025 X-Loop: help-debbugs@gnu.org Subject: bug#35553: getlogin and getlogin_r fail with error ENXIO Resent-From: Bruno Haible Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 04 May 2019 13:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35553 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Danny Milosavljevic Cc: 35553@debbugs.gnu.org Received: via spool by 35553-submit@debbugs.gnu.org id=B35553.155697638320833 (code B ref 35553); Sat, 04 May 2019 13:27:02 +0000 Received: (at 35553) by debbugs.gnu.org; 4 May 2019 13:26:23 +0000 Received: from localhost ([127.0.0.1]:50575 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMugJ-0005Pw-JM for submit@debbugs.gnu.org; Sat, 04 May 2019 09:26:23 -0400 Received: from mo4-p01-ob.smtp.rzone.de ([85.215.255.54]:36582) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMugG-0005Pm-2K for 35553@debbugs.gnu.org; Sat, 04 May 2019 09:26:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1556976378; s=strato-dkim-0002; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=minpC6vU23rNI4CLQn5gx2wy+eobCblcEeelmql/6WI=; b=iIT/F5YBNKui3xPplUnX0Zbuyq6EIxnjbSoPPXlIZLLRQntGh2+a80HNxHKvY7JM02 5jFkshRVW2EpaSdqAQw81UadDHuMRbXU25Fx3CrBGkl/J1JxaDn3dSv4w8jDhORSFHgT KJVL4q90634S4yqWuF1pVQYbVXRg59xEEczAWgwsKGFxei3AwHUFDtcy7u3iAb3EPs8W MEQxEyzlyBEhWHPBynTJi3lQs5utp5PaXNr4T/dZH/6TwdS3nR5BFd0H41zXDAc1ug9L 6GVgAFnKiuWeA0L4+G5/H3Su3mQ4asnX/xgxOTpohakcZaT7FGa1O4rDqsShLAvRzblb btSw== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH+AHjwLuWOGaf0y5RW" X-RZG-CLASS-ID: mo00 Received: from bruno.haible.de by smtp.strato.de (RZmta 44.18 DYNA|AUTH) with ESMTPSA id m03afev44DQHbCP (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Sat, 4 May 2019 15:26:17 +0200 (CEST) From: Bruno Haible Date: Sat, 04 May 2019 15:26:16 +0200 Message-ID: <2692256.Dr6YohQPPZ@omega> User-Agent: KMail/5.1.3 (Linux/4.4.0-145-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <20190504151310.317c7f7b@scratchpost.org> References: <5210151.GY8qDU4yXC@omega> <20190504151310.317c7f7b@scratchpost.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Danny Milosavljevic wrote: > Are you logging in using gdm? I'm using the guix-1.0 installation image (guix-system-vm-image-1.0.0.x86_64-linux). It shows a screen "Logging in..." for less than one second and then starts the user's desktop immediately. Bruno From unknown Sun Jun 22 08:01:45 2025 X-Loop: help-debbugs@gnu.org Subject: bug#35553: getlogin and getlogin_r fail with error ENXIO Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 07 May 2019 10:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35553 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Bruno Haible Cc: Danny Milosavljevic , 35553@debbugs.gnu.org Received: via spool by 35553-submit@debbugs.gnu.org id=B35553.155722430318576 (code B ref 35553); Tue, 07 May 2019 10:19:02 +0000 Received: (at 35553) by debbugs.gnu.org; 7 May 2019 10:18:23 +0000 Received: from localhost ([127.0.0.1]:58230 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hNxAz-0004pT-D3 for submit@debbugs.gnu.org; Tue, 07 May 2019 06:18:23 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40496) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hNxAw-0004pH-PJ for 35553@debbugs.gnu.org; Tue, 07 May 2019 06:18:19 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:56669) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNxAq-0005tM-Q7; Tue, 07 May 2019 06:18:12 -0400 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=38980 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hNxAq-00045E-9x; Tue, 07 May 2019 06:18:12 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <5210151.GY8qDU4yXC@omega> <20190504151310.317c7f7b@scratchpost.org> <2692256.Dr6YohQPPZ@omega> Date: Tue, 07 May 2019 12:18:09 +0200 In-Reply-To: <2692256.Dr6YohQPPZ@omega> (Bruno Haible's message of "Sat, 04 May 2019 15:26:16 +0200") Message-ID: <87v9ym7ela.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Bruno! Bruno Haible skribis: > Danny Milosavljevic wrote: >> Are you logging in using gdm? > > I'm using the guix-1.0 installation image > (guix-system-vm-image-1.0.0.x86_64-linux). It shows a screen "Logging in.= .." > for less than one second and then starts the user's desktop immediately. This is the VM image (not the installation image), and it uses SLiM: https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/system/examples/vm-im= age.tmpl Danny wrote: > We don't refer to pam_loginuid.so anywhere, so it's understandable that > /proc/self/loginuid is not set either. Is it the only way to get that done? (That something has to write some number to /proc/self/loginuid looks very clunky to me.) I=E2=80=99ve tested the patch below and confirmed that after logging in at = the tty, running Guile and calling =E2=80=98getlogin=E2=80=99 at the REPL now r= eturns the right thing. We=E2=80=99d have to do that for all the relevant services (graphical log-in managers, SSH daemons, anything else?). Perhaps we can simply add a keyword to =E2=80=98unix-pam-service=E2=80=99 to make it less verbose. Thoughts? Thanks for the bug report, Bruno! Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 952f6f9ab2..30e50f4b9a 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -829,11 +829,18 @@ Return a service that sets up Unicode support in @var{tty} and loads (define (login-pam-service config) "Return the list of PAM service needed for CONF." ;; Let 'login' be known to PAM. - (list (unix-pam-service "login" - #:allow-empty-passwords? - (login-configuration-allow-empty-passwords? config) - #:motd - (login-configuration-motd config)))) + (let ((base (unix-pam-service + "login" + #:allow-empty-passwords? + (login-configuration-allow-empty-passwords? config) + #:motd + (login-configuration-motd config)))) + (list (pam-service + (inherit base) + (session (cons (pam-entry + (control "required") + (module "pam_loginuid.so")) + (pam-service-session base))))))) (define login-service-type (service-type (name 'login) --=-=-=-- From unknown Sun Jun 22 08:01:45 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Bruno Haible Subject: bug#35553: closed (Re: bug#35553: getlogin and getlogin_r fail with error ENXIO) Message-ID: References: <87pnosexzx.fsf@gnu.org> <5210151.GY8qDU4yXC@omega> X-Gnu-PR-Message: they-closed 35553 X-Gnu-PR-Package: guix Reply-To: 35553@debbugs.gnu.org Date: Thu, 09 May 2019 10:15:04 +0000 Content-Type: multipart/mixed; boundary="----------=_1557396904-15412-1" This is a multi-part message in MIME format... ------------=_1557396904-15412-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #35553: getlogin and getlogin_r fail with error ENXIO which was filed against the guix package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 35553@debbugs.gnu.org. --=20 35553: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D35553 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1557396904-15412-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 35553-done) by debbugs.gnu.org; 9 May 2019 10:14:05 +0000 Received: from localhost ([127.0.0.1]:34672 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hOg3x-0003yo-80 for submit@debbugs.gnu.org; Thu, 09 May 2019 06:14:05 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54926) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hOg3v-0003yE-De for 35553-done@debbugs.gnu.org; Thu, 09 May 2019 06:14:03 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:39477) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOg3p-0003w6-NR; Thu, 09 May 2019 06:13:57 -0400 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=52760 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hOg3p-0003I2-8M; Thu, 09 May 2019 06:13:57 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Danny Milosavljevic Subject: Re: bug#35553: getlogin and getlogin_r fail with error ENXIO References: <5210151.GY8qDU4yXC@omega> <20190504151310.317c7f7b@scratchpost.org> Date: Thu, 09 May 2019 12:13:54 +0200 In-Reply-To: <20190504151310.317c7f7b@scratchpost.org> (Danny Milosavljevic's message of "Sat, 4 May 2019 15:13:10 +0200") Message-ID: <87pnosexzx.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 35553-done Cc: Bruno Haible , 35553-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hello, Danny Milosavljevic scribes: > We don't refer to pam_loginuid.so anywhere, so it's understandable that > /proc/self/loginuid is not set either. I proceeded as discussed: https://git.savannah.gnu.org/cgit/guix.git/commit/?id=3De6b1a2248ff164e14= d1b2f495224faf8a8326142 https://git.savannah.gnu.org/cgit/guix.git/commit/?id=3Daf55ca481d9e6c1d1= e06632f96d550b42f33210f Thanks, Ludo=E2=80=99. ------------=_1557396904-15412-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 3 May 2019 23:03:52 +0000 Received: from localhost ([127.0.0.1]:49884 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMhDc-0007uB-60 for submit@debbugs.gnu.org; Fri, 03 May 2019 19:03:52 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60542) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMhDZ-0007tx-1s for submit@debbugs.gnu.org; Fri, 03 May 2019 19:03:50 -0400 Received: from lists.gnu.org ([209.51.188.17]:51660) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hMhDT-0002fB-Up for submit@debbugs.gnu.org; Fri, 03 May 2019 19:03:43 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46687) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMhDS-0001wx-TS for bug-guix@gnu.org; Fri, 03 May 2019 19:03:43 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hMhDR-0002eT-SR for bug-guix@gnu.org; Fri, 03 May 2019 19:03:42 -0400 Received: from mo6-p00-ob.smtp.rzone.de ([2a01:238:20a:202:5300::1]:13637) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hMhDQ-0002de-RK for bug-guix@gnu.org; Fri, 03 May 2019 19:03:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1556924618; s=strato-dkim-0002; d=clisp.org; h=Message-ID:Date:Subject:To:From:X-RZG-CLASS-ID:X-RZG-AUTH:From: Subject:Sender; bh=NlEEbkAj0LuADnoo10q+pRbOcJE2O/QS09cbyir3VMs=; b=lEjvsDdm8dEFxsVtg37YrCAN4jcbeM14miNcz9n7Yy7021IQ7i1R1JcSU+r86Hkifp 5kBGi7iC6d049vM0aWqYyn8sr5XD/zKwRalJYAwlpCrt9Ru79UCaQWgWLCVRFIZIr0BU SIJal+KhAHp44f93VLV6a5GqBGZx2gkWxDZeZHl8lc6GbXYcyleQFP6jri+PAiBL4JFC 0YFJjHt7LKGkqn7Na2pZ2VA8/aRQFNlbrUmJgiJXPT/4LSzGXtG414ztqkjEV6D/Ppig U+dsYQzIiA4udImQTC28Lq17Q6aopfwbrDHah02Y+uZzo7gRteSOLIEAW4LOzjrST386 uM4w== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH+AHjwLuWOGaf0y5RW" X-RZG-CLASS-ID: mo00 Received: from bruno.haible.de by smtp.strato.de (RZmta 44.18 DYNA|AUTH) with ESMTPSA id m03afev43N3cZM3 (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Sat, 4 May 2019 01:03:38 +0200 (CEST) From: Bruno Haible To: bug-guix@gnu.org Subject: getlogin and getlogin_r fail with error ENXIO Date: Sat, 04 May 2019 01:03:37 +0200 Message-ID: <5210151.GY8qDU4yXC@omega> User-Agent: KMail/5.1.3 (Linux/4.4.0-145-generic; KDE/5.18.0; x86_64; ; ) MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a01:238:20a:202:5300::1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Running the guix-1.0 installation image (guix-system-vm-image-1.0.0.x86_64-linux) in qemu, I find that the glibc functions getlogin() and getlogin_r() fail with error ENXIO. Using the gnulib programs test-getlogin and test-getlogin_r I can see that the program is reading the contents of the file /proc/self/loginuid and its contents is "4294967295". Indeed, the file glibc/sysdeps/unix/sysv/linux/getlogin_r.c contains this code: /* If there is no login uid, linux sets /proc/self/loginid to the sentinel value of, (uid_t) -1, so check if that value is set and return early to avoid making unneeded nss lookups. */ if (uid == (uid_t) -1) { __set_errno (ENXIO); return ENXIO; } Is it the xfce4 desktop which is not setting a loginuid? Or is it the lack of a login screen? It's the first Linux distro I've seen where getlogin() and getlogin_r() fail when the user is running a normal desktop environment. Bruno ------------=_1557396904-15412-1--