Skip to content

ssh: fix support for system-managed users - #650

Merged
michalvasko merged 1 commit into
CESNET:develfrom
jktjkt:cesnet/fix-systemwide-users
Oct 19, 2026
Merged

michalvasko merged 1 commit into
CESNET:develfrom
jktjkt:cesnet/fix-systemwide-users

Conversation

@jktjkt

@jktjkt jktjkt commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

It looks like commit eb8fabc accidentally swapped LY_ENOT (which says "this feature is valid, but not enabled") for LY_ENOTFOUND (which says "the YANG model does not even define this feature"). As a result, support for using system users was unconditionally disabled.

Please consider adding some unit tests for this; it's a core feature for us, and it is not ideal that a regression like this slipped through a huge refactoring commit. We're using pam_wrapper in rousette for this purpose.

Fixes: eb8fabc session server ssh UPDATE migrate to callback-based auth for libssh 0.12+
Reported-by: Michal Hažlinský hazlinsky@cesnet.cz

It looks like commit eb8fabc
accidentally swapped `LY_ENOT` (which says "this feature is valid, but
not enabled") for `LY_ENOTFOUND` (which says "the YANG model does not
even define this feature"). As a result, support for using system users
was unconditionally disabled.

Fixes: eb8fabc session server ssh UPDATE migrate to callback-based auth for libssh 0.12+
Co-authored-by: Tomáš Pecka <tomas.pecka@cesnet.cz>
Reported-by: Michal Hažlinský <hazlinsky@cesnet.cz>
@michalvasko

Copy link
Copy Markdown
Member

Thanks. Not that simple to test a feature dependent on the system configuration but we will think about it.

@michalvasko
michalvasko merged commit 0bb1750 into CESNET:devel Oct 19, 2026
11 checks passed
michalvasko pushed a commit that referenced this pull request Oct 19, 2026
No test disabled the local-users-supported feature, so the system
users authentication paths were never exercised, letting the feature
check regression fixed in #650 slip through.

Add test_system_users covering publickey (token-free authorized_keys
path) and password (mocked getpwnam_r) authentication of system users
and extend test_pam with a keyboard-interactive system users case.
jktjkt pushed a commit to CESNET/CzechLight-br2-external that referenced this pull request Nov 6, 2026
Since the libnetconf2 update to a version which migrated to the
callback-based auth for libssh 0.12+, libnetconf2 has been checking the
`local-users-supported` feature incorrectly (see the linked bug), so the
support for system-managed users was unconditionally disabled. As a
result, system users could not log in via NETCONF.

Unfortunately, this was released as a part of v2026.10.09.

Jan reported some problems with booting the devices when the whole
NETCONF stack is updated to bring in the fix. Let's only backport the
fix for now, until we figure out what is going on.

Bug: CESNET/libnetconf2#650
Fixes: c40f349 sync all repos
Depends-on: https://gerrit.cesnet.cz/c/CzechLight/dependencies/+/9364
Change-Id: I056e16539d2e40012a601acb86051c6b93ac3994
jktjkt pushed a commit to CESNET/CzechLight-dependencies that referenced this pull request Nov 6, 2026
See attached bug.

Bug: CESNET/libnetconf2#650
Change-Id: Ib0a7e2dfc45cec2879fc407c75a6c6371d8ac794
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

Successfully merging this pull request may close these issues.

2 participants