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

sshd_config lens: Not possible to create or remove subsystem #773

Open
minfrin opened this issue Oct 16, 2022 · 0 comments
Open

sshd_config lens: Not possible to create or remove subsystem #773

minfrin opened this issue Oct 16, 2022 · 0 comments

Comments

@minfrin
Copy link

minfrin commented Oct 16, 2022

Using v1.13.0, given the following set of subsystems:

blackadder ~ # /usr/bin/augtool --echo --load-file=/etc/ssh/sshd_config
augtool> print /files/etc/ssh/sshd_config/Subsystem
/files/etc/ssh/sshd_config/Subsystem[1]
/files/etc/ssh/sshd_config/Subsystem[1]/sftp = "/usr/libexec/openssh/sftp-server"
/files/etc/ssh/sshd_config/Subsystem[2]
/files/etc/ssh/sshd_config/Subsystem[2]/snmp = "/usr/bin/sshtosnmp /var/lib/net-snmp/sshdomainsocket"

It is not possible to add a new subsystem:

augtool> set /files/etc/ssh/sshd_config/Subsystem/foo "something new"
error: Too many matches for path expression

It is not possible to remove an existing subsystem:

augtool> rm /files/etc/ssh/sshd_config/Subsystem/snmp
rm : /files/etc/ssh/sshd_config/Subsystem/snmp 1
augtool> save
error: Failed to execute command
saving failed (run 'errors' for details)

Updating subsystems works fine.

augtool> set /files/etc/ssh/sshd_config/Subsystem/snmp "something else"
augtool> print /files/etc/ssh/sshd_config/Subsystem
/files/etc/ssh/sshd_config/Subsystem[1]
/files/etc/ssh/sshd_config/Subsystem[1]/sftp = "/usr/libexec/openssh/sftp-server"
/files/etc/ssh/sshd_config/Subsystem[2]
/files/etc/ssh/sshd_config/Subsystem[2]/snmp = "something else"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant