-
Bug
-
Resolution: Not a Bug
-
Normal
-
None
-
rhel-8.7.0
-
None
-
Moderate
-
rhel-security-compliance
-
ssg_security
-
None
-
False
-
False
-
-
No
-
None
-
None
-
None
-
If docs needed, set a value
-
-
All
-
None
-
57,005
Description of problem:
With scap-security-guide, we ship 2 "similar" rules:
- xccdf_org.ssgproject.content_rule_configure_bashrc_tmux ("Support session locking with tmux (not enforcing)")
which ships the following snippet:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
if [ "$PS1" ]; then
parent=$(ps -o ppid= -p $$)
name=$(ps -o comm= -p $parent)
case "$name" in (sshd|login) tmux ;; esac
fi
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
- xccdf_org.ssgproject.content_rule_configure_bashrc_exec_tmux ("Support session locking with tmux")
which ships the following snippet:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
if [ "$PS1" ]; then
parent=$(ps -o ppid= -p $$)
name=$(ps -o comm= -p $parent)
case "$name" in (sshd|login) exec tmux ;; esac
fi
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
The difference being "exec tmux" in second rule, compared to just "tmux" in first rule.
Please explain why we ship xccdf_org.ssgproject.content_rule_configure_bashrc_tmux ("Support session locking with tmux (not enforcing)") at all, implementing this rule leads to non-sense when logging in, as shown in the example below:
1. ssh to the system
--> tmux started and "tmux prompt" is displayed
2. exit from tmux
--> initial "ssh" shell prompt is displayed
In a nutshell, once you do "ssh" on the system, you need to exit TWICE to get out of ssh. This is because it spawns "tmux" instead of "exec tmux" in first rule.
This doesn't make any sense to me.
Version-Release number of selected component (if applicable):
scap-security-guide
How reproducible:
Always, see above.
- external trackers