[PATCH] [s3] set proper ads_keytab_flush() return code on error
swen
swen at linux.ibm.com
Wed Nov 21 10:06:55 UTC 2018
Please review and push if happy.
Thanks for your support in advance.
Cheers Swen
-------------- next part --------------
From 407f612775421efbfcd887823e7866516e7f4131 Mon Sep 17 00:00:00 2001
From: Swen Schillig <swen at linux.ibm.com>
Date: Wed, 21 Nov 2018 10:59:31 +0100
Subject: [PATCH] [s3] 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 <swen at linux.ibm.com>
---
source3/libads/kerberos_keytab.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/source3/libads/kerberos_keytab.c b/source3/libads/kerberos_keytab.c
index 63c1f2bb369..e9eb1cf71c6 100644
--- a/source3/libads/kerberos_keytab.c
+++ b/source3/libads/kerberos_keytab.c
@@ -457,6 +457,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;
}
@@ -477,7 +478,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"));
- goto out;
+ ret = -1;
}
out:
--
2.17.2
More information about the samba-technical
mailing list