1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

util: add policy_hnd_equal().

Guenther
(This used to be commit 6aca163e89)
This commit is contained in:
Günther Deschner 2008-07-01 20:09:09 +02:00
parent bda5542de1
commit 6a3b742db7
2 changed files with 12 additions and 0 deletions

View File

@ -1408,6 +1408,8 @@ void *talloc_zeronull(const void *context, size_t size, const char *name);
NTSTATUS split_ntfs_stream_name(TALLOC_CTX *mem_ctx, const char *fname,
char **pbase, char **pstream);
bool is_valid_policy_hnd(const POLICY_HND *hnd);
bool policy_hnd_equal(const struct policy_handle *hnd1,
const struct policy_handle *hnd2);
const char *strip_hostname(const char *s);
/* The following definitions come from lib/util_file.c */

View File

@ -3458,6 +3458,16 @@ bool is_valid_policy_hnd(const POLICY_HND *hnd)
return (memcmp(&tmp, hnd, sizeof(tmp)) != 0);
}
bool policy_hnd_equal(const struct policy_handle *hnd1,
const struct policy_handle *hnd2)
{
if (!hnd1 || !hnd2) {
return false;
}
return (memcmp(hnd1, hnd2, sizeof(*hnd1)) == 0);
}
/****************************************************************
strip off leading '\\' from a hostname
****************************************************************/