summaryrefslogtreecommitdiff
path: root/source3/rpc_server/srv_netlog_nt.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2002-11-25 06:54:22 +0000
committerAndrew Bartlett <abartlet@samba.org>2002-11-25 06:54:22 +0000
commitaf365408d5056ea5eeaafd5df23196d9ba19de58 (patch)
tree012d04940fed93eb52889723e66d1fb12a4f08d1 /source3/rpc_server/srv_netlog_nt.c
parentedc8dda5c0b2703ef5d3c2fe8709da97e94e287f (diff)
downloadsamba-af365408d5056ea5eeaafd5df23196d9ba19de58.tar.gz
samba-af365408d5056ea5eeaafd5df23196d9ba19de58.tar.bz2
samba-af365408d5056ea5eeaafd5df23196d9ba19de58.zip
Instead of walking the entire group database, grabbing all members of each
group, testing for membership etc, use the already calculated NT_USER_TOKEN. (which is initgroups() based) So far we only fill out the 'domain' groups - we need to fill out the 'other sids' as well, and we possibly need to filter the list for 'domain groups' only (the old code did that), but Win2k doesn't seem to mind this for now. I also need to find out what the magic '7' is about. Fortunetly JF is in town, so I'll grill him tomorrow :-). Andrew Bartlett (This used to be commit 7e846e7387247f8bc2b07a1a1006014c6978143b)
Diffstat (limited to 'source3/rpc_server/srv_netlog_nt.c')
-rw-r--r--source3/rpc_server/srv_netlog_nt.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/source3/rpc_server/srv_netlog_nt.c b/source3/rpc_server/srv_netlog_nt.c
index dee0866b12..89e46402cf 100644
--- a/source3/rpc_server/srv_netlog_nt.c
+++ b/source3/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,