From c9bc1728f971318ab291639f34b326157e918f5f Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 18 Apr 2009 13:31:20 +0200 Subject: Add type-safe policy_handle_create/find --- source3/include/proto.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'source3/include/proto.h') diff --git a/source3/include/proto.h b/source3/include/proto.h index 6156a475a4..8eb5c46fbd 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -5884,6 +5884,18 @@ bool close_policy_hnd(pipes_struct *p, struct policy_handle *hnd); void close_policy_by_pipe(pipes_struct *p); bool pipe_access_check(pipes_struct *p); +NTSTATUS _policy_handle_create(struct pipes_struct *p, struct policy_handle *hnd, + void *pdata, size_t size, const char *name); +#define policy_handle_create(_p, _hnd, _ptr, _type) \ + _policy_handle_create((_p), (_hnd), (_ptr), sizeof(_type), #_type) + +void *_policy_handle_find(struct pipes_struct *p, + const struct policy_handle *hnd, + const char *type); +#define policy_handle_find(_p, _hnd, _type) \ + (_type *)_policy_handle_find((_p), (_hnd), #_type) + + /* The following definitions come from rpc_server/srv_pipe.c */ bool create_next_pdu(pipes_struct *p); -- cgit