ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Sergey Vlasov <vsu@mivlgu.murom.ru>
To: devel@linux.iplabs.ru
Subject: Re: [devel] getlogin broken in glibc-2.2.4-alt2
Date: Sun, 23 Sep 2001 21:04:06 +0400
Message-ID: <20010923210406.14baae81.vsu@mivlgu.murom.ru> (raw)
In-Reply-To: <20010923143826.A14003@voins.local>

On Sun, 23 Sep 2001 14:38:27 +0400
Alexey Voinov <voins@voins.program.ru> wrote:

> Наблюдаю бред.
> 
> $ rpm -q glibc glibc-devel
> glibc-2.2.4-alt2
> glibc-devel-2.2.4-alt2
> 
> a.out - это маленькая програмка, корая лежитт в аттаче,
> печатает ответ от функции getlogin. Функция документированная,
> никаких пометок относительно obsoleted или deprecated я не заметил.
> 
> $ ./a.out
> getlogin returned: LOGIN
> 
> А вроде как должно сказать: voins.
> 
> Есть подозрение, что это буг в glibc.

У меня вот так.

Из xterm:
$ ./a.out
getlogin returned: (null)
$ su -c ./a.out 
Password: 
getlogin returned: (null)

С консоли:
$ ./a.out
getlogin returned: (null)
$ su -c ./a.out 
Password: 
getlogin returned: vsu

С консоли при заходе рутом:
# ./a.out
getlogin returned: root


$ rpm -q glibc glibc-devel
glibc-2.2.4-alt2
glibc-devel-2.2.4-alt2
(бинарные пакеты у меня не из Сизифа, а результат rpm --rebuild)


Как я понял, getlogin работает через utmp, поэтому под X эта
функция в принципе бесполезна.  Хотя вот этот возврат LOGIN -
что-то подозрительное.
_______________________________________________
Devel mailing list
Devel@linux.iplabs.ru
http://www.logic.ru/mailman/listinfo/devel


  reply	other threads:[~2001-09-23 17:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-23 10:38 Alexey Voinov
2001-09-23 17:04 ` Sergey Vlasov [this message]
2001-09-24  9:37   ` Dmitry V. Levin
2001-09-24 17:47     ` Alexey Voinov
2001-09-24 18:13       ` Ivan Zakharyaschev
2001-09-24 18:17       ` Dmitry V. Levin

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=20010923210406.14baae81.vsu@mivlgu.murom.ru \
    --to=vsu@mivlgu.murom.ru \
    --cc=devel@linux.iplabs.ru \
    /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

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git