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

This commit is contained in:
Alexandre Julliard 2008-04-24 13:53:21 +02:00
parent ea74621986
commit af972cb1e4
1 changed files with 3 additions and 2 deletions

View File

@ -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;