🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.uu.comp.os.linux.questions
Article #144

Re: Can Red Hat Linux run Shell Script?

#144
From: 'Dungeon' Dave
Date: Sun, 29 Aug 1999 00:00
38 lines
2805 bytes
In article <xak3dx9tvfs.fsf@par.univie.ac.at>, Alex Pozgaj
<alex@par.univie.ac.at> writes
>> > If you don't like the ./ in front of you're script_FileName make sure "." is 
>part
>> > of the PATH environment variable.
>> 
>> This is VERY bad advise. Having "." in your PATH env is a HUGE 
>security
>> risk.
>> 
>> It is far better to get into the habbit of using ./
>
>It is - if you are root. Otherwise it's OK.

No, it's not. It is still a BIG security problem, as an ordinary user
could run a program from someone else's directory rather than
run the system-wide program. eg: if I put:

chmod 777 ~$HOME/*  1&2>/dev/null
echo $LOGNAME permissions open >>.testrc
ls $*

as a script file in my home directory (or hid it in /etc) and someone
went in there and typed "ls" to look at my directory, it'd open their
file permissions wide open and include an entry in a .testrc file to
let me know.

It's far better to get into the habit of  using ./ to address the file
directly, rather than risk running something that could be hidden
elsewhere but still on my path. Too many security problems have
been caused by privileged users typing commands that are fine
for their ordinary login but potentially catastrophic during their
privileged login session. You can't compensate for bad practise!!

-- 
 
Linux: love it or loathe it, it's here to stay!!
(I need a service pack for my tagline)
Technical Details
Message-ID: <83qb7sAQ+ay3EwRU@ghastly.demon.co.uk>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <7plmre$8e1$1@toto.tig.com.au> <37C0B070.B4EA4E44@softhome.net> <37C14000.63EBEC59@total4.nl> <Pine.LNX.4.10.9908231507180.1457-100000@laptop.jasonclifford.com> <xak3dx9tvfs.fsf@par.univie.ac.at>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fe2cf,d9db4d784d4d5b62
X-Google-Attributes: gidfe2cf,public
X-Google-Thread: 10d8ad,d9db4d784d4d5b62
X-Google-Attributes: gid10d8ad,public
X-Google-Thread: 102983,d9db4d784d4d5b62
X-Google-Attributes: gid102983,public
X-Google-Thread: fcfb9,d9db4d784d4d5b62
X-Google-Attributes: gidfcfb9,public
X-Google-Thread: f9b51,d9db4d784d4d5b62
X-Google-Attributes: gidf9b51,public
X-Google-Thread: 10a997,d9db4d784d4d5b62
X-Google-Attributes: gid10a997,public
X-Google-Thread: 1101c9,d9db4d784d4d5b62
X-Google-Attributes: gid1101c9,public
From: 'Dungeon' Dave <Dungeon@ghastly.demon.co.uk>
Subject: Re: Can Red Hat Linux run Shell Script?
Date: 1999/08/29
Message-ID: <83qb7sAQ+ay3EwRU@ghastly.demon.co.uk>
X-Deja-AN: 518640071
X-NNTP-Posting-Host: ghastly.demon.co.uk:193.237.153.154
References: <7plmre$8e1$1@toto.tig.com.au> <37C0B070.B4EA4E44@softhome.net> <37C14000.63EBEC59@total4.nl> <Pine.LNX.4.10.9908231507180.1457-100000@laptop.jasonclifford.com> <xak3dx9tvfs.fsf@par.univie.ac.at>
X-Complaints-To: abuse@demon.net
X-Trace: news.demon.co.uk 935964697 nnrp-13:27260 NO-IDENT ghastly.demon.co.uk:193.237.153.154
Organization: Blank
MIME-Version: 1.0
Newsgroups: alt.uu.comp.os.linux.questions,at.linux,aus.computers.linux,comp.os.linux.advocacy,comp.os.linux.setup,linux.redhat,uk.comp.os.linux