From 4413149388396556cb30ff27b3afb79d0edb6029 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 18 Feb 2014 14:53:38 +0000 Subject: [PATCH] * setlsapwd.cc (setlsapwd): Fix conditional expression after breaking it on 2014-01-23. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/setlsapwd.cc | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 520803b01..7ceed3293 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2014-02-18 Corinna Vinschen + + * setlsapwd.cc (setlsapwd): Fix conditional expression after breaking + it on 2014-01-23. + 2014-02-17 Corinna Vinschen * autoload.cc (ldap_abandon): Import. diff --git a/winsup/cygwin/setlsapwd.cc b/winsup/cygwin/setlsapwd.cc index 811084832..c103d0d07 100644 --- a/winsup/cygwin/setlsapwd.cc +++ b/winsup/cygwin/setlsapwd.cc @@ -70,7 +70,7 @@ setlsapwd (const char *passwd, const char *username) if (data_buf) RtlInitUnicodeString (&data, data_buf); /* First try it locally. Works for admin accounts. */ - if (!(lsa = lsa_open_policy (NULL, POLICY_CREATE_SECRET))) + if ((lsa = lsa_open_policy (NULL, POLICY_CREATE_SECRET))) { NTSTATUS status = LsaStorePrivateData (lsa, &key, data.Length ? &data : NULL);