From 62800c69ba8b635d95246140869e8e88e533c84f Mon Sep 17 00:00:00 2001 From: Arvindsrinivasan Lakshmi Narasimhan Date: Thu, 28 Jan 2021 01:26:45 +0000 Subject: [PATCH 1/2] add ip netns identify command to sudoer Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan --- files/image_config/sudoers/sudoers | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/files/image_config/sudoers/sudoers b/files/image_config/sudoers/sudoers index 4c2e684b4b1f..d89ce8f7687c 100644 --- a/files/image_config/sudoers/sudoers +++ b/files/image_config/sudoers/sudoers @@ -35,7 +35,9 @@ Cmnd_Alias READ_ONLY_CMDS = /bin/cat /var/log/syslog*, \ /usr/local/bin/lldpshow, \ /usr/local/bin/psuutil *, \ /usr/local/bin/sonic-installer list, \ - /usr/local/bin/sfputil show * + /usr/local/bin/sfputil show *, \ + /bin/ip netns identify * + Cmnd_Alias PASSWD_CMDS = /usr/local/bin/config tacacs passkey *, \ /usr/sbin/chpasswd * From 4006b44e45aad43e7d58529a6065876d1e78cd8a Mon Sep 17 00:00:00 2001 From: Arvindsrinivasan Lakshmi Narasimhan Date: Fri, 29 Jan 2021 01:45:54 +0000 Subject: [PATCH 2/2] address review comments Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan --- files/image_config/sudoers/sudoers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/image_config/sudoers/sudoers b/files/image_config/sudoers/sudoers index d89ce8f7687c..9a7902704194 100644 --- a/files/image_config/sudoers/sudoers +++ b/files/image_config/sudoers/sudoers @@ -36,7 +36,7 @@ Cmnd_Alias READ_ONLY_CMDS = /bin/cat /var/log/syslog*, \ /usr/local/bin/psuutil *, \ /usr/local/bin/sonic-installer list, \ /usr/local/bin/sfputil show *, \ - /bin/ip netns identify * + /bin/ip netns identify [0-9]* Cmnd_Alias PASSWD_CMDS = /usr/local/bin/config tacacs passkey *, \