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]

cron & Windows 7

I got reports that cron is having problems with Cygwin 1.7.1 on 
Windows 7 - 32 bits.
They occur only with seteuid method 1, not with method 2 nor method 3.

An earlier report
indicated that there was no problem with 1.7.0. There is no proof that 
the Cygwin update to 1.7.1 caused the problem.

Basically cron starts with a process A that forks a process B, which 
setsid and sleeps until the next minutes. It then forks a process C that runs
the crontabs and forks a process D for every user. Process D calls seteuid
and then execs /bin/sh.

The helpful user was willing to experiment and provided two straces 
of cron, see attachments.

In trace_cron.log we see that, after the seteuid, process D cannot 
load the user32 dll.
winerr 1114, A dynamic link library (DLL) initialization routine failed.
I believe that is occurring while trying to execute GetProcessWindowStation
in fhandler_console::need_invisible, called from spawn_guts.
This call is made while impersonated. I am not sure why it's needed 
there given that a few lines below a brand new invisible WindowStation is
created anyway, at least in this case.

The other log trace_cron+syslog-ng.log was created in another run 
where syslog-ng replaced the Windows application log. I had requested that
test because another unverified report claimed that doing so allowed cron to
run on Windows 7 64 bits.
In this case it didn't help, but the behavior is different (I doubt it's directly due 
to syslog-ng). CreateProcessAsUser succeeds, but its parent never hears from
the child and quits after trying a few times (BTW, the creation of the WindowStation 
is in the retry loop).

Incidentally, I noticed
   get_registry_hive_path: HKLM\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\XXX  not found
That's because there should be a " " between "Windows" and "NT". So USERPROFILE is
never set properly in the environment.

Sorry I don't have access to Windows 7 to investigate more deeply.


Attachment: trace_cron+syslog-ng.log
Description: Binary data

Attachment: trace_cron.log
Description: Binary data

Problem reports:
Unsubscribe info:

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