From: "Igor Homyakov" <homyakov@ramax.spb.ru>
To: <mandrake-russian@altlinux.ru>
Subject: [mdk-re] [JT] Re: ./ in PATH
Date: Wed Sep 26 19:03:03 2001
Message-ID: <010101c1469d$212383f0$4901040a@homyakov> (raw)
In-Reply-To: <3BB1EA10.C78F11B2@infosite.ru>
----- Original Message -----
From: "Peter V. Saveliev" <peet@infosite.ru>
To: <mandrake-russian@altlinux.ru>
Sent: Wednesday, September 26, 2001 6:45 PM
Subject: Re: [mdk-re] ./ in PATH
> Igor Homyakov wrote:
>
> > Это очень старый спор. Основная причина почему это не надо делать:
> > атакующий получив (или уже имея) аккоунт на вашем хосте может
> > записать вредоносный код в /tmp/ls (например) после чего спровоцировать
> > вас на cd /tmp, теперь осталось только вам выполнить ls
> > и "оппаньки" :)) .
> >
> > В обычной жизни, достаточно не ставить . в PATH у root-а.
>
> И в /tmp/ls не писать строчку типа "rm -rf $HOME" ;)))
> А на самом деле, через некоторое время само собой приходит понимание, что
> ./script и script - не одно и то же, хотя бы и называется одинаково. Ведь
> дело не в злоумышленниках, а в том, что сам можешь написать скрипт для
> упрощения какой-либо деструктивной операции, и _забыть_ про него.
> Оказавшись в нужной директории и издав соответствующую команду, сразу
> поймешь, где зимуют раки. А посему - да здравствует which ls перед ее
> употреблением ;))
Со временем приходит понимание, почему не надо называть свои скрипты
так же как стандарный утилиты (случай с test, вошел уже во все FAQ)
P.S. Меня иногда совсем "переклинивает" после solaris и начинаю
/usr/local/gnu/bin/vim набирать. :)))))
--
Igor Homyakov RAMAX International
System Administrator Banking Technologies Department
<homyakov(at)ramax.spb.ru> http://www.ramax.com
next prev parent reply other threads:[~2001-09-26 19:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-09-26 17:58 [mdk-re] " Vladimir Karpinsky
2001-09-26 18:17 ` Igor Homyakov
2001-09-26 18:40 ` Peter V. Saveliev
2001-09-26 19:03 ` Igor Homyakov [this message]
2001-09-26 18:17 ` Peter V. Saveliev
2001-09-26 18:43 ` Re[2]: " Vladimir Karpinsky
2001-09-26 18:19 ` Gosha
2001-09-26 18:34 ` cornet
2001-09-26 22:16 ` John Profic
2001-09-28 20:43 ` [mdk-re] " Mikhail Zabaluev
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='010101c1469d$212383f0$4901040a@homyakov' \
--to=homyakov@ramax.spb.ru \
--cc=mandrake-russian@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 Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/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 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git