From: Swen Schillig Date: Wed, 21 Nov 2018 09:59:31 +0000 (+0100) Subject: libads: set proper ads_keytab_flush() return code on error X-Git-Tag: tdb-1.3.17~681 X-Git-Url: http://git.samba.org/?a=commitdiff_plain;h=02514427dba74325510137655a3788e70e29c82d;p=samba.git libads: set proper ads_keytab_flush() return code on error The return code was left on success when the calls to ads_get_machine_kvno() or ads_clear_service_principal_names() failed and the processing had to be aborted. Signed-off-by: Swen Schillig Reviewed-by: Andreas Schneider Reviewed-by: Ralph Boehme --- diff --git a/source3/libads/kerberos_keytab.c b/source3/libads/kerberos_keytab.c index 8eb7b2a7c6b..792dc999e6c 100644 --- a/source3/libads/kerberos_keytab.c +++ b/source3/libads/kerberos_keytab.c @@ -453,6 +453,7 @@ int ads_keytab_flush(ADS_STRUCT *ads) if (kvno == -1) { /* -1 indicates a failure */ DEBUG(1, (__location__ ": Error determining the kvno.\n")); + ret = -1; goto out; } @@ -473,6 +474,7 @@ int ads_keytab_flush(ADS_STRUCT *ads) if (!ADS_ERR_OK(aderr)) { DEBUG(1, (__location__ ": Error while clearing service " "principal listings in LDAP.\n")); + ret = -1; goto out; }