Skip to content

Commit

Permalink
Improve sudo cat command for RO user. (sonic-net#14428)
Browse files Browse the repository at this point in the history
Improve sudo cat command for RO user.

#### Why I did it
RO user can use sudo command show none syslog files.

#### How I did it
Improve sudo cat command for RO user.

#### How to verify it
Pass all UT.
Manually check fixed code work correctly.

#### Description for the changelog
Improve sudo cat command for RO user.
  • Loading branch information
liuh-80 authored and mssonicbld committed Apr 20, 2023
1 parent aea1980 commit 77e06a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion files/image_config/sudoers/sudoers
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Defaults lecture_file = /etc/sudoers.lecture

# Cmnd alias specification
# Note: bcmcmd is dangerous for users in read only netgroups because it may operate ASIC
Cmnd_Alias READ_ONLY_CMDS = /bin/cat /var/log/syslog*, \
Cmnd_Alias READ_ONLY_CMDS = /bin/cat /var/log/syslog, /bin/cat /var/log/syslog.1 /var/log/syslog, /bin/cat /var/log/syslog.1, \
/bin/ip netns identify [0-9]*, \
/sbin/brctl show, \
/usr/bin/docker exec snmp cat /etc/snmp/snmpd.conf, \
Expand Down

0 comments on commit 77e06a7

Please sign in to comment.