Skip to content

Return proper tevent error in auth code - #9087

Draft
justin-stephenson wants to merge 6 commits into
SSSD:masterfrom
justin-stephenson:return_proper_tevent_error_in_auth
Draft

justin-stephenson wants to merge 6 commits into
SSSD:masterfrom
justin-stephenson:return_proper_tevent_error_in_auth

Conversation

@justin-stephenson

Copy link
Copy Markdown
Contributor

No description provided.

@justin-stephenson
justin-stephenson force-pushed the return_proper_tevent_error_in_auth branch from c819b5e to 3c3a1b3 Compare August 17, 2026 19:49
Comment thread src/providers/ipa/ipa_sudo.c Fixed
@justin-stephenson
justin-stephenson force-pushed the return_proper_tevent_error_in_auth branch 4 times, most recently from 125bb74 to e8161a8 Compare August 18, 2026 15:07
@justin-stephenson
justin-stephenson force-pushed the return_proper_tevent_error_in_auth branch 11 times, most recently from 411b87d to 19b931f Compare October 7, 2026 13:19
@justin-stephenson
justin-stephenson force-pushed the return_proper_tevent_error_in_auth branch from 19b931f to c358803 Compare October 23, 2026 18:55
Comment thread src/providers/ldap/ldap_auth.c Fixed
@justin-stephenson
justin-stephenson force-pushed the return_proper_tevent_error_in_auth branch 4 times, most recently from 913ba45 to 3dcc9f2 Compare October 29, 2026 13:48
In auth codepaths, return proper tevent req error in
non-EOK/non-PAM_SUCCESS cases.

Assisted-By: Claude Code (Opus 4.6)
When the backend returns non-EOK, the pam_status is lost therefore
we need to do the conversion in the PAM responder.
Fix for test_smartcard__proxy_auth_uses_password_or_smartcard_based_on_local_auth_policy[smartcard_when_local_auth_policy_enables_it]

In this test, pam_reply() checks for PAM_BAD_ITEM to follow the expected codepath.
Return proper error code ERR_SC_AUTH_NOT_SUPPORTED which is converted to PAM_BAD_ITEM
"System error" is now present in the PAM logs but is unrelated, not
tied to the offline authentication attempt.
Switch to use SSSD ERR_* errors only, these will be converted
into the equivalent pam_status in pam_dp_req_send_done()
@justin-stephenson
justin-stephenson force-pushed the return_proper_tevent_error_in_auth branch from 3dcc9f2 to 54ad140 Compare October 29, 2026 18:35
@justin-stephenson
justin-stephenson force-pushed the return_proper_tevent_error_in_auth branch from d26a79f to 7d3abc7 Compare October 30, 2026 16:35
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