diff options
author | Volker Lendecke <vl@samba.org> | 2014-10-29 13:55:16 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2014-11-07 20:13:09 +0100 |
commit | 2fc8f761c188b1abc90df68003b05b7a098aeabe (patch) | |
tree | 748f5c525e5447e274abd4cb8789833ebbf99103 /libcli/smb | |
parent | a6affb7bb3ff595165e708c56ede2181f0bb570f (diff) | |
download | samba-2fc8f761c188b1abc90df68003b05b7a098aeabe.tar.gz samba-2fc8f761c188b1abc90df68003b05b7a098aeabe.tar.xz samba-2fc8f761c188b1abc90df68003b05b7a098aeabe.zip |
libcli/smb: add smb2_lease_key_equal() helper function
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'libcli/smb')
-rw-r--r-- | libcli/smb/smb2_lease.c | 6 | ||||
-rw-r--r-- | libcli/smb/smb2_lease.h | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/libcli/smb/smb2_lease.c b/libcli/smb/smb2_lease.c index e817c347e1..41eafc99c6 100644 --- a/libcli/smb/smb2_lease.c +++ b/libcli/smb/smb2_lease.c @@ -87,3 +87,9 @@ bool smb2_lease_push(const struct smb2_lease *lease, uint8_t *buf, size_t len) return true; } + +bool smb2_lease_key_equal(const struct smb2_lease_key *k1, + const struct smb2_lease_key *k2) +{ + return ((k1->data[0] == k2->data[0]) && (k1->data[1] == k2->data[1])); +} diff --git a/libcli/smb/smb2_lease.h b/libcli/smb/smb2_lease.h index ba8178dba0..9db239d0f5 100644 --- a/libcli/smb/smb2_lease.h +++ b/libcli/smb/smb2_lease.h @@ -32,5 +32,7 @@ ssize_t smb2_lease_pull(const uint8_t *buf, size_t len, struct smb2_lease *lease); bool smb2_lease_push(const struct smb2_lease *lease, uint8_t *buf, size_t len); +bool smb2_lease_key_equal(const struct smb2_lease_key *k1, + const struct smb2_lease_key *k2); #endif /* _LIBCLI_SMB_SMB2_LEASE_H_ */ |