mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-14 07:03:44 +01:00
stop crashing on nt service install; but matt says still not right
svn:r9496
This commit is contained in:
parent
4ba57f68e4
commit
da5cd33ab8
@ -2157,6 +2157,7 @@ nt_service_install(int argc, char **argv)
|
|||||||
const char *user_acct = GENSRV_USERACCT;
|
const char *user_acct = GENSRV_USERACCT;
|
||||||
int i;
|
int i;
|
||||||
SID_NAME_USE sidUse;
|
SID_NAME_USE sidUse;
|
||||||
|
DWORD zero = 0;
|
||||||
|
|
||||||
if (nt_service_loadlibrary()<0)
|
if (nt_service_loadlibrary()<0)
|
||||||
return -1;
|
return -1;
|
||||||
@ -2179,8 +2180,10 @@ nt_service_install(int argc, char **argv)
|
|||||||
|
|
||||||
if (service_fns.LookupAccountNameA_fn(NULL, // On this system
|
if (service_fns.LookupAccountNameA_fn(NULL, // On this system
|
||||||
user_acct,
|
user_acct,
|
||||||
NULL, 0, // Don't care about the SID
|
NULL,
|
||||||
NULL, 0, // Don't care about the domain
|
&zero, // Don't care about the SID
|
||||||
|
NULL,
|
||||||
|
&zero, // Don't care about the domain
|
||||||
&sidUse) == 0) {
|
&sidUse) == 0) {
|
||||||
printf("User \"%s\" doesn't seem to exist.\n", user_acct);
|
printf("User \"%s\" doesn't seem to exist.\n", user_acct);
|
||||||
if (user_acct != GENSRV_USERACCT)
|
if (user_acct != GENSRV_USERACCT)
|
||||||
|
Loading…
Reference in New Issue
Block a user