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.
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