Skip to content

Conversation

@dmbaturin
Copy link
Member

Change summary

A user with effective UID 0 is allowed do to everything, so permission checks make no sense in that case. Since root will never normally be in any operator groups, this fixes an issue with non-existent group lookup after sudo su and similar.

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)

Checklist:

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

Copy link
Member

@sever-sever sever-sever left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works fine in my tests
Other errors are not related to the fix

root@r14:/home/vyos# show int
Invalid command [show int]: "int" is not a valid argument for command [show]
root@r14:/home/vyos# show interfaces
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface    IP Address         MAC                VRF        MTU  S/L    Description
-----------  -----------------  -----------------  -------  -----  -----  -------------
dum0         192.0.2.1/32       9e:a7:c9:85:fb:1d  default   1500  u/u
eth0         192.168.122.14/24  52:54:00:8d:67:6e  default   1500  u/u
eth1         10.0.0.1/30        52:54:00:f4:d5:cd  default   1500  u/u
eth2         -                  52:54:00:b5:3a:46  default   1500  u/u
eth3         10.0.3.1/30        52:54:00:6c:c4:3e  default   1500  u/u
lo           127.0.0.1/8        00:00:00:00:00:00  default  65536  u/u
             ::1/128
root@r14:/home/vyos# 
root@r14:/home/vyos# ping 127.0.0.1
Internal error: Node with type "tagNode" must not have a <virtualTagNode> child
root@r14:/home/vyos# 
root@r14:/home/vyos# exit
exit
vyos@r14:~$ ping 127.0.0.1
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.021 ms
^C
--- 127.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.021/0.021/0.021/0.000 ms
vyos@r14:~$ sudo su
root@r14:/home/vyos# 
root@r14:/home/vyos# 
root@r14:/home/vyos# ping 127.0.0.1
Internal error: Node with type "tagNode" must not have a <virtualTagNode> child
root@r14:/home/vyos# 
root@r14:/home/vyos# /usr/bin/ping 127.0.0.1
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.020 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.026 ms
^C
--- 127.0.0.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1042ms
rtt min/avg/max/mdev = 0.020/0.023/0.026/0.003 ms
root@r14:/home/vyos# 

@sever-sever sever-sever requested a review from jestabro December 4, 2025 14:41
Copy link
Contributor

@jestabro jestabro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logic is clear; basic tests show that the errors reported in T7901 and T7808 are resolved, other than the newly uncovered error with ping, a separate issue.

@sever-sever sever-sever merged commit 69ed849 into vyos:current Dec 5, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

4 participants