ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: "Dmitry V. Levin" <ldv@altlinux.org>
To: ALT Devel discussion list <devel@altlinux.org>
Subject: Re: [devel] suid/sgid programs and temporary files
Date: Tue, 16 Aug 2005 23:56:29 +0400
Message-ID: <20050816195629.GB2637@basalt.office.altlinux.org> (raw)
In-Reply-To: <20050816193136.GT19097@solemn.turbinal.org>

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

On Tue, Aug 16, 2005 at 11:31:36PM +0400, Alexey Tourbin wrote:
> В /usr/lib/perl5/File/Temp.pm есть функция проверки временного каталога,
> в котором будут созданы временные файлы.
> 
>    649  # internal routine to check to see if the directory is safe
>    650  # First checks to see if the directory is not owned by the
>    651  # current user or root. Then checks to see if anyone else
>    652  # can write to the directory and if so, checks to see if
>    653  # it has the sticky bit set
[...]
> Условия подчеркнутой проверки можно перевести примерно как
> 	st.st_uid > 10 && st.st_uid != getuid()
> 
> Вопрос: хорошо ли, что здесь используется real uid?  Не лучше ли
> проверять effective uid? 

Это зависит от семантики модуля.
Другими словами, для чего он предназначен.
При той информации, что содержится в комментарии, у меня складывается
ощущение, что проверять effective uid было бы логичнее.


-- 
ldv

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

  reply	other threads:[~2005-08-16 19:56 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-16 19:31 Alexey Tourbin
2005-08-16 19:56 ` Dmitry V. Levin [this message]
2005-08-16 21:42   ` [devel] " Alexey Tourbin
2005-08-16 22:06     ` Dmitry V. Levin
2005-08-16 22:34       ` Alexey Tourbin
2005-08-16 22:50         ` Dmitry V. Levin
2005-08-16 23:33           ` Alexey Tourbin
2005-08-16 23:38             ` Dmitry V. Levin
2005-08-16 23:52               ` Alexey Tourbin
2005-08-17  7:14         ` [devel] [wiki] " Michael Shigorin
2005-08-16 22:44       ` [devel] " Alexey Tourbin
2005-08-16 22:55         ` Dmitry V. Levin
2005-08-16 23:20           ` Alexey Tourbin
2005-08-16 23:30             ` Alexey Tourbin
2005-08-17  0:37               ` Alexey Tourbin
2005-08-17  0:46                 ` Alexey Tourbin
2005-08-17  3:02           ` Andrey Rahmatullin
2005-08-17  6:37             ` Alexey Tourbin

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=20050816195629.GB2637@basalt.office.altlinux.org \
    --to=ldv@altlinux.org \
    --cc=devel@altlinux.org \
    --cc=devel@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 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