Re: [Cooker] RC2: bash: TMOUT: readonly variable bug *still* there

2002-09-25 Thread Ben Reser

On Tue, Sep 10, 2002 at 04:17:51PM -0400, Richard Tango-Lowy wrote:
 We're not done yet! I've done fresh installs of each beta, as well as
 rc1, and keep having this problem. It's easy to fix, but what can be
 done to prevent it from happening?

After talking to him offlist (email and IRC) I now realize that he was
only getting this upon resource his bashrc file.  While I wouldn't
consider it normal behavior to get the TMOUT error message:
bash: TMOUT: readonly variable
upon just starting a new shell/terminal.  I do think it is
normal/appropriate in the case of resourcing the bashrc scripts.

The error message is telling you that something is attempting to modify
the TMOUT environment variable that has been marked readonly.  In most
cases this is /etc/profile.d/msec.sh that is doing this.  

Potentially we can work around this by setting an environment variable
to prevent the msec.sh shell script from being resourced if it's already
been done.  However I think this is sort of solution is contrary to a
*nix design philosophy of letting you do stupid things.  

In this case it isn't really harming anything and I think very few users
resource their shell scripts and when they do I don't think it's a big
deal that they might get an error message.

Users who find this behavior undesirable can comment out (place a # at
the start of the line) the following line in /etc/profile.d/msec.sh:
[ -n $TMOUT ]  typeset -r TMOUT

This workaround comes at the disadvantage of not allowing admins to lock
the shell timeout to whatever policy they set in msec or that msec sets
through their security level.

Removing the /etc/sysconfig/msec file or removing the TMOUT= line from
that file is not a solution.  This file is rebuilt every time msec is run
so the bug will go away until the security level is changed or msec gets
run by a cron job.

In the future a better solution rather than asking users to comment a
file out of a shell script would be to add enabling and disabling
setting as read only of this parameter as an option in
/etc/sysconfig/msec/level.local

An option like set_shell_timeout_readonly that takes a true or false
parameter which then sets an env variable like say TMOUT_RO in
/etc/sysconfig/msec whenever msec is run.

/etc/profile.d/msec.sh would then have the following line in it:
[ $TMOUT_RO == 1 ]  [ -n $TMOUT ]  typset -r TMOUT

Then to clean up and not leave an unneeded shell variable laying around
one can follow that line by:
unset TMOUT_RO

This allows for more configurability and makes it easier to tell users
how to work around that issue.  Because then it'd just be Run this
command:
echo 'set_shell_timeout_readonly(0)'  /etc/sysconfig/msec/level.local

And it could also be added to draksec.

Hopefully this change can let us close this as a real bug report and
limit it to a simple support issue that can be configured from a pretty
GUI for end users. :)

-- 
Ben Reser [EMAIL PROTECTED]
http://ben.reser.org

Never take no as an answer from someone who isn't authorized to say yes.




Re: [Cooker] RC2: bash: TMOUT: readonly variable bug *still* there

2002-09-10 Thread Peter Ruskin

On Tuesday 10 Sep 2002 06:36, Ben Reser wrote:
 On Mon, Sep 09, 2002 at 04:45:41PM +0100, Peter Ruskin wrote:
  bash: TMOUT: readonly variable
  [14:51 peter@penguin: ~]
  $
 
  This is an old bug that keeps coming back.

 No the bug is not back...  You have something messed up in your own
 personal config scripts in your homedir.  Try making a new user and
 logging in as that user.  I'm willing to be you can't replicate it if
 you do that.

You said that before, Ben.  It isn't true.  This happens with all users, 
including a new one.  It's caused by the last line in 
/etc/profile.d/msec.sh
[ -n $TMOUT ]  typeset -r TMOUT
If I comment that the message goes away.
-- 
Mandrake Linux release 9.0 (rc2) for i586.  KDE: 3.0.3  Qt: 3.0.5
AMD Athlon(tm) XP 1600+ 512MB.  Kernel: 2.4.19-9mdk.GCC 3.2
Linux user #275590 (http://counter.li.org/).  up 26 min.
#=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=#





