[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
port-i386/43639: sh allows user to source a directory
>Synopsis: sh allows user to source a directory
>Arrival-Date: Sun Jul 18 17:35:00 +0000 2010
>Originator: Billy Coutsis
NetBSD tamper.bmc.local 5.0.2 NetBSD 5.0.2 (GENERIC) #0: Sat Feb 6 17:53:27
sh seems to try and source the literal contents of a filesystem directory
entry, instead of failing with an error.
I can't think of a sane reason why a user would want to do this. For
comparison, bash on Linux fails with message "is a directory" and exit code 1.
1) From a /bin/sh shell, try and source a directory, eg. ". /" or ". /usr"
2) Observe that the shell seems to try and source the literal contents of the
filesystem directory entry.
Make the shell fail with an error when the user tries to do this. Of course,
any fix should not conflict with any standard that sh should conform to.
Main Index |
Thread Index |