all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Bruno Haible <bruno@clisp.org>
To: 35553@debbugs.gnu.org
Subject: bug#35553: getlogin and getlogin_r fail with error ENXIO
Date: Sat, 04 May 2019 01:03:37 +0200	[thread overview]
Message-ID: <5210151.GY8qDU4yXC@omega> (raw)

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

             reply	other threads:[~2019-05-03 23:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-03 23:03 Bruno Haible [this message]
2019-05-04 13:13 ` bug#35553: getlogin and getlogin_r fail with error ENXIO Danny Milosavljevic
2019-05-04 13:26   ` Bruno Haible
2019-05-07 10:18     ` Ludovic Courtès
2019-05-09 10:13   ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5210151.GY8qDU4yXC@omega \
    --to=bruno@clisp.org \
    --cc=35553@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.