"Patrick J. LoPresti" <[EMAIL PROTECTED]> writes:

> We could modify todo.pl to hook the HKEY_LOCAL_MACHINE\...\Run key
> instead, which will cause it to run no matter who logs on next.  I am
> reluctant to do this, because if the automatic logon gets interrupted
> and some random user logs on, the whole process is going to get very
> confused.
> 
> But maybe that is not a problem; todo.pl could just exit quietly if
> the user is not a local Administrator.

I have implemented this.

By default, todo.pl now uses the
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run key
to invoke itself after reboot (instead of the
HKEY_CURRENT_USER\...\Run key).  It also bombs out if the user running
it does not have administrative privileges.

I figure bombing out is better than exiting silently, because really
no random users should be logging on in the middle of a todo.pl run
anyway.

Checking for "administrative privileges" is kind of subtle, since
there really isn't any such thing on Windows, at least not as a single
concept.  I ended up checking for the "Take ownership of files and
other objects" privilege, which should be a pretty close
approximation.  I hope.

The old behavior can still be obtained by providing the "--user"
switch to todo.pl.

I have checked these changes in to CVS.  I will be making another
pre-release, probably a release candidate, next week.  With any luck
Microsoft will issue a fix for
<http://www.us-cert.gov/cas/techalerts/TA04-099A.html> by then.

 - Pat


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
unattended-info mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/unattended-info

Reply via email to