From: Volker Lendecke Date: Mon, 5 Aug 2019 12:57:28 +0000 (+0200) Subject: smbd: Move fsp_client_guid() to locking/ X-Git-Tag: tdb-1.4.2~289 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3851062916cbee2114f6aa5154cdc89425724d87;p=thirdparty%2Fsamba.git smbd: Move fsp_client_guid() to locking/ 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 Reviewed-by: Jeremy Allison --- diff --git a/source3/locking/leases_util.c b/source3/locking/leases_util.c index af1e8374128..f10c91f0d32 100644 --- a/source3/locking/leases_util.c +++ b/source3/locking/leases_util.c @@ -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; +} diff --git a/source3/locking/proto.h b/source3/locking/proto.h index 3eb928ab12e..57619b81866 100644 --- a/source3/locking/proto.h +++ b/source3/locking/proto.h @@ -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_ */ diff --git a/source3/smbd/files.c b/source3/smbd/files.c index 0369d36e22d..e8fbb57c88b 100644 --- a/source3/smbd/files.c +++ b/source3/smbd/files.c @@ -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; diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index d907112a5b5..7103b2cef29 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -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 */