aboutsummaryrefslogtreecommitdiff
path: root/src/or/ntmain.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-01-03 12:47:14 -0500
committerNick Mathewson <nickm@torproject.org>2011-01-03 12:47:14 -0500
commitbb5f99d4dfe119f82556ba4d9385d667a8414935 (patch)
treed293ca6b963b380f3e67952dccdc57be20b96df1 /src/or/ntmain.c
parent40ef9087cf7960ce00cd82aa49309f47c9eb064c (diff)
parent9ecf133686c8907baec2292ca612ee11aa18406e (diff)
downloadtor-bb5f99d4dfe119f82556ba4d9385d667a8414935.tar.gz
tor-bb5f99d4dfe119f82556ba4d9385d667a8414935.zip
Merge remote branch 'sebastian/bug2314' into maint-0.2.2
Diffstat (limited to 'src/or/ntmain.c')
-rw-r--r--src/or/ntmain.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/ntmain.c b/src/or/ntmain.c
index b01d4cab4e..06ca2df91e 100644
--- a/src/or/ntmain.c
+++ b/src/or/ntmain.c
@@ -518,7 +518,7 @@ nt_service_install(int argc, char **argv)
SERVICE_DESCRIPTIONA sdBuff;
char *command;
char *errmsg;
- const char *user_acct = GENSRV_USERACCT;
+ const char *user_acct = NULL;
const char *password = "";
int i;
OSVERSIONINFOEX info;
@@ -562,13 +562,12 @@ nt_service_install(int argc, char **argv)
is_win2k_or_worse = 1;
}
- if (user_acct == GENSRV_USERACCT) {
+ if (!user_acct) {
if (is_win2k_or_worse) {
/* On Win2k, there is no LocalService account, so we actually need to
* fall back on NULL (the system account). */
printf("Running on Win2K or earlier, so the LocalService account "
"doesn't exist. Falling back to SYSTEM account.\n");
- user_acct = NULL;
} else {
/* Genericity is apparently _so_ last year in Redmond, where some
* accounts are accounts that you can look up, and some accounts
@@ -577,6 +576,7 @@ nt_service_install(int argc, char **argv)
*/
printf("Running on a Post-Win2K OS, so we'll assume that the "
"LocalService account exists.\n");
+ user_acct = GENSRV_USERACCT;
}
} else if (0 && service_fns.LookupAccountNameA_fn(NULL, // On this system
user_acct,