Mail Archives: cygwin/2008/04/28/11:02:21
In testing cygwin 1.7.0, I noticed that /etc/profile.d/user-fstab.sh blindly
slams /bin at the front of PATH. This is cruel to users, since it breaks the
1.5.x behavior of defaulting to /usr/local/bin at the front of PATH. It also
pollutes the user's environment with SYSCONFDIR, FSTABDIR, and FSTAB. Since
this file is sourced by /etc/profile, it seems like the fastest fix would be
making the entire body of the file behave as a subshell, so as not to pollute
the parent shell.
--- /etc/profile.d/user-fstab.sh.orig 2008-04-28 08:59:55.695117400 -0600
+++ /etc/profile.d/user-fstab.sh 2008-04-28 09:00:03.117039900 -0600
@@ -7,6 +7,7 @@
#
# The registry mount points are stored in a file /etc/fstab.d/<username>
#
+(
export PATH="/bin:$PATH"
SYSCONFDIR=/etc
@@ -95,3 +96,4 @@
echo " 0 0"
fi >> ${FSTAB}
fi
+)
--
Eric Blake
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -