smbd: Fix crossing automounter mount points
[Samba.git] / source3 / rpc_server / rpc_pipes.h
blob17922b07bbe33de51e28887eac2c86b558e7f348
1 /*
2 Unix SMB/Netbios implementation.
3 RPC Server Headers
4 Copyright (C) Andrew Tridgell 1992-1997
5 Copyright (C) Luke Kenneth Casson Leighton 1996-1997
6 Copyright (C) Paul Ashton 1997
7 Copyright (C) Jeremy Allison 2000-2004
8 Copyright (C) Simo Sorce 2010-2011
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 3 of the License, or
13 (at your option) any later version.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program. If not, see <http://www.gnu.org/licenses/>.
24 #ifndef _RPC_PIPES_H_
25 #define _RPC_PIPES_H_
27 #include "source3/librpc/rpc/dcerpc.h"
29 struct tsocket_address;
30 struct pipes_struct;
31 struct dcesrv_context;
34 * DCE/RPC-specific samba-internal-specific handling of data on
35 * NamedPipes.
37 struct pipes_struct {
38 enum dcerpc_transport_t transport;
40 struct messaging_context *msg_ctx;
43 * Set the DCERPC_FAULT to return.
45 int fault_state;
47 /* This context is used for PDU data and is freed between each pdu.
48 Don't use for pipe state storage. */
49 TALLOC_CTX *mem_ctx;
51 /* handle database to use on this pipe. */
52 struct dcesrv_call_state *dce_call;
55 bool check_open_pipes(void);
56 size_t num_pipe_handles(void);
58 void *create_policy_hnd(struct pipes_struct *p,
59 struct policy_handle *hnd,
60 uint8_t handle_type,
61 void *data_ptr);
63 void *_find_policy_by_hnd(struct pipes_struct *p,
64 const struct policy_handle *hnd,
65 uint8_t handle_type,
66 NTSTATUS *pstatus);
67 #define find_policy_by_hnd(_p, _hnd, _hnd_type, _type, _pstatus) \
68 (_type *)_find_policy_by_hnd((_p), (_hnd), (_hnd_type), (_pstatus));
70 bool close_policy_hnd(struct pipes_struct *p, struct policy_handle *hnd);
71 bool pipe_access_check(struct pipes_struct *p);
73 #endif /* _RPC_PIPES_H_ */