Alexandre Julliard : services.exe: Don' t reject config changes if the display name corresponds to the service being changed .

Alexandre Julliard julliard at winehq.org
Thu Apr 24 15:56:33 CDT 2008


Module: wine
Branch: master
Commit: af972cb1e414de53ae073d4af61c2885957b8925
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=af972cb1e414de53ae073d4af61c2885957b8925

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu Apr 24 13:53:21 2008 +0200

services.exe: Don't reject config changes if the display name corresponds to the service being changed.

---

 programs/services/rpc.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/programs/services/rpc.c b/programs/services/rpc.c
index f12aa82..3f6ee40 100644
--- a/programs/services/rpc.c
+++ b/programs/services/rpc.c
@@ -479,7 +479,7 @@ DWORD svcctl_ChangeServiceConfigW(
         DWORD dwPasswordSize,
         LPCWSTR lpDisplayName)
 {
-    struct service_entry new_entry;
+    struct service_entry new_entry, *entry;
     struct sc_service_handle *service;
     DWORD err;
 
@@ -501,7 +501,8 @@ DWORD svcctl_ChangeServiceConfigW(
     }
 
     if (lpDisplayName != NULL &&
-        scmdatabase_find_service_by_displayname(service->service_entry->db, lpDisplayName))
+        (entry = scmdatabase_find_service_by_displayname(service->service_entry->db, lpDisplayName)) &&
+        (entry != service->service_entry))
     {
         service_unlock(service->service_entry);
         return ERROR_DUPLICATE_SERVICE_NAME;




More information about the wine-cvs mailing list