allocated memory was instead pointed to a static string. A later
free() on the value of the pointer was a possible source of reported
"warning: pointer to wrong page" messages from cron.
Use consistent types in sizeof when malloc'ing memory for the
environment.
PR: kern/12248, bin/11169, bin/9722
Fix setting of "hour" bitmap when @hourly keyword is specified.
MFC candidate after 4.0-RELEASE.
Problem-found-by: Sheldon Hearn <sheldonh@uunet.co.za>
Use getpwnam before getpwuid since two users with same uids can exists
(affects new login classes code only)
The same fixes as in inetd: by default run `system crontab things' with
daemon login class now, not restrict them to user class breaking
compatibility with old way (so-called nobody limits problem)
Implement user[:group][/login-class] syntax in system crontab
for more flexible control (the same as in inetd)
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.
Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.
used by OpenBSD. (Quite frankly, I think it's perfectly reasonable to
use snprintf to copy strings, given that the semantics for strncpy()
are utterly idiotic and there is no POSIX sstrncpy().)
While I'm at it, incorporate some of OpenBSD's bugfixes to cron.
NOT for 2.2