Re: [Cooker] RC2: bash: TMOUT: readonly variable bug *still* there

2002-09-10 Thread Peter Ruskin

On Tuesday 10 Sep 2002 11:58, Guillaume Cottenceau wrote:
 Ben Reser [EMAIL PROTECTED] writes:
  On Mon, Sep 09, 2002 at 04:45:41PM +0100, Peter Ruskin wrote:
   bash: TMOUT: readonly variable
   [14:51 peter@penguin: ~]
   $
  
   This is an old bug that keeps coming back.
 
  No the bug is not back...  You have something messed up in your own
  personal config scripts in your homedir.  Try making a new user and
  logging in as that user.  I'm willing to be you can't replicate it
  if you do that.

 Or maybe you have some .rpmnew files lying around.

 # rpmdrake --merge-all-rpmnew
 may help.

That was it - thanks.  I had a nice new /etc/sysconfig/msec.rpmnew which 
is empty - that will do fine.
-- 
Gentoo Linux (portage-2.0.36).  KDE: 3.0.3  Qt: 3.0.5
AMD Athlon(tm) XP 1600+ 512MB.  Kernel: 2.4.19-win4lin. GCC 3.2
Linux user #275590 (http://counter.li.org/).  up 59 min.
#=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=#





Re: [Cooker] RC2: bash: TMOUT: readonly variable bug *still* there

2002-09-10 Thread Guillaume Cottenceau

Ben Reser [EMAIL PROTECTED] writes:

 On Mon, Sep 09, 2002 at 04:45:41PM +0100, Peter Ruskin wrote:
  bash: TMOUT: readonly variable
  [14:51 peter@penguin: ~]
  $
  
  This is an old bug that keeps coming back.
 
 No the bug is not back...  You have something messed up in your own
 personal config scripts in your homedir.  Try making a new user and
 logging in as that user.  I'm willing to be you can't replicate it if
 you do that.

Or maybe you have some .rpmnew files lying around.

# rpmdrake --merge-all-rpmnew

may help.

-- 
Guillaume Cottenceau - http://people.mandrakesoft.com/~gc/




Re: [Cooker] RC2: bash: TMOUT: readonly variable bug *still* there

2002-09-10 Thread Richard Tango-Lowy

We're not done yet! I've done fresh installs of each beta, as well as
rc1, and keep having this problem. It's easy to fix, but what can be
done to prevent it from happening?

Rich

On Tue, 2002-09-10 at 08:27, Peter Ruskin wrote:
 Or maybe you have some .rpmnew files lying around.

 # rpmdrake --merge-all-rpmnew
 may help.

That was it - thanks.  I had a nice new /etc/sysconfig/msec.rpmnew which 
is empty - that will do fine.
-- 
ars Cognita   Richard Tango-Lowy
  -
  President
  [EMAIL PROTECTED]
  603 424-0713



signature.asc
Description: This is a digitally signed message part


[Cooker] RC2: bash: TMOUT: readonly variable bug *still* there

2002-09-09 Thread Peter Ruskin

bash: TMOUT: readonly variable
[14:51 peter@penguin: ~]
$

This is an old bug that keeps coming back.
-- 
Mandrake Linux release 9.0 (rc2) for i586.  KDE: 3.0.3  Qt: 3.0.5
AMD Athlon(tm) XP 1600+ 512MB.  Kernel: 2.4.19-9mdk.GCC 3.2
Linux user #275590 (http://counter.li.org/).  up 1:38.
#=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=#





Re: [Cooker] RC2: bash: TMOUT: readonly variable bug *still* there

2002-09-09 Thread Ben Reser

On Mon, Sep 09, 2002 at 04:45:41PM +0100, Peter Ruskin wrote:
 bash: TMOUT: readonly variable
 [14:51 peter@penguin: ~]
 $
 
 This is an old bug that keeps coming back.

No the bug is not back...  You have something messed up in your own
personal config scripts in your homedir.  Try making a new user and
logging in as that user.  I'm willing to be you can't replicate it if
you do that.

-- 
Ben Reser [EMAIL PROTECTED]
http://ben.reser.org

Never take no as an answer from someone who isn't authorized to say yes.