* setpwd.cc (client_request_setpwd::serve): Don't treat removing

non-existant private data as error.
This commit is contained in:
Corinna Vinschen 2008-12-15 18:05:50 +00:00
parent 85fd77a145
commit faded04e6c
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2008-12-15 Corinna Vinschen <corinna@vinschen.de>
* setpwd.cc (client_request_setpwd::serve): Don't treat removing
non-existant private data as error.
2008-12-15 Corinna Vinschen <corinna@vinschen.de>
* setpwd.cc (client_request_setpwd::serve): Explicitely erase password

View File

@ -92,7 +92,9 @@ client_request_setpwd::serve (transport_layer_base *const conn,
status = LsaStorePrivateData (lsa, &key, data.Length ? &data : NULL);
if (data.Length)
memset (data.Buffer, 0, data.Length);
if (NT_SUCCESS (status))
/* Success or we're trying to remove a password entry which doesn't exist. */
if (NT_SUCCESS (status)
|| (data.Length == 0 && status == STATUS_OBJECT_NAME_NOT_FOUND))
error_code (0);
else
error_code (LsaNtStatusToWinError (status));