+2002-05-19 Pierre Humblet <pierre.humblet@ieee.org>
+
+ * security.cc (open_local_policy): Initialize lsa to
+ INVALID_HANDLE_VALUE instead of NULL.
+ (get_logon_server_and_user_domain): Test for INVALID_HANDLE_VALUE
+ instead of NULL.
+ (create_token): Both of the above.
+
2002-05-18 Christopher Faylor <cgf@redhat.com>
* fhandler_disk_file.cc (fhandler_disk_file::fstat): Make handling of
open_local_policy ()
{
LSA_OBJECT_ATTRIBUTES oa = { 0, 0, 0, 0, 0, 0 };
- LSA_HANDLE lsa = NULL;
+ LSA_HANDLE lsa = INVALID_HANDLE_VALUE;
NTSTATUS ret = LsaOpenPolicy(NULL, &oa, POLICY_EXECUTE, &lsa);
if (ret != STATUS_SUCCESS)
{
BOOL ret = FALSE;
LSA_HANDLE lsa = open_local_policy ();
- if (lsa)
+ if (lsa != INVALID_HANDLE_VALUE)
{
ret = get_lsa_srv_inf (lsa, logonserver, userdomain);
close_local_policy (lsa);
create_token (cygsid &usersid, cygsid &pgrpsid)
{
NTSTATUS ret;
- LSA_HANDLE lsa = NULL;
+ LSA_HANDLE lsa = INVALID_HANDLE_VALUE;
char logonserver[INTERNET_MAX_HOST_NAME_LENGTH + 1];
int old_priv_state;
goto out;
/* Open policy object. */
- if (!(lsa = open_local_policy ()))
+ if ((lsa = open_local_policy ()) == INVALID_HANDLE_VALUE)
goto out;
/* Get logon server. */