ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Michael Shigorin <mike@osdn.org.ua>
To: ALT Devel discussion list <devel@lists.altlinux.org>
Subject: Re: [devel] q: current sudo default: was it all worth it?
Date: Tue, 22 May 2007 00:16:45 +0300
Message-ID: <20070521211645.GH25724@osdn.org.ua> (raw)
In-Reply-To: <4651A58F.2000402@tangramltd.com> <20070521173954.GB32076@basalt.office.altlinux.org> <20070521142027.GA27994@basalt.office.altlinux.org>

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

On Mon, May 21, 2007 at 06:20:27PM +0400, Dmitry V. Levin wrote:
> > помимо уже обсуждавшегося облома с использованием sudo 
> > и графических программ?
> Переход на env_reset, когда нужные переменные явно разрешены в
> sudoers, решает класс проблем вида
> CVE-2006-0151
> CVE-2005-4158
> CVE-2005-2959
> CVE-2004-1051

Помню, но ведь получается явный tradeoff.  Давайте в таких
случаях интересоваться в devel@, кому не лень прикинуть use cases
и нарисовать control file -- не всегда единоличное решение
оказывается приемлемым для других применений.

> > Помогло в сумме получасовое изучение sudoers(5) 
> > и колупание с  visudo(8), приведшее к:
> > # Defaults specification
> > Defaults !env_reset
> > Defaults !requiretty
> > Defaults !tty_tickets
> Пожалуй, хватило бы
> Defaults env_keep += "DISPLAY"

Возможно, попробую проверить.

> В FC так сделано по умолчанию, может и нам стоит это сделать.

А давай.

> > Наверное, для сервера произведённые изменения теоретически
> > полезны, но вот на десктопе нас с таким дефолтным поведением
> > закидают тухлыми болванками и будут правы.
> Для меня закидывание не является аргументом.

Для меня -- является.  Сложно писать анонсы того, что ты считаешь
имеющим серьёзные недостатки из коробки, о которых хорошо если
ведущий майнтейнер в разработческой рассылке постфактум расскажет.

Соответственно непубличные дистрибутивы имеют свойство
вытесняться всяким непотребством, про который однако же очень 
много шума.

Можно попробовать объяснить более подробно, но мне почему-то
кажется, что ты и так прекрасно понимаешь, о чём речь.

> Если вам нужен контраргумент, то покажите пальцем на FC.

Вот как раз FC для меня не аргумент, в отличие от той строчки
самой по себе (если окажется достаточно).

> > Настойчиво предлагаю такое:
> > - добавить в закомментированном виде эти три строчки
> >   в /etc/sudoers в пакете;
> !env_reset полезен только в одном случае: нужно запустить
> софтину "прямо сейчас", при этом security is not my problem.
> Во всех остальных случаях достаточно env_keep.
> !requiretty не нужен, поскольку это значение по умолчанию.
> Когда бывает нужен !tty_tickets, мне тоже не понятно.

Спасибо; см. тж. ниже.

> > - проверить соответствие пакетного состояния кода и /etc/sudoers
> >   описанию в sudoers(5) -- сейчас в манпейдже off by default, на
> >   деле же эти три опции включены (что документировано только в
> >   rpm changelog);
> Там есть недоделка; исправление вносятся в исходный код
> документации, которая не воссоздаётся в нужном объёме.

Давай попробую сделать на результат хотя бы.

> > - хорошо бы для десктопа этот дефолт сменить на вполне
> >   разумный, каковой и положен апстримом.
> Некоторые считают, что для десктопа разумным является
> %wheel ALL = (root) NOPASSWD: ALL
> Что из этого следует?
> То, что представления о разумности порой сильно различаются.

Да, конечно.  Так у нас на то есть control(8).


On Mon, May 21, 2007 at 09:39:54PM +0400, Dmitry V. Levin wrote:
> Мне кажется, что тут много лишнего...

Аналогично.


On Mon, May 21, 2007 at 04:58:39PM +0300, Slava Dubrovskiy wrote:
> > # Defaults specification
> > Defaults !env_reset
> > Defaults !requiretty
> > Defaults !tty_tickets
> В kubuntu последнем две последние строчки присутствуют сразу по умолчанию.

BTW я недостаточно внимательно прочитал manpage:

       env_reset   If set, sudo will reset the environment to only contain the
                   following variables: HOME, LOGNAME, PATH, SHELL, TERM, and
                   USER (in addition to the SUDO_* variables).  Of these, only
                   TERM is copied unaltered from the old environment.  The
                   other variables are set to default values (possibly modi-
                   fied by the value of the set_logname option).  If sudo was
                   compiled with the SECURE_PATH option, its value will be
                   used for the PATH environment variable.  Other variables
                   may be preserved with the env_keep option.

       requiretty  If set, sudo will only run when the user is logged in to a
                   real tty.  This will disallow things like "rsh somehost
                   sudo ls" since rsh(1) does not allocate a tty.  Because it
                   is not possible to turn off echo when there is no tty
                   present, some sites may with to set this flag to prevent a
                   user from entering a visible password.  This flag is *off* by
                   default.

       tty_tickets If set, users must authenticate on a per-tty basis.  Nor-
                   mally, sudo uses a directory in the ticket dir with the
                   same name as the user running it.  With this flag enabled,
                   sudo will use a file named for the tty the user is logged
                   in on in that directory.  This flag is *on* by default.

-- 
 ---- WBR, Michael Shigorin <mike@altlinux.ru>
  ------ Linux.Kiev http://www.linux.kiev.ua/

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2007-05-21 21:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-21 13:45 Michael Shigorin
2007-05-21 13:58 ` Slava Dubrovskiy
2007-05-21 14:20 ` Dmitry V. Levin
2007-05-21 17:39   ` [devel] sudo env_keep Dmitry V. Levin
2007-05-21 21:16     ` Michael Shigorin [this message]
2007-05-22  9:55       ` [devel] q: current sudo default: was it all worth it? Dmitry V. Levin
2007-05-22 10:01         ` 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=20070521211645.GH25724@osdn.org.ua \
    --to=mike@osdn.org.ua \
    --cc=devel@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 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