Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

T6109: Fix remote logging for sudo commands #3355

Merged
merged 1 commit into from
Apr 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions src/etc/rsyslog.conf
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,6 @@ $KLogPath /proc/kmsg
#### GLOBAL DIRECTIVES ####
###########################

# The lines below cause all listed daemons/processes to be logged into
# /var/log/auth.log, then drops the message so it does not also go to the
# regular syslog so that messages are not duplicated

$outchannel auth_log,/var/log/auth.log
if $programname == 'CRON' or
$programname == 'sudo' or
$programname == 'su'
then :omfile:$auth_log

if $programname == 'CRON' or
$programname == 'sudo' or
$programname == 'su'
then stop

# Use traditional timestamp format.
# To enable high precision timestamps, comment out the following line.
# A modern-style logfile format similar to TraditionalFileFormat, buth with high-precision timestamps and timezone information
Expand Down Expand Up @@ -60,6 +45,21 @@ $Umask 0022
#
$IncludeConfig /etc/rsyslog.d/*.conf

# The lines below cause all listed daemons/processes to be logged into
# /var/log/auth.log, then drops the message so it does not also go to the
# regular syslog so that messages are not duplicated

$outchannel auth_log,/var/log/auth.log
if $programname == 'CRON' or
$programname == 'sudo' or
$programname == 'su'
then :omfile:$auth_log

if $programname == 'CRON' or
$programname == 'sudo' or
$programname == 'su'
then stop

###############
#### RULES ####
###############
Expand Down
Loading