Github messages for voidlinux
 help / color / mirror / Atom feed
From: loreb <loreb@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: "sudo logname" should return my username instead of "root"
Date: Mon, 02 Aug 2021 16:03:49 +0200	[thread overview]
Message-ID: <20210802140349.ZGvEwQC__dJRQAfb2MN80_tmih6tBlr-iMNLdH48c7c@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-32185@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 1392 bytes --]

New comment by loreb on void-packages repository

https://github.com/void-linux/void-packages/issues/32185#issuecomment-891054276

Comment:
@rivanfebrian123 sorry for the late reply!
Anyway no, it's not a program, it's a set of functions that are supposed to maintain a database of logged in users; the musl developers decided that the specification is so ill designed that it's basically impossible to implement correctly, so they decided to leave those functions as stubs (briefly described at https://wiki.musl-libc.org/faq.html and https://skarnet.org/software/utmps/ - "in particular, it is impossible...").

TLDR: properly implementing logname requires something called getlogin; properly implementing getlogin requires the utmpx functions (see https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/getlogin.c;hb=HEAD), and the musl developers think the utmpx functions were designed by monkeys and it's better not to have them.

https://skarnet.org/software/utmps/ is trying a different approach - to have a daemon deal with the utmp file and rewrite all the utmp functions to make them talk to the daemon, which should work, but
1. the program is still beta, and
2. it requires that a daemon is running, and
3. the client part is written using a library (libska) which is not part of the standard C library

Sorry for the mouthful and sorry again for being so late.

  parent reply	other threads:[~2021-08-02 14:03 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-25  3:44 [ISSUE] " rivanfebrian123
2021-07-25  3:57 ` ericonr
2021-07-25  4:06 ` rivanfebrian123
2021-07-25  5:43 ` ericonr
2021-07-25 19:49 ` loreb
2021-07-25 20:15 ` ericonr
2021-07-25 20:56 ` loreb
2021-07-25 23:59 ` rivanfebrian123
2021-07-26  1:09 ` ericonr
2021-07-26 12:07 ` fosslinux
2021-07-26 12:08 ` fosslinux
2021-08-02 14:03 ` loreb [this message]
2021-08-03  0:26 ` rivanfebrian123
2021-08-03  3:00 ` ericonr
2021-08-03 10:28 ` rivanfebrian123
2021-08-03 10:31 ` rivanfebrian123
2021-08-03 10:33 ` rivanfebrian123
2021-08-03 13:59 ` ericonr
2021-08-03 13:59 ` [ISSUE] [CLOSED] " ericonr
2021-08-03 13:59 ` ericonr

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=20210802140349.ZGvEwQC__dJRQAfb2MN80_tmih6tBlr-iMNLdH48c7c@z \
    --to=loreb@users.noreply.github.com \
    --cc=ml@inbox.vuxu.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.
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 NNTP newsgroup(s).