mirror of
https://github.com/samba-team/samba.git
synced 2025-06-03 17:05:54 +03:00
libcli/smb: Add smb2_lease_equal() which compares client_guids and keys.
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Nov 7 22:41:47 CET 2014 on sn-devel-104
This commit is contained in:
parent
2fc8f761c1
commit
dbb191f35b
@ -93,3 +93,11 @@ bool smb2_lease_key_equal(const struct smb2_lease_key *k1,
|
||||
{
|
||||
return ((k1->data[0] == k2->data[0]) && (k1->data[1] == k2->data[1]));
|
||||
}
|
||||
|
||||
bool smb2_lease_equal(const struct GUID *g1,
|
||||
const struct smb2_lease_key *k1,
|
||||
const struct GUID *g2,
|
||||
const struct smb2_lease_key *k2)
|
||||
{
|
||||
return GUID_equal(g1, g2) && smb2_lease_key_equal(k1, k2);
|
||||
}
|
||||
|
@ -23,6 +23,7 @@
|
||||
#ifndef _LIBCLI_SMB_SMB2_LEASE_H_
|
||||
#define _LIBCLI_SMB_SMB2_LEASE_H_
|
||||
|
||||
#include "librpc/gen_ndr/ndr_misc.h"
|
||||
#include "librpc/gen_ndr/smb2_lease_struct.h"
|
||||
|
||||
/*
|
||||
@ -34,5 +35,9 @@ ssize_t smb2_lease_pull(const uint8_t *buf, size_t len,
|
||||
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);
|
||||
bool smb2_lease_equal(const struct GUID *g1,
|
||||
const struct smb2_lease_key *k1,
|
||||
const struct GUID *g2,
|
||||
const struct smb2_lease_key *k2);
|
||||
|
||||
#endif /* _LIBCLI_SMB_SMB2_LEASE_H_ */
|
||||
|
Loading…
x
Reference in New Issue
Block a user