mirror of
https://github.com/samba-team/samba.git
synced 2025-10-22 07:33:16 +03:00
s3:rpc make num_pipe_handles get an actual pipe as argument
Let the function abstract out how handles are counted
This commit is contained in:
@@ -5152,9 +5152,9 @@ bool smb_io_rpc_hdr_auth(const char *desc, RPC_HDR_AUTH *rai, prs_struct *ps, in
|
|||||||
|
|
||||||
/* The following definitions come from rpc_server/srv_eventlog_nt.c */
|
/* The following definitions come from rpc_server/srv_eventlog_nt.c */
|
||||||
|
|
||||||
/* The following definitions come from rpc_server/srv_lsa_hnd.c */
|
/* The following definitions come from rpc_server/rpc_handles.c */
|
||||||
|
|
||||||
size_t num_pipe_handles(struct handle_list *list);
|
size_t num_pipe_handles(pipes_struct *p);
|
||||||
bool init_pipe_handle_list(pipes_struct *p,
|
bool init_pipe_handle_list(pipes_struct *p,
|
||||||
const struct ndr_syntax_id *syntax);
|
const struct ndr_syntax_id *syntax);
|
||||||
bool create_policy_hnd(pipes_struct *p, struct policy_handle *hnd, void *data_ptr);
|
bool create_policy_hnd(pipes_struct *p, struct policy_handle *hnd, void *data_ptr);
|
||||||
|
@@ -62,12 +62,12 @@ static bool is_samr_lsa_pipe(const struct ndr_syntax_id *syntax)
|
|||||||
|| ndr_syntax_id_equal(syntax, &ndr_table_lsarpc.syntax_id));
|
|| ndr_syntax_id_equal(syntax, &ndr_table_lsarpc.syntax_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t num_pipe_handles(struct handle_list *list)
|
size_t num_pipe_handles(pipes_struct *p)
|
||||||
{
|
{
|
||||||
if (list == NULL) {
|
if (p->pipe_handles == NULL) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return list->count;
|
return p->pipe_handles->count;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
@@ -593,7 +593,7 @@ static bool open_printer_hnd(pipes_struct *p, struct policy_handle *hnd,
|
|||||||
new_printer->access_granted = access_granted;
|
new_printer->access_granted = access_granted;
|
||||||
|
|
||||||
DEBUG(5, ("%d printer handles active\n",
|
DEBUG(5, ("%d printer handles active\n",
|
||||||
(int)num_pipe_handles(p->pipe_handles)));
|
(int)num_pipe_handles(p)));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user