summaryrefslogtreecommitdiff
path: root/source4/winbind
diff options
context:
space:
mode:
authorKai Blin <kai@samba.org>2008-04-19 14:09:18 +0200
committerKai Blin <kai@samba.org>2008-04-24 11:17:23 +0200
commit240d959005f5fd80a38b3734b39dd5d6e425a566 (patch)
tree55a8d1e7bfb9dee4783b545f615661d46e1e55e4 /source4/winbind
parentb8209978d708d69dbd4cb1ecd817274566de23ec (diff)
downloadsamba-240d959005f5fd80a38b3734b39dd5d6e425a566.tar.gz
samba-240d959005f5fd80a38b3734b39dd5d6e425a566.tar.bz2
samba-240d959005f5fd80a38b3734b39dd5d6e425a566.zip
libnet: Make UserInfo accept a SID as input as well, fix wb_cmd_getpwuid
(This used to be commit 5f3a70f285ad8a412105c0e498e486f93fc279bc)
Diffstat (limited to 'source4/winbind')
-rw-r--r--source4/winbind/wb_cmd_getpwnam.c3
-rw-r--r--source4/winbind/wb_cmd_getpwuid.c9
2 files changed, 7 insertions, 5 deletions
diff --git a/source4/winbind/wb_cmd_getpwnam.c b/source4/winbind/wb_cmd_getpwnam.c
index fb2dc197c9..7d821537f0 100644
--- a/source4/winbind/wb_cmd_getpwnam.c
+++ b/source4/winbind/wb_cmd_getpwnam.c
@@ -92,7 +92,8 @@ static void cmd_getpwnam_recv_domain(struct composite_context *ctx)
return;
}
- user_info->in.user_name = user_name;
+ user_info->in.level = USER_INFO_BY_NAME;
+ user_info->in.data.user_name = user_name;
user_info->in.domain_name = domain->libnet_ctx->samr.name;
state->workgroup_name = talloc_strdup(state,
domain->libnet_ctx->samr.name);
diff --git a/source4/winbind/wb_cmd_getpwuid.c b/source4/winbind/wb_cmd_getpwuid.c
index c250af1b56..15cc592cf6 100644
--- a/source4/winbind/wb_cmd_getpwuid.c
+++ b/source4/winbind/wb_cmd_getpwuid.c
@@ -34,6 +34,7 @@ struct cmd_getpwuid_state {
struct composite_context *ctx;
struct wbsrv_service *service;
uid_t uid;
+ struct dom_sid *sid;
char *workgroup;
struct wbsrv_domain *domain;
@@ -81,14 +82,13 @@ static void cmd_getpwuid_recv_sid(struct composite_context *ctx)
struct cmd_getpwuid_state *state =
talloc_get_type(ctx->async.private_data,
struct cmd_getpwuid_state);
- struct dom_sid *sid;
DEBUG(5, ("cmd_getpwuid_recv_sid called %p\n", ctx->private_data));
- state->ctx->status = wb_uid2sid_recv(ctx, state, &sid);
+ state->ctx->status = wb_uid2sid_recv(ctx, state, &state->sid);
if (!composite_is_ok(state->ctx)) return;
- ctx = wb_sid2domain_send(state, state->service, sid);
+ ctx = wb_sid2domain_send(state, state->service, state->sid);
composite_continue(state->ctx, ctx, cmd_getpwuid_recv_domain, state);
}
@@ -110,7 +110,8 @@ static void cmd_getpwuid_recv_domain(struct composite_context *ctx)
user_info = talloc(state, struct libnet_UserInfo);
if (composite_nomem(user_info, state->ctx)) return;
- user_info->in.user_name = state->domain->libnet_ctx->cred->username;
+ user_info->in.level = USER_INFO_BY_SID;
+ user_info->in.data.user_sid = state->sid;
user_info->in.domain_name = state->domain->libnet_ctx->samr.name;
/* We need the workgroup later, so copy it */