ALT Linux Sisyphus discussions
 help / color / mirror / Atom feed
From: Anton Farygin <rider@altlinux.com>
To: sisyphus@lists.altlinux.org
Subject: Re: [sisyphus] coreutils, who )
Date: Tue, 16 May 2006 18:01:44 +0400
Message-ID: <e4cldl$9qv$1@sea.gmane.org> (raw)
In-Reply-To: <20060516133942.GC32576@basalt.office.altlinux.org>

Dmitry V. Levin wrote:
> On Tue, May 16, 2006 at 12:13:56PM +0400, Anton Farygin wrote:
>> Это обсуждение надо переносить в bugzilla, ибо почему-то мантейнер 
>> coreutils его пропускает.
> 
> Можно с самого начала и сразу в деталях?

С самого начала:

в пакете powersave лежит утилита
/usr/lib/powersave/wttyhx, которая детектит где и кем юзаются иксы.

До определённого момента она выводила пользователя и терминала. После 
определённой версии coreutils - стала выводить 
#/usr/lib/powersave/wttyhx -a
root    :0

т.е. - всегда рута

алгоритм там простой:
getuserfromwho() {
         while read NAME DISP REST; do
                 test "$1" = "$DISP" && break
         done < <(who)
         echo "${NAME:--}"
}

Т.е. - who из coreutils перестал предоставлять информацию о том, кто и 
где запустил иксы.

Артём сравнил вывод от двух разных версий coreutils:
[user@sol src]$ ./who
root     tty1         2006-05-09 18:36 (localhost)
user     tty2         2006-05-15 15:40 (localhost)
user     :0           2006-05-15 15:36
root     ???          2006-05-09 20:07 (localhost)
user     pts/3        2006-05-15 16:53 (:0.0)
user     pts/5        2006-05-15 17:04 (:0.0)
user     pts/12       2006-05-10 20:05 (:0.0)

Новые ver 5.94
[user@sol src]$ who
root     tty1         2006-05-09 18:36 (localhost)
user     tty2         2006-05-15 15:40 (localhost)
user     pts/3        2006-05-15 16:53 (:0.0)
user     pts/5        2006-05-15 17:04 (:0.0)

В первом случае wttyhx работает, во втором - нет

Rgds,
Rider



  reply	other threads:[~2006-05-16 14:01 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-09 21:40 [sisyphus] ничего не понимаю... ( powersave ) Artem
2006-05-10 10:07 ` Anton Farygin
2006-05-10 16:21     ` Anton Farygin
2006-05-10 16:47       ` Artem
2006-05-11  6:03         ` Anton Farygin
2006-05-11 10:41           ` Artem
2006-05-11 12:27             ` Anton Farygin
2006-05-15 14:12           ` Artem
2006-05-15 15:44             ` Anton Farygin
2006-05-15 18:05               ` Artem
2006-05-15 18:28                 ` Anton Farygin
2006-05-15 20:27                 ` Michael A. Kangin
2006-05-15 21:37                   ` [sisyphus] coreutils, who ) Artem
2006-05-16  2:24                     ` Michael A. Kangin
2006-05-16  7:04                       ` Artem
2006-05-16  8:13                         ` Anton Farygin
2006-05-16 13:39                           ` Dmitry V. Levin
2006-05-16 14:01                             ` Anton Farygin [this message]
2006-05-16 14:28                               ` Dmitry V. Levin
2006-05-16 17:19                                 ` Anton Farygin
2006-05-21  8:33                               ` [sisyphus] /usr/lib/powersave/wttyhx -> /usr/bin/wttyhx? Michael Shigorin
2006-05-22  5:02                                 ` Anton Farygin
2006-05-16 14:35                         ` [sisyphus] coreutils, who ) Dmitry V. Levin
2006-05-16 20:39                           ` Artem
2006-05-16 21:06                             ` Dmitry V. Levin
2006-05-16 21:31                               ` Artem
2006-05-16 21:36                                 ` Artem
2006-05-16 22:12                                   ` Michael A. Kangin
2006-05-16 22:16                                     ` Dmitry V. Levin
2006-05-16 23:46                                       ` Ivan Adzhubey
2006-05-16 23:59                                         ` Dmitry V. Levin
2006-05-17 22:25                                           ` Ivan Adzhubey
2006-05-17 22:53                                             ` Dmitry V. Levin
2006-05-17 23:13                                               ` Artem
2006-05-17  5:51                                       ` Anton Farygin
2006-05-16 22:14                                   ` Dmitry V. Levin
2006-05-16 22:23                                     ` Artem
2006-05-16 23:05                                       ` Dmitry V. Levin
2006-05-17  6:15                                         ` Artem
2006-05-17 23:12                                           ` Artem
2006-05-17 23:26                                             ` Dmitry V. Levin
2006-05-18  5:26                                               ` Artem
2006-05-21  8:32                       ` [sisyphus] [JT] " Michael Shigorin

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='e4cldl$9qv$1@sea.gmane.org' \
    --to=rider@altlinux.com \
    --cc=sisyphus@lists.altlinux.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

ALT Linux Sisyphus discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/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 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
		sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
	public-inbox-index sisyphus

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


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