Commit Graph

21 Commits

Author SHA1 Message Date
wiz 5d1e8b2745 Fix some typos. 2006-02-25 02:28:55 +00:00
heas be21025dae Set SIGCHLD to SIG_DFL in cron's child; instead of SIG_IGN, which alters the
behavior of wait() causing cron_pclose() to return bogus status and the logging
of bogus status in debug mode.
2005-08-17 22:35:20 +00:00
xtraeme 7e70b71d91 Kill __P(), use ANSI function declarations, constify; WARNS=3 2005-03-16 02:53:55 +00:00
jdolecek ac4f86b471 log also the time when the job finishes (with CMD FINISH tag), and change
the tag for job start log to ``CMD START''

adresses PR bin/22201 by John Hawkinson
2004-03-20 10:42:00 +00:00
jdolecek d70973544d use setproctitle() instead of uppercasing ProgramName
this makes the ps display nicer, and also avoids uppercasing the cron program
name in logs
idea from FreeBSD
2003-04-10 14:14:15 +00:00
christos c2b5bf99ef PR/15142: Kevin P. Neal: cron does not pay attention to login_cap(3)
I simplified the patch addressed certain security concerns. I only
allowed setusercontext() to set resource limits/priority and umask,
because these are the values that are relevant from login.conf. The
rest of the settings (uid/gid/initgroups) should be done using e->uid
and e->gid like they were before, not from:

	struct passwd *pwd = getpwnam(getenv("LOGNAME"));

Finally login_cap's (path/env) are irrelevant in this context since
we want to use our e->envp anyway to execute the command.
2003-03-14 21:56:07 +00:00
dsl c17244d768 Create session before setting logname - we don't want to change the
parents logname (or any other children pre-empted in that window).
2003-02-19 09:21:15 +00:00
itojun 4fd217fda9 o Instead of passing "*system*" as the fname to process_crontab()
for the system crontab file, pass a NULL pointer instead.  This
  prevents someone from creating a "*system*" file in the tabs directory
  that acts as an alternate root crontab.

from openbsd
2002-08-03 02:03:00 +00:00
jdolecek d437ea659d child_process(): if the input_data didn't contain any '%', the pointer
ended up _after_ the final '\0', so the code past though there are some
data to be passed to the spawned command, causing child process
crash under some circumstances; adjust input_data in this case to avoid this

XXX this is already fixed in cron 4.0-b1 (though slighly differently)
2002-03-23 09:38:02 +00:00
yamt cb1ee3b752 make consistent escape sequence handling
between commandline and command input.

pointed by Christoph Badura <bad@netbsd.org>
2001-08-13 06:54:58 +00:00
yamt 69ecbbeb80 Fix a bug that prevented %'s and \'s from being passed to the program
invoked.
from FreeBSD.
2001-08-03 04:10:51 +00:00
wiz 6b37581cf5 Restore default handler for SIG_CHLD before starting grand-children.
Idea by Christos Zoulas. Fixes bin/11778.
2001-03-13 17:51:50 +00:00
mrg 32f519716b - use an array MAXHOSTNAMELEN+1 size to hold hostnames
- ensure hostname from gethostname() is nul-terminated in all cases
- minor KNF
- use MAXHOSTNAMELEN over various other values/defines
- be safe will buffers that hold hostnames
1998-07-06 06:56:06 +00:00
christos 9ac7be0692 Warnsify:
- add __RCSID
	- remove nested comments
	- remove register and auto keywords
	- change into posix signals
	- fix prototypes
1998-01-31 14:40:13 +00:00
mikel 2b8bc7438f RCSid police 1997-03-13 06:19:07 +00:00
thorpej c0fe650b17 Eliminate unsafe calls to strcpy() and sprintf(). 1996-12-16 22:30:43 +00:00
mycroft 0cc4d5f125 Patch from Mike Pritchard to use `-t' option to sendmail, and prevent
overrunning some arrays.
1995-04-14 19:49:32 +00:00
jtc 44fa25f9b7 Vixie Cron 3.0-release 1994-01-20 02:46:53 +00:00
jtc 2a22045ae0 Vixie Cron 3.0-prerelease, patch 11 1994-01-12 18:35:59 +00:00
jtc e59e4eb1ce Vixie Cron 3.0-prerelease, patch 10 1994-01-11 19:10:45 +00:00
jtc 644d4f8787 Vixie Cron 3.0-prerelease, patch 9 1994-01-05 20:40:12 +00:00