bash: shell commands are no longer logged to /var/log/bash.log
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
StarlingX |
Fix Released
|
High
|
Zhixiong Chi |
Bug Description
Brief Description
-----------------
Shell commands are no longer written to /var/log/bash.log in recent master branch.
And when the os is started, there is no the /var/log/bash.log file.
Only when set the shopt variable, the commands will be logged into the /var/log/bash.log file.
controller-0:~$ sudo tail -l /var/log/bash.log
Password:
tail: cannot open ‘/var/log/bash.log’ for reading: No such file or directory
controller-0:~$ shopt -p |grep syslog_history
shopt -u syslog_history
controller-0:~$ shopt -s syslog_history
controller-0:~$ shopt -p |grep syslog_history
shopt -s syslog_history
controller-0:~$ shopt -u syslog_history
controller-0:~$ sudo tail -l /var/log/bash.log
2021-03-
Severity
--------
Major
Steps to Reproduce
------------------
Install controller-0 node
controller-0:~$ sudo tail -l /var/log/bash.log
Password:
tail: cannot open ‘/var/log/bash.log’ for reading: No such file or directory
controller-0:~$ shopt -p |grep syslog_history
shopt -u syslog_history
controller-0:~$ shopt -s syslog_history
controller-0:~$ shopt -p |grep syslog_history
shopt -s syslog_history
controller-0:~$ shopt -u syslog_history
controller-0:~$ sudo tail -l /var/log/bash.log
2021-03-
Expected Behavior
------------------
When we login the controller-0 node, we can see the history of the shell commands.
Actual Behavior
----------------
The log file is not here.
Reproducibility
---------------
100% Reproducible on all nodes.
System Configuration
-------
Every node system.
Branch/Pull Time/Commit
-------
stx master: Feb 22, 2021
Last Pass
---------
stx master: Jan 22,2021
Timestamp/Logs
--------------
Issue is reproducible
Test Activity
-------------
Manually scan the log file
Workaround
----------
Set the shopt variable for syslog_history.
CVE References
Changed in starlingx: | |
assignee: | nobody → Zhixiong Chi (zhixiongchi) |
status: | New → In Progress |
Changed in starlingx: | |
status: | Fix Committed → Fix Released |
stx.5.0 / high - issue introduced by a recent upversion of the bash package