/description of the problem/
I am writing a win32 service for Windows NT4sp6a. On the same machine I am running 
sshd in a cygwin environment, with ntsec turned on. My win32 service does not use any 
of the cygwin services/code. Unfortunately after I log in to an ssh window my service 
can no longer run its sub-processes. Also restarting the service breaks the ssh 
session, I get errors similar to the following

--------
$ ls
   1506 [main] -bash 206 sync_with_child: child 248(0x158) died before initialization 
with status code 0x80
   2344 [main] -bash 206 sync_with_child: *** child state waiting for longjmp
-bash: fork: Resource temporarily unavailable
-----------

/Implementation details/
My  win32 service needs to executes other exes either as the SYSTEM user or as another 
local user with less privileges. 
To avoid getting the nasty 'user32.dll cannot initialize' errors, I am following the 
guidelines from the Microsoft site on how to setup the permissions for  the windows 
station/desktop: http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q165194. I 
have some working code that allows my processes to share the default non-interactive 
desktop. 

From what I see from the sources, cygwin is also adjusting the permissions on the 
station\desktop. The approach taken in spawn.cc is a lot more radical though, the 
security descriptor is basically blown away. This seems to break my code. 

Has anybody else encountered this problem? Are there plans to move to a more nuanced 
approach when adjusting the permissions on the window stations/desktop?

Thanks for any pointers/comments.

Marius Seritan
Engineering
[EMAIL PROTECTED]


Reply via email to