From 8f13798cdfd50c8c5088cd4833fb7d5f5ccb0159 Mon Sep 17 00:00:00 2001 From: epocman Date: Wed, 10 Sep 2003 13:26:33 +0000 Subject: [PATCH] When run as a specific user, stopping engine service stops guardian, like with FB 1.0x LocalSystem. --- src/utilities/install/install_svc.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/utilities/install/install_svc.cpp b/src/utilities/install/install_svc.cpp index 2602b2ec7b..6e3df12b08 100644 --- a/src/utilities/install/install_svc.cpp +++ b/src/utilities/install/install_svc.cpp @@ -256,7 +256,13 @@ int CLIB_ROUTINE main( int argc, char **argv) status = SERVICES_install(manager, ISCGUARD_SERVICE, ISCGUARD_DISPLAY_NAME, ISCGUARD_EXECUTABLE, directory, NULL, sw_startup, username, password, svc_error); - if (status == FB_SUCCESS) + status2 = FB_SUCCESS; + if (username != 0) + { + status2 = SERVICES_grant_access_rights(ISCGUARD_SERVICE, + username, svc_error); + } + if (status == FB_SUCCESS && status2 == FB_SUCCESS) ib_printf("Service \"%s\" successfully created.\n", ISCGUARD_DISPLAY_NAME); /* Set sw_startup to manual in preparation for install the service */