summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2014-11-04 21:46:14 -0800
committerJeremy Allison <jra@samba.org>2014-12-04 05:45:09 +0100
commitc22d521d26a75a71f940088b5a01d7fa924efd88 (patch)
treed5037392fc99cc4b853d9d757571288a1c1c812a
parente761c80f65c690ce2d93c30bcd8d8d9d752096a8 (diff)
downloadsamba-c22d521d26a75a71f940088b5a01d7fa924efd88.tar.gz
samba-c22d521d26a75a71f940088b5a01d7fa924efd88.tar.xz
samba-c22d521d26a75a71f940088b5a01d7fa924efd88.zip
s3:smbd: Add fsp_client_guid() utility function to return the connected client guid.
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
-rw-r--r--source3/smbd/files.c5
-rw-r--r--source3/smbd/proto.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/source3/smbd/files.c b/source3/smbd/files.c
index a9e8357cf3..71166288a6 100644
--- a/source3/smbd/files.c
+++ b/source3/smbd/files.c
@@ -740,3 +740,8 @@ NTSTATUS fsp_set_smb_fname(struct files_struct *fsp,
smb_fname_str_dbg(fsp->fsp_name),
&fsp->name_hash);
}
+
+const struct GUID *fsp_client_guid(const files_struct *fsp)
+{
+ return &fsp->conn->sconn->client->connections->smb2.client.guid;
+}
diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h
index 1080895fdd..0670597e49 100644
--- a/source3/smbd/proto.h
+++ b/source3/smbd/proto.h
@@ -387,6 +387,7 @@ 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);
/* The following definitions come from smbd/ipc.c */