1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-13 13:18:06 +03:00

Move policy_handle_is_valid out of parse_lsa.c

Guenther
(This used to be commit c396f45e7d)
This commit is contained in:
Günther Deschner 2008-02-17 03:10:21 +01:00
parent 5b8ebcf397
commit 10c3957d04
2 changed files with 10 additions and 12 deletions

View File

@ -1206,15 +1206,3 @@ bool lsa_io_r_lookup_names4(const char *desc, LSA_R_LOOKUP_NAMES4 *out, prs_stru
return True;
}
/*******************************************************************
Reads or writes an LUID_ATTR structure.
********************************************************************/
bool policy_handle_is_valid(const POLICY_HND *hnd)
{
POLICY_HND zero_pol;
ZERO_STRUCT(zero_pol);
return ((memcmp(&zero_pol, hnd, sizeof(POLICY_HND)) == 0) ? False : True );
}

View File

@ -1859,4 +1859,14 @@ uint32 str_len_uni(UNISTR *source)
return i;
}
/*******************************************************************
Verifies policy handle
********************************************************************/
bool policy_handle_is_valid(const POLICY_HND *hnd)
{
POLICY_HND zero_pol;
ZERO_STRUCT(zero_pol);
return ((memcmp(&zero_pol, hnd, sizeof(POLICY_HND)) == 0) ? false : true );
}