This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Cygrunsrv and special Windows virtual accounts "NT SERVICE"

On Dec  7 16:49, Lavrentiev, Anton (NIH/NLM/NCBI) [C] wrote:
> > per the bad user/pass combo, presumably).
> Per MSDN, :
> If the account name specified by the lpServiceStartName parameter is the name of a managed service account or virtual account name, the lpPassword parameter must be NULL.
> But cygrunsrv passes either "" or the actual string (when any username is provided).
> It should pass NULL for the username that look like "NT SERVICE\svcname":
>   if (!(sh = CreateService (sm, (), disp, SERVICE_ALL_ACCESS,
> 			    (interactive ? SERVICE_INTERACTIVE_PROCESS : 0),
> 			    type == Auto ? SERVICE_AUTO_START
> 			    dependencies,
> 			    username, username ? pass ?: "" : NULL)))

I'm wondering if it's such a bright idea to use a NULL password based on
a check for a certain domain.  That's practically guaranteed to break
at one point again.

Is it worth at all to support empty passwords?  If not, we could always
use NULL if !pass || pass[0] == '\0'.

Or, alternatively, what about something like `-w NULL'?


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]