public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Boyd Stephen Smith Jr." <bss03@volumehost.net>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] bash wizardry needed: PATH and MANPATH grow and grow and grow
Date: Wed, 5 Jul 2006 14:33:42 -0500	[thread overview]
Message-ID: <200607051433.51500.bss03@volumehost.net> (raw)
In-Reply-To: <169ffc030606031411x5ad27411qf6620f2c7f739462@mail.gmail.com>

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

On Saturday 03 June 2006 16:11, znx <znxster@gmail.com> wrote about 'Re: 
[gentoo-user] bash wizardry needed: PATH and MANPATH grow and grow and 
grow':
> On 27/05/06, Kevin O'Gorman <kogorman@gmail.com> wrote:
> >  Open to debate.  I'd think it's not very dangerous at the *end* of
> > the PATH.
>
> True, I have modified the script so that a . may enter the PATH (etc)
> only as the final entry. Also good point about ~/bin .. it is just as
> dangerous.

Actually, it's not as dangerous.  ~/bin is a well-known location that is 
(normally) only writable by the user themselves.  '.' is a floating 
location, that may (from time to time) refer to a directory that is 
world-writable like /tmp, /var/tmp, or /dev/shm.

Having '.' in your path allows arbitrary guest users to run programs with 
your permissions.  Putting it at the end of your PATH prevents them from 
shadowing existing commands, but doesn't prevent them from taking 
advantage of typos.

Having ~/bin or even just ~ in your PATH does not open this security hole 
unless you also make that directory world writable.

-- 
"If there's one thing we've established over the years,
it's that the vast majority of our users don't have the slightest
clue what's best for them in terms of package stability."
-- Gentoo Developer Ciaran McCreesh

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

  reply	other threads:[~2006-07-05 19:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-21 22:56 [gentoo-user] bash wizardry needed: PATH and MANPATH grow and grow and grow Kevin O'Gorman
2006-05-23 20:06 ` znx
2006-05-24 14:58   ` Kevin O'Gorman
2006-05-26  1:27     ` znx
2006-05-27  2:52       ` Kevin O'Gorman
2006-06-03 21:11         ` znx
2006-07-05 19:33           ` Boyd Stephen Smith Jr. [this message]
2006-07-07 18:31             ` Kevin O'Gorman

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=200607051433.51500.bss03@volumehost.net \
    --to=bss03@volumehost.net \
    --cc=gentoo-user@lists.gentoo.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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox