summaryrefslogtreecommitdiff
path: root/source4/libcli/smb2/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli/smb2/util.c')
-rw-r--r--source4/libcli/smb2/util.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source4/libcli/smb2/util.c b/source4/libcli/smb2/util.c
index 8602c91a9f..9b8d6887b1 100644
--- a/source4/libcli/smb2/util.c
+++ b/source4/libcli/smb2/util.c
@@ -220,3 +220,12 @@ int smb2_deltree(struct smb2_tree *tree, const char *dname)
return total_deleted;
}
+
+/*
+ check if two SMB2 file handles are the same
+*/
+bool smb2_util_handle_equal(const struct smb2_handle h1,
+ const struct smb2_handle h2)
+{
+ return (h1.data[0] == h2.data[0]) && (h1.data[1] == h2.data[1]);
+}