X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Eric Blake Subject: user-fstab.sh is cruel Date: Mon, 28 Apr 2008 15:01:38 +0000 (UTC) Lines: 27 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit User-Agent: Loom/3.14 (http://gmane.org/) X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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/ # +( 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/