From: "Dmitry V. Levin" <ldv@alt-linux.org> To: devel@altlinux.ru Subject: Re: [devel] getlogin broken in glibc-2.2.4-alt2 Date: Mon, 24 Sep 2001 13:37:23 +0400 Message-ID: <20010924133723.B20718@ldv.office.alt-linux.org> (raw) In-Reply-To: <20010923210406.14baae81.vsu@mivlgu.murom.ru> [-- Attachment #1: Type: text/plain, Size: 1773 bytes --] On Sun, Sep 23, 2001 at 09:04:06PM +0400, Sergey Vlasov 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) А если запускать su с опцией "-l"? > > С консоли: > $ ./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 - > что-то подозрительное. Результат getlogin целиком и полностью зависит от содержимого utmp (возвращаемого функцией getutline_r). Так что вопрос в том, кто и как туда записывает. Проверьте версии пакетов login, su, ..., и расскажите о результатах. Regards, Dmitry +-------------------------------------------------------------------------+ Dmitry V. Levin mailto://ldv@alt-linux.org ALT Linux Team http://www.altlinux.ru/ Fandra Project http://www.fandra.org/ +-------------------------------------------------------------------------+ UNIX is user friendly. It's just very selective about who its friends are. [-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
next prev parent reply other threads:[~2001-09-24 9:37 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 2001-09-24 9:37 ` Dmitry V. Levin [this message] 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=20010924133723.B20718@ldv.office.alt-linux.org \ --to=ldv@alt-linux.org \ --cc=devel@altlinux.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