diff options
-rw-r--r-- | source3/nsswitch/winbindd_rpc.c | 2 | ||||
-rw-r--r-- | source3/rpc_client/cli_samr.c | 5 | ||||
-rw-r--r-- | source3/rpc_server/srv_samr_nt.c | 7 | ||||
-rw-r--r-- | source3/rpcclient/cmd_samr.c | 4 | ||||
-rw-r--r-- | source3/utils/net_rpc.c | 4 |
5 files changed, 10 insertions, 12 deletions
diff --git a/source3/nsswitch/winbindd_rpc.c b/source3/nsswitch/winbindd_rpc.c index b4d8cc3956..42f451c505 100644 --- a/source3/nsswitch/winbindd_rpc.c +++ b/source3/nsswitch/winbindd_rpc.c @@ -723,7 +723,7 @@ static NTSTATUS lookup_groupmem(struct winbindd_domain *domain, /* Lookup a chunk of rids */ result = cli_samr_lookup_rids(hnd->cli, mem_ctx, - &dom_pol, 1000, /* flags */ + &dom_pol, num_lookup_rids, &rid_mem[i], &tmp_num_names, diff --git a/source3/rpc_client/cli_samr.c b/source3/rpc_client/cli_samr.c index e4c8d46a75..5473168c0f 100644 --- a/source3/rpc_client/cli_samr.c +++ b/source3/rpc_client/cli_samr.c @@ -1605,7 +1605,7 @@ NTSTATUS cli_samr_query_dispinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, looked up in one packet. */ NTSTATUS cli_samr_lookup_rids(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *domain_pol, uint32 flags, + POLICY_HND *domain_pol, uint32 num_rids, uint32 *rids, uint32 *num_names, char ***names, uint32 **name_types) @@ -1633,8 +1633,7 @@ NTSTATUS cli_samr_lookup_rids(struct cli_state *cli, TALLOC_CTX *mem_ctx, /* Marshall data and send request */ - init_samr_q_lookup_rids(mem_ctx, &q, domain_pol, flags, - num_rids, rids); + init_samr_q_lookup_rids(mem_ctx, &q, domain_pol, 1000, num_rids, rids); if (!samr_io_q_lookup_rids("", &q, &qbuf, 0) || !rpc_api_pipe_req(cli, PI_SAMR, SAMR_LOOKUP_RIDS, &qbuf, &rbuf)) { diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c index 1881bc6e48..8a10fa6d2d 100644 --- a/source3/rpc_server/srv_samr_nt.c +++ b/source3/rpc_server/srv_samr_nt.c @@ -1521,9 +1521,10 @@ NTSTATUS _samr_lookup_rids(pipes_struct *p, SAMR_Q_LOOKUP_RIDS *q_u, SAMR_R_LOOK if (!get_lsa_policy_samr_sid(p, &q_u->pol, &pol_sid, &acc_granted)) return NT_STATUS_INVALID_HANDLE; - if (num_rids > MAX_SAM_ENTRIES) { - num_rids = MAX_SAM_ENTRIES; - DEBUG(5,("_samr_lookup_rids: truncating entries to %d\n", num_rids)); + if (num_rids > 1000) { + DEBUG(0, ("Got asked for %d rids (more than 1000) -- according " + "to samba4 idl this is not possible\n", num_rids)); + return NT_STATUS_UNSUCCESSFUL; } if (num_rids) { diff --git a/source3/rpcclient/cmd_samr.c b/source3/rpcclient/cmd_samr.c index e8ddfd32d7..d3f8954050 100644 --- a/source3/rpcclient/cmd_samr.c +++ b/source3/rpcclient/cmd_samr.c @@ -1394,7 +1394,6 @@ static NTSTATUS cmd_samr_lookup_rids(struct cli_state *cli, { NTSTATUS result = NT_STATUS_UNSUCCESSFUL; POLICY_HND connect_pol, domain_pol; - uint32 flags = 0x000003e8; /* Unknown */ uint32 num_rids, num_names, *rids, *name_types; char **names; int i; @@ -1427,8 +1426,7 @@ static NTSTATUS cmd_samr_lookup_rids(struct cli_state *cli, for (i = 0; i < argc - 1; i++) sscanf(argv[i + 1], "%i", &rids[i]); - result = cli_samr_lookup_rids(cli, mem_ctx, &domain_pol, - flags, num_rids, rids, + result = cli_samr_lookup_rids(cli, mem_ctx, &domain_pol, num_rids, rids, &num_names, &names, &name_types); if (!NT_STATUS_IS_OK(result) && diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c index ff754c33dc..b18d4b0ba5 100644 --- a/source3/utils/net_rpc.c +++ b/source3/utils/net_rpc.c @@ -1016,7 +1016,7 @@ rpc_user_info_internals(const DOM_SID *domain_sid, const char *domain_name, rids[i] = user_gids[i].g_rid; result = cli_samr_lookup_rids(cli, mem_ctx, &domain_pol, - flags, num_rids, rids, + num_rids, rids, &num_names, &names, &name_types); if (!NT_STATUS_IS_OK(result)) { @@ -2148,7 +2148,7 @@ rpc_list_group_members(struct cli_state *cli, TALLOC_CTX *mem_ctx, if (num_members < this_time) this_time = num_members; - result = cli_samr_lookup_rids(cli, mem_ctx, domain_pol, 1000, + result = cli_samr_lookup_rids(cli, mem_ctx, domain_pol, this_time, group_rids, &num_names, &names, &name_types); |