]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Move fsp_client_guid() to locking/
authorVolker Lendecke <vl@samba.org>
Mon, 5 Aug 2019 12:57:28 +0000 (14:57 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 6 Aug 2019 21:49:29 +0000 (21:49 +0000)
Yes, this adds another peek from locking/ back into smbd/proto.h, but
locking/locking.c does the same already.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/locking/leases_util.c
source3/locking/proto.h
source3/smbd/files.c
source3/smbd/proto.h

index af1e8374128580b568ea3d4e57f9789df41418fc..f10c91f0d32018f736d5edd7da050a49559d1a4d 100644 (file)
@@ -23,6 +23,7 @@
 #include "includes.h"
 #include "../librpc/gen_ndr/open_files.h"
 #include "locking/proto.h"
+#include "smbd/globals.h"
 
 uint32_t map_oplock_to_lease_type(uint16_t op_type)
 {
@@ -70,3 +71,8 @@ bool fsp_lease_type_is_exclusive(const struct files_struct *fsp)
 
        return lease_type_is_exclusive(lease_type);
 }
+
+const struct GUID *fsp_client_guid(const files_struct *fsp)
+{
+       return &fsp->conn->sconn->client->connections->smb2.client.guid;
+}
index 3eb928ab12e1285371a3fc58fec6d6463fbb75f3..57619b81866f6463210f3cc24fa281a4beb28be4 100644 (file)
@@ -250,5 +250,6 @@ uint32_t map_oplock_to_lease_type(uint16_t op_type);
 uint32_t fsp_lease_type(const struct files_struct *fsp);
 uint32_t lease_type_is_exclusive(uint32_t lease_type);
 bool fsp_lease_type_is_exclusive(const struct files_struct *fsp);
+const struct GUID *fsp_client_guid(const files_struct *fsp);
 
 #endif /* _LOCKING_PROTO_H_ */
index 0369d36e22d486f54d1c4cdcb20e3fa0bc6e2153..e8fbb57c88b7a1f513597e89c1cf27a36d12abdb 100644 (file)
@@ -773,11 +773,6 @@ NTSTATUS fsp_set_smb_fname(struct files_struct *fsp,
                        &fsp->name_hash);
 }
 
-const struct GUID *fsp_client_guid(const files_struct *fsp)
-{
-       return &fsp->conn->sconn->client->connections->smb2.client.guid;
-}
-
 size_t fsp_fullbasepath(struct files_struct *fsp, char *buf, size_t buflen)
 {
        int len = 0;
index d907112a5b50803d342d26c74b300e3d3e7d12ee..7103b2cef298c19dcd8094a45c445e8454355889 100644 (file)
@@ -416,7 +416,6 @@ NTSTATUS file_name_hash(connection_struct *conn,
                        const char *name, uint32_t *p_name_hash);
 NTSTATUS fsp_set_smb_fname(struct files_struct *fsp,
                           const struct smb_filename *smb_fname_in);
-const struct GUID *fsp_client_guid(const files_struct *fsp);
 size_t fsp_fullbasepath(struct files_struct *fsp, char *buf, size_t buflen);
 
 /* The following definitions come from smbd/ipc.c  */