From: Joseph Sutton Date: Sun, 13 Aug 2023 22:50:37 +0000 (+1200) Subject: s4:kdc: Do not panic if authsam_logon_success_accounting() fails X-Git-Tag: tevent-0.16.0~876 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6b580f73688bd6517789d1e8663042b0e310e848;p=thirdparty%2Fsamba.git s4:kdc: Do not panic if authsam_logon_success_accounting() fails In hdb_samba4_audit(), ERR_GENERIC signals an unexpected situation — if we encounter that error code while running under selftest, we’ll panic. In response to an expected event such as the failure of authsam_logon_success_accounting(), it’s more appropriate to continue to run. Signed-off-by: Joseph Sutton Reviewed-by: Andrew Bartlett --- diff --git a/source4/kdc/hdb-samba4.c b/source4/kdc/hdb-samba4.c index 50c925e9512..84cddb24dc5 100644 --- a/source4/kdc/hdb-samba4.c +++ b/source4/kdc/hdb-samba4.c @@ -900,7 +900,7 @@ static krb5_error_code hdb_samba4_audit(krb5_context context, r->error_code = final_ret = KRB5KDC_ERR_CLIENT_REVOKED; rwdc_fallback = kdc_db_ctx->rodc; } else if (!NT_STATUS_IS_OK(status)) { - r->error_code = final_ret = KRB5KRB_ERR_GENERIC; + r->error_code = final_ret = KRB5KDC_ERR_CLIENT_REVOKED; rwdc_fallback = kdc_db_ctx->rodc; } else { if (r->error_code == KRB5KDC_ERR_NEVER_VALID) {