|
@@ -517,7 +517,7 @@ nt_service_install(int argc, char **argv)
|
|
SERVICE_DESCRIPTIONA sdBuff;
|
|
SERVICE_DESCRIPTIONA sdBuff;
|
|
char *command;
|
|
char *command;
|
|
char *errmsg;
|
|
char *errmsg;
|
|
- const char *user_acct = GENSRV_USERACCT;
|
|
|
|
|
|
+ const char *user_acct = NULL;
|
|
const char *password = "";
|
|
const char *password = "";
|
|
int i;
|
|
int i;
|
|
OSVERSIONINFOEX info;
|
|
OSVERSIONINFOEX info;
|
|
@@ -561,13 +561,12 @@ nt_service_install(int argc, char **argv)
|
|
is_win2k_or_worse = 1;
|
|
is_win2k_or_worse = 1;
|
|
}
|
|
}
|
|
|
|
|
|
- if (user_acct == GENSRV_USERACCT) {
|
|
|
|
|
|
+ if (!user_acct) {
|
|
if (is_win2k_or_worse) {
|
|
if (is_win2k_or_worse) {
|
|
/* On Win2k, there is no LocalService account, so we actually need to
|
|
/* On Win2k, there is no LocalService account, so we actually need to
|
|
* fall back on NULL (the system account). */
|
|
* fall back on NULL (the system account). */
|
|
printf("Running on Win2K or earlier, so the LocalService account "
|
|
printf("Running on Win2K or earlier, so the LocalService account "
|
|
"doesn't exist. Falling back to SYSTEM account.\n");
|
|
"doesn't exist. Falling back to SYSTEM account.\n");
|
|
- user_acct = NULL;
|
|
|
|
} else {
|
|
} else {
|
|
/* Genericity is apparently _so_ last year in Redmond, where some
|
|
/* Genericity is apparently _so_ last year in Redmond, where some
|
|
* accounts are accounts that you can look up, and some accounts
|
|
* accounts are accounts that you can look up, and some accounts
|
|
@@ -576,6 +575,7 @@ nt_service_install(int argc, char **argv)
|
|
*/
|
|
*/
|
|
printf("Running on a Post-Win2K OS, so we'll assume that the "
|
|
printf("Running on a Post-Win2K OS, so we'll assume that the "
|
|
"LocalService account exists.\n");
|
|
"LocalService account exists.\n");
|
|
|
|
+ user_acct = GENSRV_USERACCT;
|
|
}
|
|
}
|
|
} else if (0 && service_fns.LookupAccountNameA_fn(NULL, // On this system
|
|
} else if (0 && service_fns.LookupAccountNameA_fn(NULL, // On this system
|
|
user_acct,
|
|
user_acct,
|