smbd: use check_any_access_fsp() for all access checks
[Samba.git] / source3 / smbd / smbXsrv_open.h
blob0257650123792bad05f3857784c3a5fa16ecdf1e
1 /*
2 * Unix SMB/CIFS implementation.
4 * Copyright (C) Stefan Metzmacher 2012
5 * Copyright (C) Michael Adam 2012
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 #ifndef __SMBXSRV_OPEN_H__
22 #define __SMBXSRV_OPEN_H__
24 #include "replace.h"
25 #include "libcli/util/ntstatus.h"
26 #include "lib/util/time.h"
27 #include "lib/util/data_blob.h"
28 #include "librpc/gen_ndr/misc.h"
30 struct smbXsrv_connection;
31 struct auth_session_info;
32 struct smbXsrv_open;
33 struct smbXsrv_open_global0;
34 struct smbXsrv_client;
36 NTSTATUS smbXsrv_open_global_init(void);
37 NTSTATUS smbXsrv_open_create(struct smbXsrv_connection *conn,
38 struct auth_session_info *session_info,
39 NTTIME now,
40 struct smbXsrv_open **_open);
41 NTSTATUS smbXsrv_open_update(struct smbXsrv_open *_open);
42 NTSTATUS smbXsrv_open_close(struct smbXsrv_open *op, NTTIME now);
43 NTSTATUS smb1srv_open_table_init(struct smbXsrv_connection *conn);
44 NTSTATUS smb1srv_open_lookup(struct smbXsrv_connection *conn,
45 uint16_t fnum, NTTIME now,
46 struct smbXsrv_open **_open);
47 NTSTATUS smb2srv_open_table_init(struct smbXsrv_connection *conn);
48 NTSTATUS smb2srv_open_lookup(struct smbXsrv_connection *conn,
49 uint64_t persistent_id,
50 uint64_t volatile_id,
51 NTTIME now,
52 struct smbXsrv_open **_open);
53 NTSTATUS smbXsrv_open_purge_replay_cache(struct smbXsrv_client *client,
54 const struct GUID *create_guid);
55 NTSTATUS smb2srv_open_lookup_replay_cache(struct smbXsrv_connection *conn,
56 struct GUID caller_req_guid,
57 struct GUID create_guid,
58 const char *name,
59 NTTIME now,
60 struct smbXsrv_open **_open);
61 NTSTATUS smb2srv_open_recreate(struct smbXsrv_connection *conn,
62 struct auth_session_info *session_info,
63 uint64_t persistent_id,
64 const struct GUID *create_guid,
65 NTTIME now,
66 struct smbXsrv_open **_open);
68 struct db_record;
69 NTSTATUS smbXsrv_open_global_traverse(
70 int (*fn)(struct db_record *rec, struct smbXsrv_open_global0 *, void *),
71 void *private_data);
73 NTSTATUS smbXsrv_open_cleanup(uint64_t persistent_id);
75 #endif