Description of problem: /etc/profile.d/01msec.sh causes "-bash: TMOUT: readonly variable" error message Version-Release number of selected component (if applicable): How reproducible: always Steps to Reproduce: You need steps 1 - 4 workaround to bypass bug 14778 1. click up a terminal 2. su - root 3. ln -s /etc/security/shell /etc/sysconfig/shell 4. exit 5. su - $USER Result should be $ su - $USER Password: -bash: TMOUT: readonly variable #**************** note ************** grep 500 /etc/profile.d/* Should those be changed to UID_MIN value as seen in grep UID_MIN /etc/login.defs Reproducible: Steps to Reproduce:
Summary: 01msec.sh causes "-bash: TMOUT: readonly variable" error message => 6_s1: 01msec.sh causes "-bash: TMOUT: readonly variable" error messageSource RPM: msec-1.11-2.mga5.src.rpm => msec-2.1-1.mga6.src.rpm
Assigning to Mageia Tools maintainer group. To the bug reporter: is this issue still present in cauldron?
Assignee: bugsquad => mageiatools
Yes I believe so. /etc/profile.d/10tmpdir.sh is checking /etc/sysconfig/shell instead of /etc/security/shell where SECURE_TMP=yes set via mcc->Security->Configure system security, permissions and audit->Security settings->System security Running step 3 is a workaround until /etc/profile.d/10tmpdir.sh is fixed. My install change script disabled the problem but something put it back. $ cat /etc/security/shell ALLOW_CURDIR_IN_PATH=no UMASK_ROOT=022 SECURE_TMP=yes #TMOUT=0 UMASK_USER=022 TMOUT=0 Which causes triggers the TMOUT message. [bittwister@wb ~]$ su - $USER Password: -bash: TMOUT: readonly variable
Version: 5 => CauldronWhiteboard: (none) => MGA5TOO
working in 6 sta2
Status: NEW => RESOLVEDResolution: (none) => FIXED
Sorry, I forgot one of install scripts patched the problem. Something reset my settings and shows the problem still exists. $ diff -bBw /var/local/data/sys_audit/shell /etc/security/shell 3c3 < SECURE_TMP=no --- > SECURE_TMP=yes 5a6 > TMOUT=0
Status comment: (none) => 6_s2Status: RESOLVED => REOPENEDResolution: FIXED => (none)Summary: 6_s1: 01msec.sh causes "-bash: TMOUT: readonly variable" error message => 01msec.sh causes "-bash: TMOUT: readonly variable" error messageSource RPM: msec-2.1-1.mga6.src.rpm => msec-2.2-1.mga6.src.rpm
Keywords: (none) => 6sta2Status comment: 6_s2 => (none)
CC: (none) => yves.brungard_mageiaSource RPM: msec-2.2-1.mga6.src.rpm => initscripts
Unless you can show me otherwise I believe the Source RPM: field should contain the rpm containing the file in question.
Source RPM: initscripts => msec-2.5-1.mga7.src.rpmWhiteboard: MGA5TOO => MGA5TOO,MGA6TOO
(In reply to Bit Twister from comment #5) > Unless you can show me otherwise I believe the Source RPM: field should > contain the rpm containing the file in question. Yes, this is why I changed it: urpmf 10tmpdir.sh initscripts:/etc/profile.d/10tmpdir.sh You said: > Running step 3 is a workaround until /etc/profile.d/10tmpdir.sh is fixed.
But the typeset code causing the message is in /etc/profile.d/01msec.sh :) grep TMOUT /etc/profile.d/01msec.sh [ -n "$TMOUT" ] && type typeset > /dev/null 2>&1 && typeset -r TMOUT
See Also: (none) => https://bugs.mageia.org/show_bug.cgi?id=22317
*** Bug 22317 has been marked as a duplicate of this bug. ***
CC: (none) => ftg
CC: (none) => krnekit
Issue still exists as of latest Cauldron
CC: (none) => rfox
CC: (none) => ngompa13
The problem is that 01msec.sh sources /etc/security/shell and sets TMOUT to readonly. Then 10tmpdir.sh sources /etc/security/shell again, but as TMOUT is already readonly bash outputs an error. One option is to rename 01msec.sh such way that it's called after 10tmpdir.sh, but I guess there's a reason for its name. To run it at the very beginning.
CC: (none) => jani.valimaa
If it is bothersome and you want it to disappear simply comment out its entry in /etc/profile.d/01msec.sh (bottom portion from 01msec.sh example) export SECURE_LEVEL #prevent TMOUT #[ -n "$TMOUT" ] && type typeset > /dev/null 2>&1 && typeset -r TMOUT # msec.sh ends here
CC: (none) => cae
CC: (none) => dvgevers
Adding myself to the CC because this bug bothers me too.
CC: (none) => shlomif
(In reply to Charles Edwards from comment #11) > If it is bothersome and you want it to disappear simply comment out its > entry in /etc/profile.d/01msec.sh > > > (bottom portion from 01msec.sh example) > > export SECURE_LEVEL > #prevent TMOUT > #[ -n "$TMOUT" ] && type typeset > /dev/null 2>&1 && typeset -r TMOUT > > # msec.sh ends here I plan to release msec. Should I include this modifications, thus deleting these lines? Or renaming 01msec.sh in 01tmsec.sh to execute it after 01tmpdir.sh?
If its inclusion serves a useful purpose I would say change it to run after 01tmpdir.sh. Personally, I see no purpose and on this system I commented out the entries.
Can't we just factorize /etc/security/shell sourcing in an earlier profile.d script?
CC: (none) => mageia
CC: (none) => curtis_mageia
Ping ?
I fixed resourcing of /etc/security/shell in profile.d script by associating it sourcing with a SECSHELL variable. The problem should be considered fixed when initscripts-9.78-6.mga7 and msec-2.6-4.mga7 reach cauldron mirrors. I fixed /etc/profile.d/{01msec.sh,10tmpdir.sh} for this resourcing if other scripts are affected feel free to use this new block in it : if [ -z "$SECSHELL" -a -r /etc/security/shell ]; then . /etc/security/shell export SECSHELL=1 fi Best regards
Status: REOPENED => RESOLVEDCC: (none) => mageiaResolution: (none) => FIXED