* 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.
This commit is contained in:
parent
130e7349a5
commit
2d6ce5c228
|
@ -1,3 +1,11 @@
|
||||||
|
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>
|
2002-05-18 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
* fhandler_disk_file.cc (fhandler_disk_file::fstat): Make handling of
|
* fhandler_disk_file.cc (fhandler_disk_file::fstat): Make handling of
|
||||||
|
|
|
@ -180,7 +180,7 @@ static LSA_HANDLE
|
||||||
open_local_policy ()
|
open_local_policy ()
|
||||||
{
|
{
|
||||||
LSA_OBJECT_ATTRIBUTES oa = { 0, 0, 0, 0, 0, 0 };
|
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);
|
NTSTATUS ret = LsaOpenPolicy(NULL, &oa, POLICY_EXECUTE, &lsa);
|
||||||
if (ret != STATUS_SUCCESS)
|
if (ret != STATUS_SUCCESS)
|
||||||
|
@ -258,7 +258,7 @@ get_logon_server_and_user_domain (char *logonserver, char *userdomain)
|
||||||
{
|
{
|
||||||
BOOL ret = FALSE;
|
BOOL ret = FALSE;
|
||||||
LSA_HANDLE lsa = open_local_policy ();
|
LSA_HANDLE lsa = open_local_policy ();
|
||||||
if (lsa)
|
if (lsa != INVALID_HANDLE_VALUE)
|
||||||
{
|
{
|
||||||
ret = get_lsa_srv_inf (lsa, logonserver, userdomain);
|
ret = get_lsa_srv_inf (lsa, logonserver, userdomain);
|
||||||
close_local_policy (lsa);
|
close_local_policy (lsa);
|
||||||
|
@ -723,7 +723,7 @@ HANDLE
|
||||||
create_token (cygsid &usersid, cygsid &pgrpsid)
|
create_token (cygsid &usersid, cygsid &pgrpsid)
|
||||||
{
|
{
|
||||||
NTSTATUS ret;
|
NTSTATUS ret;
|
||||||
LSA_HANDLE lsa = NULL;
|
LSA_HANDLE lsa = INVALID_HANDLE_VALUE;
|
||||||
char logonserver[INTERNET_MAX_HOST_NAME_LENGTH + 1];
|
char logonserver[INTERNET_MAX_HOST_NAME_LENGTH + 1];
|
||||||
int old_priv_state;
|
int old_priv_state;
|
||||||
|
|
||||||
|
@ -764,7 +764,7 @@ create_token (cygsid &usersid, cygsid &pgrpsid)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
/* Open policy object. */
|
/* Open policy object. */
|
||||||
if (!(lsa = open_local_policy ()))
|
if ((lsa = open_local_policy ()) == INVALID_HANDLE_VALUE)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
/* Get logon server. */
|
/* Get logon server. */
|
||||||
|
|
Loading…
Reference in New Issue