Your message dated Wed, 28 Jan 2015 17:25:33 +0100
with message-id <[email protected]>
and subject line Re: Bug#775704: bash: $PATH ending in colon puts working
directory in PATH
has caused the Debian Bug report #775704,
regarding bash: $PATH ending in colon puts working directory in PATH
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
775704: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=775704
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: bash
Version: 4.3-11+b1
Severity: important
Tags: upstream
Dear Maintainer,
if the value of $PATH ends in a colon (':'), skripts in the current directory
are executed without requiring the './' path-prefix.
The current directory is the last one taken into account though.
Here is, how I triggerd the bug:
----8<--- SNIP ----8<----
sh# /bin/bash
sh# cd /tmp
sh# echo '#!/usr/bin/env perl' > test.pl
sh# echo 'print "In PATH...\n"' >> test.pl
sh# chmod u+x test.pl
# Now set $PATH to a sensible value:
sh# export PATH=~/bin:/bin:/usr/bin:/usr/local/bin
sh# test.pl
bash: test.pl: Command not found.
# Now set $PATH to the same value, colon appended:
sh# export PATH=~/bin:/bin:/usr/bin:/usr/local/bin:
sh# test.pl
In PATH...
---->8--- SNIP ---->8----
I'd expected the last line of output to be:
bash: test.pl: Command not found.
# bash --version
GNU bash, Version 4.3.30(1)-release (x86_64-pc-linux-gnu)
Debian testing.
-- System Information:
Debian Release: 8.0
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 3.16.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages bash depends on:
ii base-files 8
ii dash 0.5.7-4+b1
ii debianutils 4.4+b1
ii libc6 2.19-13
ii libncurses5 5.9+20140913-1
ii libtinfo5 5.9+20140913-1
Versions of packages bash recommends:
ii bash-completion 1:2.1-4
Versions of packages bash suggests:
ii bash-doc 4.3-11
-- no debconf information
--- End Message ---
--- Begin Message ---
On 01/19/2015 03:28 AM, Bob Proulx wrote:
> Sebastian Rose wrote:
>> if the value of $PATH ends in a colon (':'), skripts in the current directory
>> are executed without requiring the './' path-prefix.
>
> Thank you for your report. However what you are seeing is not a bug.
> It is required behavior. An empty path is the same as saying '.'.
> That is the way it is supposed to work. Here is the documentation
> from the manual.
>
> PATH The search path for commands. It is a colon-separated list of
> directories in which the shell looks for commands (see
> COMMAND EXECUTION below). A zero-length (null) directory
> name in the value of PATH indicates the current directory. A
> null directory name may appear as two adjacent colons, or as
> an initial or trailing colon. The default path is
> system-dependent, and is set by the administrator who
> installs bash. A common value is
> ``/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin''.
yes, not a bug. closing.
--- End Message ---