summaryrefslogtreecommitdiff
path: root/source3/winbindd/winbindd_sid.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-08-04 14:22:17 -0400
committerVolker Lendecke <vl@samba.org>2009-08-05 03:21:22 -0400
commit10685b37d4dc16dc75c48c08937f003af4968a0c (patch)
tree34b0f916a0a6d88423f61f21963c6c50fb04b766 /source3/winbindd/winbindd_sid.c
parent292f3f896fa5bc381c88526fc73a6224b8d286f0 (diff)
downloadsamba-10685b37d4dc16dc75c48c08937f003af4968a0c.tar.gz
samba-10685b37d4dc16dc75c48c08937f003af4968a0c.tar.bz2
samba-10685b37d4dc16dc75c48c08937f003af4968a0c.zip
s3:winbind: Convert WINBINDD_GID_TO_SID the new API
Diffstat (limited to 'source3/winbindd/winbindd_sid.c')
-rw-r--r--source3/winbindd/winbindd_sid.c58
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 ) {