summaryrefslogtreecommitdiffstats
path: root/source/rpc_server/srv_netlog_nt.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2003-01-04 08:54:43 +0000
committerAndrew Bartlett <abartlet@samba.org>2003-01-04 08:54:43 +0000
commitf5850928a011211f03e5b9ece37682fd9243e2ba (patch)
tree9c1f26a5432372c5f7abf8e8077b0b531fc59f6f /source/rpc_server/srv_netlog_nt.c
parentf3432869b9c761a029fd804d244d0ea26b26173d (diff)
downloadsamba-f5850928a011211f03e5b9ece37682fd9243e2ba.tar.gz
samba-f5850928a011211f03e5b9ece37682fd9243e2ba.tar.xz
samba-f5850928a011211f03e5b9ece37682fd9243e2ba.zip
Merge from HEAD - extract user's list of SIDs from their NT_TOKEN and return
this as thier list of groups, rather than do a seperate lookup. This NT_TOKEN is originally initgroups() (or equiv) based. We currently send all sids in our domain, perhaps this should be further restricted, but this works for now. Andrew Bartlett
Diffstat (limited to 'source/rpc_server/srv_netlog_nt.c')
-rw-r--r--source/rpc_server/srv_netlog_nt.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/source/rpc_server/srv_netlog_nt.c b/source/rpc_server/srv_netlog_nt.c
index c65ea43e1e1..c3d48a65270 100644
--- a/source/rpc_server/srv_netlog_nt.c
+++ b/source/rpc_server/srv_netlog_nt.c
@@ -688,16 +688,14 @@ NTSTATUS _net_sam_logon(pipes_struct *p, NET_Q_SAM_LOGON *q_u, NET_R_SAM_LOGON *
pstrcpy(my_name, global_myname());
- /*
- * This is the point at which we get the group
- * database - we should be getting the gid_t list
- * from /etc/group and then turning the uids into
- * rids and then into machine sids for this user.
- * JRA.
- */
-
- gids = NULL;
- get_domain_user_groups(p->mem_ctx, &num_gids, &gids, server_info->sam_account);
+ if (!NT_STATUS_IS_OK(status
+ = nt_token_to_group_list(p->mem_ctx,
+ &domain_sid,
+ server_info->ptok,
+ &num_gids,
+ &gids))) {
+ return status;
+ }
init_net_user_info3(p->mem_ctx, usr_info,
user_rid,