MLUG: Re: symlinks and security (was Re: [MLUG] Found tomcat problem)
Re: symlinks and security (was Re: [MLUG] Found tomcat problem)
Email address obfuscation in effect -- please click here to turn it off.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
On Wed, 16 Apr 2003, Mark Rages wrote:

> A totally unrelated symlink note:
>
> Different shells handle symlinks in different ways:
> [EMAIL:PROTECTED mark]$ bash
> [EMAIL:PROTECTED mark]$ mkdir a
> [EMAIL:PROTECTED mark]$ ln -s a b
> [EMAIL:PROTECTED mark]$ cd b
> [EMAIL:PROTECTED b]$ pwd
> /home/mark/b
> [EMAIL:PROTECTED b]$ tcsh
> [EMAIL:PROTECTED ~/b]$ pwd
> /home/mark/a


But check this out.  This is all tcsh:

> mkdir a
> ln -s a b
> cd b
> pwd
/taxa1/home/mbmiller/a
> echo $PWD
/taxa1/home/mbmiller/b

So within tcsh, it depends on how you ask for the working directory.  But
this is where it gets weird:

starting with bash, then tcsh...

$ mkdir -p a/b/c/d
$ ln -s a/b/c/d b
$ cd b
$ pwd
/taxa1/home/mbmiller/b
$ cd ..
$ pwd
/taxa1/home/mbmiller
$ tcsh
> cd b
> pwd
/taxa1/home/mbmiller/a/b/c/d
> cd ..
/taxa1/home/mbmiller/a/b/c

So the behavior of bash and tcsh is very different!  It isn't just the way
they display the current location, it's also how they change directories.

Mike
_______________________________________________
members mailing list
EMAIL:PROTECTED
http://mlug.missouri.edu/mailman/listinfo/members