From: Andreas Schneider Date: Wed, 8 Dec 2021 08:17:32 +0000 (+0100) Subject: s4:mitkdc: Reset errno to 0 for com_err messages X-Git-Tag: tdb-1.4.6~296 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b46a942f95bb28bceb84a14d1125d7f69fdc3fe7;p=thirdparty%2Fsamba.git s4:mitkdc: Reset errno to 0 for com_err messages Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett --- diff --git a/source4/kdc/mit-kdb/kdb_samba_common.c b/source4/kdc/mit-kdb/kdb_samba_common.c index a7818c16482..1ad1c148596 100644 --- a/source4/kdc/mit-kdb/kdb_samba_common.c +++ b/source4/kdc/mit-kdb/kdb_samba_common.c @@ -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; }