New sentence, new line.
[netbsd-mini2440.git] / usr.sbin / cron / CHANGES
blob574e68ce555d7e4aef4c192309ae2275bbcb0c87
1 Vixie Cron              Changes from V2 to V3
2 Paul Vixie
3 29-Dec-1993
5 The crontab command now conforms to POSIX 1003.2.  This means that when you
6 install it, if you have any "crontab" command lines floating around in shell
7 scripts (such as /etc/rc or /etc/rc.local), you will need to change them.
9 I have integrated several changes made by BSDi for their BSD/386 operating
10 system; these were offerred to me before I started consulting for them, so
11 it is safe to say that they were intended for publication.  Most notably,
12 the name of the cron daemon has changed from "crond" to "cron".  This was
13 done for compatibility with 4.3BSD.  Another change made for the same reason
14 is the ability to read in an /etc/crontab file which has an extra field in
15 each entry, between the time fields and the command.  This field is a user
16 name, and it permits the /etc/crontab command to contain commands which are
17 to be run by any user on the system.  /etc/crontab is not "installed" via
18 the crontab(1) command; it is automatically read at startup time and it will
19 be reread whenever it changes.
21 I also added a "-e" option to crontab(1).  Nine people also sent me diffs
22 to add this option, but I had already implemented it on my own.  I actually
23 released an interrim version (V2.2, I think) for limited testing, and got a
24 chance to fix a bad security bug in the "-e" option thanks to XXX.
26 The daemon used to be extraordinarily sloppy in its use of file descriptors.
27 A heck of a lot of them were left open in spawned jobs, which caused problems
28 for the daemon and also caused problems with the spawned jobs if they were 
29 shell scripts since "sh" and "csh" have traditionally used hidden file
30 descriptors to pass information to subshells, and cron was causing them to
31 think they were subshells.  If you had trouble with "sh" or "csh" scripts in
32 V2, chances are good that V3 will fix your problems.
34 About a dozen people have reminded me that I forgot to initialize "crontab_fd"
35 in database.c.  Keith Cantrell was the first, so he gets the point.
37 Steve Simmons reminded me that once an account has been deleted from the system,
38 "crontab -u USER -d" will not work.  My solution is to suggest to all of you that
39 before you delete a user's account, you first delete that user's crontab file if
40 any.  From cron's point of view, usernames can never be treated as arbitrary
41 strings.  Either they are valid user names, or they are not.  I will not make
42 an exception for the "-d" case, for security reasons that I consider reasonable.
43 It is trivial for a root user to delete the entry by hand if necessary.
45 Dan O'Neil reminded me that I forgot to reset "log_fd" in misc.c.  A lot of others
46 also reminded me of this, but Dan gets the point.  I didn't fix it there, since the
47 real bug was that it should have been open in the parent.
49 Peter Kabal reminded me that I forgot to "#ifdef DEBUGGING" some code in misc.c.
50 Hans Trompert actually told me first, but Peter sent the patch so he gets the point.
52 Russell Nelson told me that I'd forgotten to "#include <syslog.h>" in misc.c,
53 which explains why a lot of other people complained that it wasn't using syslog
54 even when they configured it that way :-).  Steve Simmons told me first, though,
55 so he gets the point.
57 An interrim version of the daemon tried to "stat" every file before executing it;
58 this turned out to be a horribly bad idea since finding the name of a file from
59 a shell command is a hard job (that's why we have shells, right?)  I removed this
60 bogus code.  Dave Burgess gets the point.
62 Dennis R. Conley sent a suggestion for MMDF systems, which I've added to the
63 comments in cron.h.
65 Mike Heisler noted that I use comments in the CONVERSION file which are documented
66 as illegal in the man pages.  Thanks, Mike.
68 Irving Wolfe sent me some very cheerful changes for a NeXT system, but I consider
69 the system itself broken and I can't bring myself to #ifdef for something as screwed
70 up as this system seems to be.  Sorry, NeXT users -- pray for POSIX.  Irving also
71 asked for a per-job MAILTO, but the syntactic overkill that would require is more
72 than I'm willing to add.  Remember, on BSD4.2, cron was a 12K daemon.  My cron is
73 about ten times that size already.
75 Lots of folks complained that the autogenerated "Date:" header wasn't in ARPA format.
76 I didn't understand this -- either folks will use Sendmail and not generate a Date:
77 at all (since Sendmail will do it), or folks will use something other than Sendmail
78 which won't care about Date: formats.  But I've "fixed" it anyway...
80 Several people suggested that "*" should be able to take a "/step".  One person
81 suggested that "N/step" ought to mean "N-last/step", but that's stretching things
82 a bit far.  "*/step" seems quite intuitive to me, so I've added it.  Colin Plumb
83 sent in the first and most polite request for this feature.
85 As with every release of Cron, BIND, and seemingly everything else I do, one
86 user stands out with the most critical but also the most useful analysis.
87 Cron V3's high score belongs to Peter Holzer, who sent in the nicest looking
88 patch for the "%" interpretation problem and also helped me understand a
89 tricky bit of badness in the "log_fd" problem.
91 agulbra@flode.nvg.unit.no wins the honors for being the first to point out the
92 nasty security hole in "crontab -r".  'Nuff said.
94 Several folks pointed out that log_it() needed to exist even if logging was
95 disabled.  Some day I will create a tool that will compile a subsystem with
96 every possible combination and permutation of #ifdef options, but meanwhile
97 thanks to everybody.
99 job_runqueue() was using storage after freeing it, since Jordan told me back
100 in 1983 that C let you do that, and I believed him in 1986 when I wrote all
101 this junk.  Linux was the first to die from this error, and the Linux people
102 sent me the most amazing, um, collection of patches for this problem.  Thanks
103 for all the fish.
105 Jeremy Bettis reminded me that popen() isn't safe.  I grabbed Ken Arnold's 
106 version of popen/pclose from the ftpd and hacked it to taste.  We're safe now,
107 from this at least.
109 Branko Lankester sent me a very timely and helpful fix for a looming security
110 problem in my "crontab -e" implementation.
112 --------
114 Vixie Cron              Changes from V1 to V2
115 Paul Vixie
116 8-Feb-1988
118 Many changes were made in a rash of activity about six months ago, the exact
119 list of which is no longer clear in my memory.  I know that V1 used a file
120 called POKECRON in /usr/spool/cron to tell it that it was time to re-read
121 all the crontab files; V2 uses the modtime the crontab directory as a flag to
122 check out the crontab files; those whose modtime has changed will be re-read,
123 and the others left alone.  Note that the crontab(1) command will do a utimes
124 call to make sure the mtime of the dir changes, since the filename/inode will
125 often remain the same after a replacement and the mtime wouldn't change in
126 that case.
128 8-Feb-88: made it possible to use much larger environment variable strings.
129         V1 allowed 100 characters; V2 allows 1000.  This was needed for PATH
130         variables on some systems.  Thanks to Toerless Eckert for this idea.
131         E-mail: UUCP: ...pyramid!fauern!faui10!eckert
133 16-Feb-88: added allow/deny, moved /usr/spool/cron/crontabs to
134         /usr/lib/cron/tabs.  allow and deny are /usr/lib/cron/{allow,deny},
135         since the sysv naming for this depends on 'at' using the same
136         dir, which would be stupid (hint: use /usr/{lib,spool}/at).
138 22-Feb-88: made it read the spool directory for crontabs and look each one
139         up using getpwnam() rather than reading all passwds with getpwent()
140         and trying to open each crontab.
142 9-Dec-88: made it sync to :00 after the minute, makes cron predictable.
143         added logging to /var/cron/log.
145 14-Apr-90: (actually, changes since December 1989)
146         fixed a number of bugs reported from the net and from John Gilmore.
147         added syslog per Keith Bostic.  security features including not
148         being willing to run a command owned or writable by other than
149         the owner of the crontab 9not working well yet)