Re: Bash should reset OLDPWD upon login, *only*.

2017-10-03 Thread L A Walsh
Eduardo Bustamante wrote: On Tue, Oct 3, 2017 at 5:01 PM, L A Walsh wrote: [...] Ah, because you can't protect against everything, you leave your system open with no passwords on the logins? What's your system name again? :-) Linda. This topic has no relation at all with the re

Re: Bash should reset OLDPWD upon login, *only*.

2017-10-03 Thread Eduardo Bustamante
On Tue, Oct 3, 2017 at 5:01 PM, L A Walsh wrote: [...] Ah, because you can't protect against everything, you leave your system > open with no passwords on the logins? What's your system name again? :-) Linda. This topic has no relation at all with the reported issue, and we're doing a disser

Re: Bash should reset OLDPWD upon login, *only*.

2017-10-03 Thread L A Walsh
Mikulas Patocka wrote: The problem is not intentional sabotage of /etc/profile (there are many other ways how to sabotage /etc/profile without $OLDPWD - and protecting against all of them is futile). --- Ah, because you can't protect against everything, you leave your system open with n

Re: Bash should reset OLDPWD upon login, *only*.

2017-10-03 Thread Greg Wooledge
On Tue, Oct 03, 2017 at 10:36:17PM +0200, Mikulas Patocka wrote: > The problem is that $OLDPWD causes unintended activations of the > automounter and unintended delays. For example > /root# cd /some/automounted/directory > /some/automounted/directory# cd ~ > /root# /etc/init.d/mail-daemon start >

Re: Bash should reset OLDPWD upon login, *only*.

2017-10-03 Thread Mikulas Patocka
On Mon, 2 Oct 2017, Chet Ramey wrote: > On 10/1/17 7:30 PM, L A Walsh wrote: > > > Only in the case of login -- they user CAN'T set it before they login, but > > someone **could** have changed the system /etc/profile script to set OLDPWD > > to /hang (i.e. someone is behaving "maliciously"). >

Re: [PATCH] Fix hang if $OLDPWD points to inaccessible directory

2017-10-03 Thread Mikulas Patocka
On Tue, 3 Oct 2017, Chet Ramey wrote: > On 10/3/17 4:14 PM, Mikulas Patocka wrote: > > > > > > On Sun, 1 Oct 2017, Chet Ramey wrote: > > > >> On 9/30/17 4:20 AM, Mikulas Patocka wrote: > >> > >>> Is there some reason why do we need to check if $OLDPWD is a real > >>> directory? dash and ksh

Re: [PATCH] Fix hang if $OLDPWD points to inaccessible directory

2017-10-03 Thread Chet Ramey
On 10/3/17 4:14 PM, Mikulas Patocka wrote: > > > On Sun, 1 Oct 2017, Chet Ramey wrote: > >> On 9/30/17 4:20 AM, Mikulas Patocka wrote: >> >>> Is there some reason why do we need to check if $OLDPWD is a real >>> directory? dash and ksh accept the $OLDPWD variable, but don't poke it >>> with th

Re: [PATCH] Fix hang if $OLDPWD points to inaccessible directory

2017-10-03 Thread Mikulas Patocka
On Sun, 1 Oct 2017, Chet Ramey wrote: > On 9/30/17 4:20 AM, Mikulas Patocka wrote: > > > Is there some reason why do we need to check if $OLDPWD is a real > > directory? dash and ksh accept the $OLDPWD variable, but don't poke it > > with the stat syscall. zsh clears $OLDPWD. > > It makes no

Re: IFS boundary behaviour is not consistent passing arguments to a function for bash 4.3 or 4.4 .

2017-10-03 Thread Chet Ramey
On 10/2/17 11:26 PM, McCue, Glenn (SSC/SPC) wrote: > The IFS behaves differently depending on how the command is structured. > This is my test script. It demonstrates the behavior change between 3.2 and > 4.[3|4]. > > The function "doit" lists the individual arguments that it has received. Mor

Re: IFS boundary behaviour is not consistent passing arguments to a function for bash 4.3 or 4.4 .

2017-10-03 Thread Greg Wooledge
On Tue, Oct 03, 2017 at 03:26:03AM +, McCue, Glenn (SSC/SPC) wrote: > ## list arguments in the function call. > echo "first_arg=$first_arg" > echo "RESULT_A=\`doit \"\$first_arg\":2:3:4:\$PATH\'" > OIFS=$IFS What on EARTH is this nonsense? Pass arguments to commands by quoting them properly.

IFS boundary behaviour is not consistent passing arguments to a function for bash 4.3 or 4.4 .

2017-10-03 Thread McCue, Glenn (SSC/SPC)
From: gmccue To: bug-bash@gnu.org Subject: IFS boundary error - bash 4.3 or 4.4 function call Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc -I/home/abuild/rpmbuild/BUILD/bash-4.3 -L/home/abuild/rpmbuild/BUILD/bash-4.3/../readline-

Re: Bash should reset OLDPWD upon login, *only*.

2017-10-03 Thread Greg Wooledge
On Mon, Oct 02, 2017 at 05:07:01PM -0700, L A Walsh wrote: > That's fine w/me -- I was just concerned about a local DoS, if someone > could "pollute" the login stuff. You'd have to be root, yes? > Hmm... there is a bash.bashrc in /etc Only if your OS vendor has built bash with that add-on.