]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:mitkdc: Reset errno to 0 for com_err messages
authorAndreas Schneider <asn@samba.org>
Wed, 8 Dec 2021 08:17:32 +0000 (09:17 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 15 Dec 2021 03:41:32 +0000 (03:41 +0000)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/kdc/mit-kdb/kdb_samba_common.c

index a7818c164820e986ac6efc4c6f9029a6bef06dd0..1ad1c1485968f3b6271508eb30428157acdc889d 100644 (file)
@@ -46,6 +46,12 @@ struct mit_samba_context *ks_get_context(krb5_context kcontext)
 
        mit_ctx = talloc_get_type_abort(db_ctx, struct mit_samba_context);
 
+       /*
+        * This is nomrally the starting point for Kerberos operations in
+        * MIT KRB5, so reset errno to 0 for possible com_err debug messages.
+        */
+       errno = 0;
+
        return mit_ctx;
 }