smbd: use check_any_access_fsp() for all access checks
[Samba.git] / source3 / smbd / smb1_process.h
blob1e362483dc9e88959654dd132ef0df28e3d7db74
1 /*
2 Unix SMB/CIFS implementation.
3 process incoming packets - main loop
4 Copyright (C) Andrew Tridgell 1992-1998
5 Copyright (C) Volker Lendecke 2005-2007
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>.
21 bool smb1_srv_send(struct smbXsrv_connection *xconn,
22 char *buffer,
23 bool do_signing,
24 uint32_t seqnum,
25 bool do_encrypt);
26 NTSTATUS allow_new_trans(struct trans_state *list, uint64_t mid);
27 void smb_request_done(struct smb_request *req);
28 const char *smb_fn_name(int type);
29 void add_to_common_flags2(uint32_t v);
30 void remove_from_common_flags2(uint32_t v);
31 bool smb1_is_chain(const uint8_t *buf);
32 bool smb1_walk_chain(const uint8_t *buf,
33 bool (*fn)(uint8_t cmd,
34 uint8_t wct, const uint16_t *vwv,
35 uint16_t num_bytes, const uint8_t *bytes,
36 void *private_data),
37 void *private_data);
38 unsigned smb1_chain_length(const uint8_t *buf);
39 bool smb1_parse_chain(TALLOC_CTX *mem_ctx, const uint8_t *buf,
40 struct smbXsrv_connection *xconn,
41 bool encrypted, uint32_t seqnum,
42 struct smb_request ***reqs, unsigned *num_reqs);
43 bool req_is_in_chain(const struct smb_request *req);
44 bool fork_echo_handler(struct smbXsrv_connection *xconn);
45 NTSTATUS smb1_receive_talloc(TALLOC_CTX *mem_ctx,
46 struct smbXsrv_connection *xconn,
47 int sock,
48 char **buffer, unsigned int timeout,
49 size_t *p_unread, bool *p_encrypted,
50 size_t *p_len,
51 uint32_t *seqnum,
52 bool trusted_channel);
53 bool push_deferred_open_message_smb1(struct smb_request *req,
54 struct timeval timeout,
55 struct file_id id,
56 struct deferred_open_record *open_rec);
57 void process_smb1(struct smbXsrv_connection *xconn,
58 uint8_t *inbuf,
59 size_t nread,
60 size_t unread_bytes,
61 uint32_t seqnum,
62 bool encrypted);
63 void smbd_echo_init(struct smbXsrv_connection *xconn);
64 void construct_reply(struct smbXsrv_connection *xconn,
65 char *inbuf,
66 int size,
67 size_t unread_bytes,
68 uint32_t seqnum,
69 bool encrypted);
70 void smbd_smb1_server_connection_read_handler(struct smbXsrv_connection *xconn,
71 int fd);
72 bool keepalive_fn(const struct timeval *now, void *private_data);