diff options
author | Volker Lendecke <vl@samba.org> | 2009-04-18 13:31:20 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2009-04-18 13:58:48 +0200 |
commit | c9bc1728f971318ab291639f34b326157e918f5f (patch) | |
tree | b31b6334f35ffcda7d6f7e43a4feaf16df9fc3cf /source3/include/proto.h | |
parent | fd558b37f601b5286f227a77aa593255d75c2484 (diff) | |
download | samba-c9bc1728f971318ab291639f34b326157e918f5f.tar.gz samba-c9bc1728f971318ab291639f34b326157e918f5f.tar.bz2 samba-c9bc1728f971318ab291639f34b326157e918f5f.zip |
Add type-safe policy_handle_create/find
Diffstat (limited to 'source3/include/proto.h')
-rw-r--r-- | source3/include/proto.h | 12 |
1 files changed, 12 insertions, 0 deletions
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); |