In the last episode (Jan 17), Greg Black said:
> Michael Bacarella wrote:
> > Why is crontab suid root?
> >
> > I say to myself "To update /var/cron/tabs/ and to signal cron".
> >
> > Could crontab run suid 'cron'?
> >
> > If those are the only two things it needs to do, run cron as gid
> > 'cron' and make /var/cron/tabs/ group writable by 'cron'.
> 
> It has to run jobs as the correct user and must be able to setuid
> accordingly.

Not quite.  As far as I can tell, crontab is setuid root for the sole
purpose of being able to write to /var/cron/tabs.  Cron checks the
timestamp on the directory every minute, so crontab doesn't have to
signal it for changes to get noticed.  If you're paranoid, you can
probably "chgrp cron /var/cron/tabs" and make crontab setgid cron
without any ill effects.  Cron itself must stay setuid root, of course,
so it can run user crontabs as that user.

Or it might need to be setuid for some other reason, since OpenBSD runs
their crontab setuid root, and they usually are pretty
security-paranoid.

-- 
        Dan Nelson
        [EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to