https://bugzilla.novell.com/show_bug.cgi?id=883260 https://bugzilla.novell.com/show_bug.cgi?id=883260#c5 Josef Wolf <jw@raven.inka.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jw@raven.inka.de --- Comment #5 from Josef Wolf <jw@raven.inka.de> 2014-07-24 09:24:00 UTC --- (In reply to comment #1)
IMHO you should *not* link a common file like /root/.bash_history to /dev/null.
Symlinking something to /dev/null is common practice, IMHO.
If you want the bash not to use history then you may set if test "$UID" = 0 -o "$EUID" = 0; then export HISTFILE=/dev/null fi in /etc/profile.local
I don't think this would suffice. The symlink is there for the case that some environment variables (e.g. $HISTFILE) happen to leak through sudo/su.
but with this as well as with your ``solution'' you loose the possibilty to check for commands which may become part of the history file by an attacker.
Don't you expect an attacker to remove his traces? And wouldn't .bash_history be the first place he'd remove?
The script in the rpm of aaa_base makes sure that file like
/root/.bash_history /var/log/lastlog /var/log/faillog /var/log/wtmp /var/log/btmp /run/utmp
exists and have the correct owner ship as well as have the correct permissions.
Yeah, and that makes perfect sense. But that should be only done when they're regular files. Changing the scriptlet to something like: while read file owner mode; do test -e "$file" || touch "$file" test -f "$file" && chmod "$mode" "$file" test -f "$file" && chown "$owner" "$file" done <<EOT /root/.bash_history root:root 600 /var/log/lastlog root:root 644 /var/log/faillog root:root 600 /var/log/wtmp root:utmp 664 /var/log/btmp root:root 600 /run/utmp root:utmp 664 EOT would fix the problem and still ensure correct permissions on regular files. Do you see any problems with such a change? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.