[PATCH] Fix for winbindd wcache_cached_creds_exist
Ralph Böhme
slow at samba.org
Sat Nov 18 14:17:04 UTC 2017
Hi!
Just stumbled across this. The change that introduced the wrong use of
tdb_exists() is only in master, so we don't need backports.
Please review & push if happy. Thanks!
-slow
--
Ralph Boehme, Samba Team https://samba.org/
Samba Developer, SerNet GmbH https://sernet.de/en/samba/
-------------- next part --------------
From cc18337e449d206aa0b2f4fba54025b572e960ce Mon Sep 17 00:00:00 2001
From: Ralph Boehme <slow at samba.org>
Date: Sat, 18 Nov 2017 15:14:15 +0100
Subject: [PATCH] winbindd: tdb_exists returns 1 if a record is found
Signed-off-by: Ralph Boehme <slow at samba.org>
---
source3/winbindd/winbindd_cache.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/source3/winbindd/winbindd_cache.c b/source3/winbindd/winbindd_cache.c
index 502232544c4..fbf4451fc33 100644
--- a/source3/winbindd/winbindd_cache.c
+++ b/source3/winbindd/winbindd_cache.c
@@ -1270,7 +1270,7 @@ NTSTATUS wcache_cached_creds_exist(struct winbindd_domain *domain, const struct
fstr_sprintf(key_str, "CRED/%s", sid_to_fstring(tmp, sid));
ret = tdb_exists(cache->tdb, string_tdb_data(key_str));
- if (ret != 0) {
+ if (ret != 1) {
return NT_STATUS_OBJECT_NAME_NOT_FOUND;
}
--
2.13.6
More information about the samba-technical
mailing list