diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2008-12-15 21:05:50 +0300 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2008-12-15 21:05:50 +0300 |
commit | faded04e6c1891797b36fd17166ed03ad6de8d28 (patch) | |
tree | ca0c91df095bdd24762d736867a8dd72a3edfc81 /winsup | |
parent | 85fd77a145174662dbe073f8669f5c22d4240dd0 (diff) |
* setpwd.cc (client_request_setpwd::serve): Don't treat removing
non-existant private data as error.
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/cygserver/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygserver/setpwd.cc | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/winsup/cygserver/ChangeLog b/winsup/cygserver/ChangeLog index 04054741b..3f8566fd5 100644 --- a/winsup/cygserver/ChangeLog +++ b/winsup/cygserver/ChangeLog @@ -1,5 +1,10 @@ 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 buffer content after usage. diff --git a/winsup/cygserver/setpwd.cc b/winsup/cygserver/setpwd.cc index 70d96cd57..8125fd25a 100644 --- a/winsup/cygserver/setpwd.cc +++ b/winsup/cygserver/setpwd.cc @@ -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)); |