]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Give smbXsrv_open.c its own header file
authorVolker Lendecke <vl@samba.org>
Tue, 26 Oct 2021 11:48:28 +0000 (13:48 +0200)
committerJeremy Allison <jra@samba.org>
Thu, 11 Nov 2021 19:08:37 +0000 (19:08 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
12 files changed:
source3/smbd/close.c
source3/smbd/files.c
source3/smbd/globals.h
source3/smbd/process.c
source3/smbd/reply.c
source3/smbd/scavenger.c
source3/smbd/server.c
source3/smbd/smb2_create.c
source3/smbd/smb2_server.c
source3/smbd/smbXsrv_open.c
source3/smbd/smbXsrv_open.h [new file with mode: 0644]
source3/utils/net_serverid.c

index e627237673943207762346f98a4d84df8a628227..0ea0f096fead6cba271df93e73178eae92dbed05 100644 (file)
@@ -26,6 +26,7 @@
 #include "locking/share_mode_lock.h"
 #include "smbd/smbd.h"
 #include "smbd/globals.h"
+#include "smbd/smbXsrv_open.h"
 #include "smbd/scavenger.h"
 #include "fake_file.h"
 #include "transfer_file.h"
index a2269d8da6527476b272fd39306af842367cfe80..de38c36f3946ceec2f754dbf4cc6fab9d2b843b8 100644 (file)
@@ -20,6 +20,7 @@
 #include "includes.h"
 #include "smbd/smbd.h"
 #include "smbd/globals.h"
+#include "smbd/smbXsrv_open.h"
 #include "libcli/security/security.h"
 #include "util_tdb.h"
 #include "lib/util/bitmap.h"
index 3215a5a8c2eaece14d9c78d485c5ff87bdc84e74..4fa8ebd8355e6f98d056d17edb582dad871c2472 100644 (file)
@@ -661,43 +661,7 @@ NTSTATUS smbXsrv_tcon_global_traverse(
                        int (*fn)(struct smbXsrv_tcon_global0 *, void *),
                        void *private_data);
 
-NTSTATUS smbXsrv_open_global_init(void);
-NTSTATUS smbXsrv_open_create(struct smbXsrv_connection *conn,
-                            struct auth_session_info *session_info,
-                            NTTIME now,
-                            struct smbXsrv_open **_open);
-NTSTATUS smbXsrv_open_update(struct smbXsrv_open *_open);
-NTSTATUS smbXsrv_open_close(struct smbXsrv_open *op, NTTIME now);
-NTSTATUS smb1srv_open_table_init(struct smbXsrv_connection *conn);
-NTSTATUS smb1srv_open_lookup(struct smbXsrv_connection *conn,
-                            uint16_t fnum, NTTIME now,
-                            struct smbXsrv_open **_open);
-NTSTATUS smb2srv_open_table_init(struct smbXsrv_connection *conn);
-NTSTATUS smb2srv_open_lookup(struct smbXsrv_connection *conn,
-                            uint64_t persistent_id,
-                            uint64_t volatile_id,
-                            NTTIME now,
-                            struct smbXsrv_open **_open);
-NTSTATUS smbXsrv_open_purge_replay_cache(struct smbXsrv_client *client,
-                                        const struct GUID *create_guid);
-NTSTATUS smb2srv_open_lookup_replay_cache(struct smbXsrv_connection *conn,
-                                         struct GUID caller_req_guid,
-                                         struct GUID create_guid,
-                                         const char *name,
-                                         NTTIME now,
-                                         struct smbXsrv_open **_open);
-NTSTATUS smb2srv_open_recreate(struct smbXsrv_connection *conn,
-                              struct auth_session_info *session_info,
-                              uint64_t persistent_id,
-                              const struct GUID *create_guid,
-                              NTTIME now,
-                              struct smbXsrv_open **_open);
-struct smbXsrv_open_global0;
-NTSTATUS smbXsrv_open_global_traverse(
-       int (*fn)(struct smbXsrv_open_global0 *, void *),
-       void *private_data);
 
-NTSTATUS smbXsrv_open_cleanup(uint64_t persistent_id);
 bool smbXsrv_is_encrypted(uint8_t encryption_flags);
 bool smbXsrv_is_partially_encrypted(uint8_t encryption_flags);
 bool smbXsrv_set_crypto_flag(uint8_t *flags, uint8_t flag);
index 5015c143a042caa8687d95089905101ca8bb17dd..e9ae004ebd8bff6d23485fa826124b7723c69ca3 100644 (file)
@@ -23,6 +23,7 @@
 #include "system/filesys.h"
 #include "smbd/smbd.h"
 #include "smbd/globals.h"
+#include "smbd/smbXsrv_open.h"
 #include "librpc/gen_ndr/netlogon.h"
 #include "../lib/async_req/async_sock.h"
 #include "ctdbd_conn.h"
index f85d1122a0763cd0ecdc95ea6f1729a28e2255a9..6e576552fcd83099b463ad04dbc56a29d4cc4ebd 100644 (file)
@@ -31,6 +31,7 @@
 #include "locking/share_mode_lock.h"
 #include "smbd/smbd.h"
 #include "smbd/globals.h"
+#include "smbd/smbXsrv_open.h"
 #include "fake_file.h"
 #include "rpc_client/rpc_client.h"
 #include "../librpc/gen_ndr/ndr_spoolss_c.h"
index 70c7b5ba1e5f97e8fcf75fce8e849f15f949358b..fe47c22e05ffde3d2a3115e698ec1b693641668b 100644 (file)
@@ -22,6 +22,7 @@
 #include "messages.h"
 #include "serverid.h"
 #include "smbd/globals.h"
+#include "smbd/smbXsrv_open.h"
 #include "smbd/scavenger.h"
 #include "locking/share_mode_lock.h"
 #include "locking/leases_db.h"
index 05592d0ef41d24faf039f826677fb8da5f0fbe5a..c540e9c89993ed3d7f46535291b7ff75ef60a4d3 100644 (file)
@@ -29,6 +29,7 @@
 #include "locking/share_mode_lock.h"
 #include "smbd/smbd.h"
 #include "smbd/globals.h"
+#include "smbd/smbXsrv_open.h"
 #include "registry/reg_init_full.h"
 #include "libcli/auth/schannel.h"
 #include "secrets.h"
index a27b87ea0eedd9b12f671ddf96ca43763845062c..ad1ddc9a65ea7917c732ddc1cd768ba5f7587741 100644 (file)
@@ -23,6 +23,7 @@
 #include "printing.h"
 #include "smbd/smbd.h"
 #include "smbd/globals.h"
+#include "smbd/smbXsrv_open.h"
 #include "../libcli/smb/smb_common.h"
 #include "../librpc/gen_ndr/ndr_security.h"
 #include "../librpc/gen_ndr/ndr_smb2_lease_struct.h"
index f6b376e5a07adf1be829a4eebd4f8f5690d48b4a..4f302c3541934ebe7c5b992c3440ac8148f9ed32 100644 (file)
@@ -23,6 +23,7 @@
 #include "system/network.h"
 #include "smbd/smbd.h"
 #include "smbd/globals.h"
+#include "smbd/smbXsrv_open.h"
 #include "lib/param/param.h"
 #include "../libcli/smb/smb_common.h"
 #include "../lib/tsocket/tsocket.h"
index 2b9e52ed2afe745e5d6a1115d470ae9d61d751fa..f8d4c88fe2d47ad9c2e42d60ca2c862f5c7175b7 100644 (file)
@@ -18,6 +18,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
+#include "smbXsrv_open.h"
 #include "includes.h"
 #include "system/filesys.h"
 #include "lib/util/server_id.h"
diff --git a/source3/smbd/smbXsrv_open.h b/source3/smbd/smbXsrv_open.h
new file mode 100644 (file)
index 0000000..3990550
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ * Unix SMB/CIFS implementation.
+ *
+ * Copyright (C) Stefan Metzmacher 2012
+ * Copyright (C) Michael Adam 2012
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __SMBXSRV_OPEN_H__
+#define __SMBXSRV_OPEN_H__
+
+#include "replace.h"
+#include "libcli/util/ntstatus.h"
+#include "lib/util/time.h"
+#include "lib/util/data_blob.h"
+#include "librpc/gen_ndr/misc.h"
+
+struct smbXsrv_connection;
+struct auth_session_info;
+struct smbXsrv_open;
+struct smbXsrv_open_global0;
+struct smbXsrv_client;
+
+NTSTATUS smbXsrv_open_global_init(void);
+NTSTATUS smbXsrv_open_create(struct smbXsrv_connection *conn,
+                            struct auth_session_info *session_info,
+                            NTTIME now,
+                            struct smbXsrv_open **_open);
+NTSTATUS smbXsrv_open_update(struct smbXsrv_open *_open);
+NTSTATUS smbXsrv_open_close(struct smbXsrv_open *op, NTTIME now);
+NTSTATUS smb1srv_open_table_init(struct smbXsrv_connection *conn);
+NTSTATUS smb1srv_open_lookup(struct smbXsrv_connection *conn,
+                            uint16_t fnum, NTTIME now,
+                            struct smbXsrv_open **_open);
+NTSTATUS smb2srv_open_table_init(struct smbXsrv_connection *conn);
+NTSTATUS smb2srv_open_lookup(struct smbXsrv_connection *conn,
+                            uint64_t persistent_id,
+                            uint64_t volatile_id,
+                            NTTIME now,
+                            struct smbXsrv_open **_open);
+NTSTATUS smbXsrv_open_purge_replay_cache(struct smbXsrv_client *client,
+                                        const struct GUID *create_guid);
+NTSTATUS smb2srv_open_lookup_replay_cache(struct smbXsrv_connection *conn,
+                                         struct GUID caller_req_guid,
+                                         struct GUID create_guid,
+                                         const char *name,
+                                         NTTIME now,
+                                         struct smbXsrv_open **_open);
+NTSTATUS smb2srv_open_recreate(struct smbXsrv_connection *conn,
+                              struct auth_session_info *session_info,
+                              uint64_t persistent_id,
+                              const struct GUID *create_guid,
+                              NTTIME now,
+                              struct smbXsrv_open **_open);
+NTSTATUS smbXsrv_open_global_traverse(
+       int (*fn)(struct smbXsrv_open_global0 *, void *),
+       void *private_data);
+
+NTSTATUS smbXsrv_open_cleanup(uint64_t persistent_id);
+
+#endif
index 45df3b74ce4b063904c2a1d341d1bcf4ae5b9d96..b98a17329833a9962030963469af633378a5d2f3 100644 (file)
@@ -25,6 +25,7 @@
 #include "serverid.h"
 #include "session.h"
 #include "smbd/globals.h"
+#include "smbd/smbXsrv_open.h"
 #include "util_tdb.h"
 #include "librpc/gen_ndr/ndr_open_files.h"