diff options
author | Herb Lewis <hlewis@panasas.com> | 2011-06-09 23:17:11 -0700 |
---|---|---|
committer | Volker Lendecke <vlendec@samba.org> | 2011-06-10 14:35:21 +0200 |
commit | 73311f8a308d13d016a1940758e8824934161827 (patch) | |
tree | 773a22f5639a160a5a9504ccc54b164b067988d4 /source3 | |
parent | de8eb77e91bb280da49f4f7586f8e511e808c1f0 (diff) | |
download | samba-73311f8a308d13d016a1940758e8824934161827.tar.gz samba-73311f8a308d13d016a1940758e8824934161827.tar.bz2 samba-73311f8a308d13d016a1940758e8824934161827.zip |
bug in source3/winbindd/winbindd_sids_to_xids.c
I'm having trouble getting my system setup to do submits right now but
I discovered a bug in the subject file that causes winbindd lookup sids
command to assign incorrect unix ids. The change to sid_peek_rid fixes
the case where you call lookup sids with sids s1 s2 s3 which cause them
to be cached. then call with s1 s2 s4 and s4 will get the unix id of s1.
The other change fixes the case where a sid that was not translated
gets a value returned instead of being listed as unmapped.
Could someone review this and push to master and 3.6 for me?
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Jun 10 14:35:21 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3')
-rw-r--r-- | source3/winbindd/winbindd_sids_to_xids.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/winbindd/winbindd_sids_to_xids.c b/source3/winbindd/winbindd_sids_to_xids.c index f6e2d82cce..d08064fbf3 100644 --- a/source3/winbindd/winbindd_sids_to_xids.c +++ b/source3/winbindd/winbindd_sids_to_xids.c @@ -201,7 +201,7 @@ static void winbindd_sids_to_xids_lookupsids_done(struct tevent_req *subreq) break; }; t->domain_index = n->sid_index; - sid_peek_rid(&state->sids[i], &t->rid); + sid_peek_rid(&state->non_cached[i], &t->rid); t->unix_id = (uint64_t)-1; } @@ -268,6 +268,9 @@ NTSTATUS winbindd_sids_to_xids_recv(struct tevent_req *req, } } else { unix_id = state->ids.ids[num_non_cached].unix_id; + if (unix_id == -1) { + found = false; + } switch(state->ids.ids[num_non_cached].type) { case WBC_ID_TYPE_UID: type = 'U'; |