diff options
author | Ira Cooper <ira@samba.org> | 2012-05-23 21:42:26 -0400 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2012-05-24 22:30:23 +0200 |
commit | 074991cefe2b8bb58de869e099379e182fab28b7 (patch) | |
tree | 3b77346cfd9a13bd2b41a95c5619b4df03ac674f /source3 | |
parent | b5e9ece1f3936d2221480169713042019e34a276 (diff) | |
download | samba-074991cefe2b8bb58de869e099379e182fab28b7.tar.gz samba-074991cefe2b8bb58de869e099379e182fab28b7.tar.bz2 samba-074991cefe2b8bb58de869e099379e182fab28b7.zip |
s3-passdb: Fix negative SID->uid/gid/both cache handling
-1 uid/gid/both signals a non existent uid/gid/both.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/passdb/lookup_sid.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source3/passdb/lookup_sid.c b/source3/passdb/lookup_sid.c index 4ceba3cdd2..3f8b06dfca 100644 --- a/source3/passdb/lookup_sid.c +++ b/source3/passdb/lookup_sid.c @@ -1347,6 +1347,20 @@ bool sids_to_unixids(const struct dom_sid *sids, uint32_t num_sids, } } done: + for (i=0; i<num_sids; i++) { + switch(ids[i].type) { + case WBC_ID_TYPE_GID: + case WBC_ID_TYPE_UID: + case WBC_ID_TYPE_BOTH: + if (ids[i].id == -1) { + ids[i].type = ID_TYPE_NOT_SPECIFIED; + } + break; + case WBC_ID_TYPE_NOT_SPECIFIED: + break; + } + } + ret = true; fail: TALLOC_FREE(wbc_ids); |