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

Conversation

sever-sever
Copy link
Member

Change Summary

This fix is for a bug when sudo commands are not sent to the remote syslog server.
They stopped before the directive that includes all configurations $IncludeConfig /etc/rsyslog.d/*.conf

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe):

Related Task(s)

Related PR(s)

Component(s) name

rsyslog, syslog

Proposed changes

How to test

set system syslog global facility all level 'all'
set system syslog global facility local7 level 'debug'
set system syslog host 192.168.122.11 facility all level 'all'

Before the fix, we do not see logs with sudo commands
After the fix the expected logs are exists on the remote rsyslog server

2024-04-23T18:42:04+00:00 r4 sudo:     vyos : TTY=pts/0 ; PWD=/home/vyos ; USER=root ; COMMAND=/usr/sbin/ip link
2024-04-23T18:42:10+00:00 r4 sudo:     vyos : TTY=pts/0 ; PWD=/home/vyos ; USER=root ; COMMAND=/usr/sbin/ip link
2024-04-23T18:49:25+00:00 r4 sudo:     vyos : TTY=pts/0 ; PWD=/home/vyos ; USER=root ; COMMAND=/usr/sbin/ip link show

Smoketest result

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • I have run the components SMOKETESTS if applicable
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

This fix for bug when `sudo` commands were not send to the remote
syslog server. They stop before the directive that includes all
configurations `$IncludeConfig /etc/rsyslog.d/*.conf`
@vyosbot vyosbot requested a review from a team April 23, 2024 15:50
@vyosbot vyosbot requested review from dmbaturin, sarthurdev, zdc, jestabro and c-po and removed request for a team April 23, 2024 15:50
@c-po c-po merged commit 5486417 into vyos:current Apr 23, 2024
9 checks passed
@c-po
Copy link
Member

c-po commented Apr 24, 2024

@Mergifyio backport sagitta

Copy link
Contributor

mergify bot commented Apr 24, 2024

backport sagitta

✅ Backports have been created

sever-sever added a commit that referenced this pull request Apr 24, 2024
T6109: Fix remote logging for sudo commands (backport #3355)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants