diff options
author | Volker Lendecke <vl@samba.org> | 2019-02-25 14:38:50 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2019-02-28 12:57:23 +0000 |
commit | d9303e8eb90d48f09f2e2e8bdf01f4a7c3c21d11 (patch) | |
tree | da84e0ac08a343d1c05295b274ea60714918602d /source3/lib | |
parent | d8a7caa5b03428dd9b0808135b34c21e217dbe2e (diff) | |
download | samba-d9303e8eb90d48f09f2e2e8bdf01f4a7c3c21d11.tar.gz |
lib: Make idmap_cache return negative mappings
Without this we'd query non-existent mappings over and over
again.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13813
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/idmap_cache.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/lib/idmap_cache.c b/source3/lib/idmap_cache.c index 77618dd5aa1..244a727e01b 100644 --- a/source3/lib/idmap_cache.c +++ b/source3/lib/idmap_cache.c @@ -215,7 +215,12 @@ static void idmap_cache_xid2sid_parser(const struct gencache_timeout *timeout, value = (char *)blob.data; - if (value[0] != '-') { + if ((value[0] == '-') && (value[1] == '\0')) { + /* + * Return NULL SID, see comment to uid2sid + */ + state->ret = true; + } else { state->ret = string_to_sid(state->sid, value); } if (state->ret) { |