smbd: avoid a panic in close_directory()
[samba4-gss.git] / source3 / smbd / smbd.h
blob1c98bea43342977d4017bdc6fbcf9ddb6b535b4b
1 /*
2 Unix SMB/CIFS implementation.
3 Main SMB server routines
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef _SMBD_SMBD_H
20 #define _SMBD_SMBD_H
22 struct dptr_struct;
24 #include "smb_acls.h"
25 #include "vfs.h"
26 #include "smbd/proto.h"
27 #include "locking/proto.h"
28 #include "locking/share_mode_lock.h"
29 #include "smbd/fd_handle.h"
30 #if defined(WITH_SMB1SERVER)
31 #include "smbd/smb1_message.h"
32 #include "smbd/smb1_sesssetup.h"
33 #include "smbd/smb1_lanman.h"
34 #include "smbd/smb1_aio.h"
35 #include "smbd/smb1_ipc.h"
36 #include "smbd/smb1_negprot.h"
37 #include "smbd/smb1_nttrans.h"
38 #include "smbd/smb1_oplock.h"
39 #include "smbd/smb1_pipes.h"
40 #include "smbd/smb1_reply.h"
41 #include "smbd/smb1_service.h"
42 #include "smbd/smb1_signing.h"
43 #include "smbd/smb1_process.h"
44 #include "smbd/smb1_utils.h"
45 #include "smbd/smb1_trans2.h"
46 #endif
48 struct trans_state {
49 struct trans_state *next, *prev;
50 uint64_t vuid; /* SMB2 compat */
51 uint64_t mid;
53 uint32_t max_param_return;
54 uint32_t max_data_return;
55 uint32_t max_setup_return;
57 uint8_t cmd; /* SMBtrans or SMBtrans2 */
59 char *name; /* for trans requests */
60 uint16_t call; /* for trans2 and nttrans requests */
62 bool close_on_completion;
63 bool one_way;
65 unsigned int setup_count;
66 uint16_t *setup;
68 size_t received_data;
69 size_t received_param;
71 size_t total_param;
72 char *param;
74 size_t total_data;
75 char *data;
79 * unix_convert_flags
81 /* UCF_SAVE_LCOMP 0x00000001 is no longer used. */
82 /* UCF_ALWAYS_ALLOW_WCARD_LCOMP 0x00000002 is no longer used. */
83 /* UCF_COND_ALLOW_WCARD_LCOMP 0x00000004 is no longer used. */
84 #define UCF_POSIX_PATHNAMES 0x00000008
85 /* #define UCF_UNIX_NAME_LOOKUP 0x00000010 is no longer used. */
86 #define UCF_PREP_CREATEFILE 0x00000020
88 * Return a non-fsp smb_fname for a symlink
90 #define UCF_LCOMP_LNK_OK 0x00000040
92 * Use the same bit as FLAGS2_REPARSE_PATH
93 * which means the same thing.
95 #define UCF_GMT_PATHNAME 0x00000400
97 * Use the same bit as FLAGS2_DFS_PATHNAMES
98 * which means the same thing.
100 #define UCF_DFS_PATHNAME 0x00001000
102 #endif /* _SMBD_SMBD_H */