GNU bug report logs - #35553
getlogin and getlogin_r fail with error ENXIO

Previous Next

Package: guix;

Reported by: Bruno Haible <bruno <at> clisp.org>

Date: Fri, 3 May 2019 23:04:01 UTC

Severity: normal

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Bruno Haible <bruno <at> clisp.org>
Subject: bug#35553: closed (Re: bug#35553: getlogin and getlogin_r fail
 with error ENXIO)
Date: Thu, 09 May 2019 10:15:04 +0000
[Message part 1 (text/plain, inline)]
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 <at> debbugs.gnu.org.

-- 
35553: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=35553
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Ludovic Courtès <ludo <at> gnu.org>
To: Danny Milosavljevic <dannym <at> scratchpost.org>
Cc: Bruno Haible <bruno <at> clisp.org>, 35553-done <at> debbugs.gnu.org
Subject: Re: bug#35553: getlogin and getlogin_r fail with error ENXIO
Date: Thu, 09 May 2019 12:13:54 +0200
Hello,

Danny Milosavljevic <dannym <at> scratchpost.org> 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=e6b1a2248ff164e14d1b2f495224faf8a8326142
  https://git.savannah.gnu.org/cgit/guix.git/commit/?id=af55ca481d9e6c1d1e06632f96d550b42f33210f

Thanks,
Ludo’.

[Message part 3 (message/rfc822, inline)]
From: Bruno Haible <bruno <at> clisp.org>
To: bug-guix <at> gnu.org
Subject: getlogin and getlogin_r fail with error ENXIO
Date: Sat, 04 May 2019 01:03:37 +0200
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




This bug report was last modified 6 years and 11 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.