| Summary: | 01msec.sh causes "-bash: TMOUT: readonly variable" error message | ||
|---|---|---|---|
| Product: | Mageia | Reporter: | Bit Twister <bittwister2> |
| Component: | RPM Packages | Assignee: | Mageia tools maintainers <mageiatools> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Normal | CC: | cae, curtis_mageia, dvgevers, ftg, jani.valimaa, krnekit, mageia, mageia, ngompa13, rfox, shlomif, yvesbrungard |
| Version: | Cauldron | Keywords: | 6sta2 |
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| See Also: | https://bugs.mageia.org/show_bug.cgi?id=22317 | ||
| Whiteboard: | MGA5TOO,MGA6TOO | ||
| Source RPM: | msec-2.5-1.mga7.src.rpm | CVE: | |
| Status comment: | |||
|
Description
Bit Twister
2015-07-12 14:36:19 CEST
Bit Twister
2016-07-06 20:20:17 CEST
Summary:
01msec.sh causes "-bash: TMOUT: readonly variable" error message =>
6_s1: 01msec.sh causes "-bash: TMOUT: readonly variable" error message 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
Samuel Verschelde
2016-11-01 15:54:11 CET
Version:
5 =>
Cauldron working in 6 sta2 Status:
NEW =>
RESOLVED 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_s2
Bit Twister
2017-01-31 18:33:25 CET
Keywords:
(none) =>
6sta2
papoteur
2018-01-02 10:31:15 CET
CC:
(none) =>
yves.brungard_mageia 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.rpm (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
Marja Van Waes
2018-01-05 11:38:41 CET
See Also:
(none) =>
https://bugs.mageia.org/show_bug.cgi?id=22317
Nikita Krupenko
2018-01-07 00:16:05 CET
CC:
(none) =>
krnekit Issue still exists as of latest Cauldron CC:
(none) =>
rfox
Neal Gompa
2018-01-25 17:48:41 CET
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
Dick Gevers
2018-02-05 10:12:18 CET
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
Curtis Hildebrand
2018-05-22 07:42:45 CEST
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 regardsStatus:
REOPENED =>
RESOLVED |