From: Ilya Palagin <tux@fioc.kz>
To: sisyphus@altlinux.ru
Subject: Re: [sisyphus] sudo + user local = secure?
Date: Tue, 19 Nov 2002 11:20:21 +0600
Message-ID: <3DD9CA15.4030106@fioc.kz> (raw)
In-Reply-To: <003701c28f83$40243e40$0401a8c0@tema04>
Anton V. Denisov wrote:
> Приветствую всех.
>
> Уже много раз обсуждалось и объяснялось по каким соображениям у root'а
> используется POSIX локаль, также много раз говорилось о полезности
> использования sudo для выполнения каких-либо действий с правами
> суперпользователя. Но вот чего я так и не могу понять, так это почему при
> вызове sudo все переменные окружения, описывающме локаль, остаются
> пользовательскими? Получается мы сами нарушаем использование POSIX локали
> при
> работе с привелегиями суперпользователя. Или я не понимаю тонкостей работы
> sudo? Прошу разъяснений по этому вопросу от более опытных товарищей.
>
Это делается в целях безопасности. man - лучший товарищ:
sudo tries to be safe when executing external commands. Variables that
control how
dynamic loading and binding is done can be used to subvert the program
that sudo
runs. To combat this the LD_*, _RLD_*, SHLIB_PATH (HP-UX only), and
LIBPATH (AIX
only) environment variables are removed from the environment passed on
to all com-
mands executed. sudo will also remove the IFS, ENV, BASH_ENV, KRB_CONF,
KRB-
CONFDIR, KRBTKFILE, KRB5_CONFIG, LOCALDOMAIN, RES_OPTIONS, HOSTALIASES,
NLSPATH,
PATH_LOCALE, TERMINFO, TERMINFO_DIRS and TERMPATH variables as they too
can pose a
threat. If the TERMCAP variable is set and is a pathname, it too is
ignored.
Additionally, if the LC_* or LANGUAGE variables contain the / or %
characters, they
are ignored. If sudo has been compiled with SecurID support, the
VAR_ACE, USR_ACE
and DLC_ACE variables are cleared as well. The list of environment
variables that
sudo clears is contained in the output of sudo -V when run as root.
prev parent reply other threads:[~2002-11-19 5:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-19 4:22 Anton V. Denisov
2002-11-19 5:20 ` Ilya Palagin [this message]
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=3DD9CA15.4030106@fioc.kz \
--to=tux@fioc.kz \
--cc=sisyphus@altlinux.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 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