CRON and time
Thu Jun 28 04:53:00 GMT 2001
At 13:04 28-6-2001, Trikkaliotis Niklos wrote:
>Yes the problems from cron is resolved !!!
>Take the next patch !!!
>Compile the sources, copy the exes in the correct place and run cron as
>All work fine :-))))
Well, It's up to Corinna, of course, but I would be surprised if this patch
A few comments:
>< #define CRON_TAB(u) "%s/%s", SPOOL_DIR, u
> > #define CRON_TAB(u) "%s/%s/%s", CRONDIR, SPOOL_DIR, u
This should be totally unnecessary. In every place this is used, the cwd
In any case, if it would be useful, you should put this change within an
>< if (fchmod(fileno(tmp), 0600) < OK)
> > if (fchmod(fileno(tmp), 0644) < OK)
Also here, this shouldn't be necessary. The SYSTEM user (which cron should
be running under) has access to all files.
Also here, in any case, it should be within an "#ifdef __CYGWIN__".
>< if (setuid(e->uid) < 0) /* we aren't root after
> > if (setuid(ROOT_UID) < 0) /* we aren't root
>after this... */
This is plain wrong. The whole point of the setuid is to run as the user
owning the crontab file. Instead, you setuid to SYSTEM, which should
already be the real uid running cron.
Just my ÃÂ 0.02,
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
More information about the Cygwin