diff options
author | Volker Lendecke <vl@samba.org> | 2009-04-18 16:10:57 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2009-04-19 09:27:14 +0200 |
commit | 9b3f2e69f772a12c661879109e0edcda6c365be4 (patch) | |
tree | 3f149c91a4a19c012364779b32f34e4aa02d8743 /source3/rpc_server | |
parent | fa4ff87acdfc2fa064eb7fb9d45eef0969128994 (diff) | |
download | samba-9b3f2e69f772a12c661879109e0edcda6c365be4.tar.gz samba-9b3f2e69f772a12c661879109e0edcda6c365be4.tar.bz2 samba-9b3f2e69f772a12c661879109e0edcda6c365be4.zip |
Make "struct policy" private to srv_lsa_hnd.c
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_lsa_hnd.c | 26 | ||||
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 3 |
2 files changed, 28 insertions, 1 deletions
diff --git a/source3/rpc_server/srv_lsa_hnd.c b/source3/rpc_server/srv_lsa_hnd.c index e1582840c3..9891ff3964 100644 --- a/source3/rpc_server/srv_lsa_hnd.c +++ b/source3/rpc_server/srv_lsa_hnd.c @@ -24,6 +24,24 @@ #undef DBGC_CLASS #define DBGC_CLASS DBGC_RPC_SRV +/* + * Handle database - stored per pipe. + */ + +struct policy { + struct policy *next, *prev; + + struct policy_handle pol_hnd; + + void *data_ptr; +}; + +struct handle_list { + struct policy *Policy; /* List of policies. */ + size_t count; /* Current number of handles. */ + size_t pipe_ref_count; /* Number of pipe handles referring to this list. */ +}; + /* This is the max handles across all instances of a pipe name. */ #ifndef MAX_OPEN_POLS #define MAX_OPEN_POLS 1024 @@ -40,6 +58,14 @@ static bool is_samr_lsa_pipe(const struct ndr_syntax_id *syntax) || ndr_syntax_id_equal(syntax, &ndr_table_lsarpc.syntax_id)); } +size_t num_pipe_handles(struct handle_list *list) +{ + if (list == NULL) { + return 0; + } + return list->count; +} + /**************************************************************************** Initialise a policy handle list on a pipe. Handle list is shared between all pipes of the same name. diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 155d651f3e..629e41c003 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -591,7 +591,8 @@ static bool open_printer_hnd(pipes_struct *p, struct policy_handle *hnd, new_printer->access_granted = access_granted; - DEBUG(5, ("%d printer handles active\n", (int)p->pipe_handles->count )); + DEBUG(5, ("%d printer handles active\n", + (int)num_pipe_handles(p->pipe_handles))); return true; } |