diff options
Diffstat (limited to 'source3/winbindd/winbindd_sid.c')
-rw-r--r-- | source3/winbindd/winbindd_sid.c | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/source3/winbindd/winbindd_sid.c b/source3/winbindd/winbindd_sid.c index 654f352ba3..db000682ae 100644 --- a/source3/winbindd/winbindd_sid.c +++ b/source3/winbindd/winbindd_sid.c @@ -171,64 +171,6 @@ void winbindd_set_hwm(struct winbindd_cli_state *state) winbindd_set_hwm_async(state->mem_ctx, &xid, set_hwm_recv, state); } -/* Convert a gid to a sid */ - -static void gid2sid_recv(void *private_data, bool success, const char *sidstr) -{ - struct winbindd_cli_state *state = - (struct winbindd_cli_state *)private_data; - struct dom_sid sid; - - if (!success || !string_to_sid(&sid, sidstr)) { - ZERO_STRUCT(sid); - idmap_cache_set_sid2gid(&sid, state->request->data.gid); - request_error(state); - return; - } - DEBUG(10,("gid2sid: gid %lu has sid %s\n", - (unsigned long)(state->request->data.gid), sidstr)); - - idmap_cache_set_sid2gid(&sid, state->request->data.gid); - fstrcpy(state->response->data.sid.sid, sidstr); - state->response->data.sid.type = SID_NAME_DOM_GRP; - request_ok(state); - return; -} - - -void winbindd_gid_to_sid(struct winbindd_cli_state *state) -{ - struct dom_sid sid; - bool expired; - - DEBUG(3, ("[%5lu]: gid to sid %lu\n", (unsigned long)state->pid, - (unsigned long)state->request->data.gid)); - - if (idmap_cache_find_gid2sid(state->request->data.gid, &sid, - &expired)) { - DEBUG(10, ("idmap_cache_find_gid2sid found %d%s\n", - (int)state->request->data.gid, - expired ? " (expired)": "")); - if (expired && IS_DOMAIN_ONLINE(find_our_domain())) { - DEBUG(10, ("revalidating expired entry\n")); - goto backend; - } - if (is_null_sid(&sid)) { - DEBUG(10, ("Returning negative cache entry\n")); - request_error(state); - return; - } - DEBUG(10, ("Returning positive cache entry\n")); - sid_to_fstring(state->response->data.sid.sid, &sid); - request_ok(state); - return; - } - - /* always use async calls (may block) */ - backend: - winbindd_gid2sid_async(state->mem_ctx, state->request->data.gid, gid2sid_recv, state); -} - void winbindd_allocate_uid(struct winbindd_cli_state *state) { if ( !state->privileged ) { |