head	1.3;
access;
symbols
	netbsd-11-0-RC4:1.3
	netbsd-11-0-RC3:1.3
	netbsd-11-0-RC2:1.3
	netbsd-11-0-RC1:1.3
	perseant-exfatfs-base-20250801:1.3
	netbsd-11:1.3.0.20
	netbsd-11-base:1.3
	netbsd-10-1-RELEASE:1.3
	perseant-exfatfs-base-20240630:1.3
	perseant-exfatfs:1.3.0.18
	perseant-exfatfs-base:1.3
	netbsd-8-3-RELEASE:1.2
	netbsd-9-4-RELEASE:1.3
	netbsd-10-0-RELEASE:1.3
	netbsd-10-0-RC6:1.3
	netbsd-10-0-RC5:1.3
	netbsd-10-0-RC4:1.3
	netbsd-10-0-RC3:1.3
	netbsd-10-0-RC2:1.3
	netbsd-10-0-RC1:1.3
	netbsd-10:1.3.0.16
	netbsd-10-base:1.3
	netbsd-9-3-RELEASE:1.3
	cjep_sun2x-base1:1.3
	cjep_sun2x:1.3.0.14
	cjep_sun2x-base:1.3
	cjep_staticlib_x-base1:1.3
	netbsd-9-2-RELEASE:1.3
	cjep_staticlib_x:1.3.0.12
	cjep_staticlib_x-base:1.3
	netbsd-9-1-RELEASE:1.3
	phil-wifi-20200421:1.3
	phil-wifi-20200411:1.3
	is-mlppp:1.3.0.10
	is-mlppp-base:1.3
	phil-wifi-20200406:1.3
	netbsd-8-2-RELEASE:1.2
	netbsd-9-0-RELEASE:1.3
	netbsd-9-0-RC2:1.3
	netbsd-9-0-RC1:1.3
	phil-wifi-20191119:1.3
	netbsd-9:1.3.0.8
	netbsd-9-base:1.3
	phil-wifi-20190609:1.3
	netbsd-8-1-RELEASE:1.2
	netbsd-8-1-RC1:1.2
	pgoyette-compat-merge-20190127:1.3
	pgoyette-compat-20190127:1.3
	pgoyette-compat-20190118:1.3
	pgoyette-compat-1226:1.3
	pgoyette-compat-1126:1.3
	pgoyette-compat-1020:1.3
	pgoyette-compat-0930:1.3
	pgoyette-compat-0906:1.3
	netbsd-7-2-RELEASE:1.2
	pgoyette-compat-0728:1.3
	netbsd-8-0-RELEASE:1.2
	phil-wifi:1.3.0.6
	phil-wifi-base:1.3
	pgoyette-compat-0625:1.3
	netbsd-8-0-RC2:1.2
	pgoyette-compat-0521:1.3
	pgoyette-compat-0502:1.3
	pgoyette-compat-0422:1.3
	netbsd-8-0-RC1:1.2
	pgoyette-compat-0415:1.3
	pgoyette-compat-0407:1.3
	pgoyette-compat-0330:1.3
	pgoyette-compat-0322:1.3
	pgoyette-compat-0315:1.3
	netbsd-7-1-2-RELEASE:1.2
	pgoyette-compat:1.3.0.4
	pgoyette-compat-base:1.3
	netbsd-7-1-1-RELEASE:1.2
	matt-nb8-mediatek:1.2.0.42
	matt-nb8-mediatek-base:1.2
	perseant-stdc-iso10646:1.3.0.2
	perseant-stdc-iso10646-base:1.3
	netbsd-8:1.2.0.40
	netbsd-8-base:1.2
	prg-localcount2-base3:1.2
	prg-localcount2-base2:1.2
	prg-localcount2-base1:1.2
	prg-localcount2:1.2.0.38
	prg-localcount2-base:1.2
	pgoyette-localcount-20170426:1.2
	bouyer-socketcan-base1:1.2
	pgoyette-localcount-20170320:1.2
	netbsd-7-1:1.2.0.36
	netbsd-7-1-RELEASE:1.2
	netbsd-7-1-RC2:1.2
	netbsd-7-nhusb-base-20170116:1.2
	bouyer-socketcan:1.2.0.34
	bouyer-socketcan-base:1.2
	pgoyette-localcount-20170107:1.2
	netbsd-7-1-RC1:1.2
	pgoyette-localcount-20161104:1.2
	netbsd-7-0-2-RELEASE:1.2
	localcount-20160914:1.2
	netbsd-7-nhusb:1.2.0.32
	netbsd-7-nhusb-base:1.2
	pgoyette-localcount-20160806:1.2
	pgoyette-localcount-20160726:1.2
	pgoyette-localcount:1.2.0.30
	pgoyette-localcount-base:1.2
	netbsd-7-0-1-RELEASE:1.2
	netbsd-7-0:1.2.0.28
	netbsd-7-0-RELEASE:1.2
	netbsd-7-0-RC3:1.2
	netbsd-7-0-RC2:1.2
	netbsd-7-0-RC1:1.2
	netbsd-6-0-6-RELEASE:1.2
	netbsd-6-1-5-RELEASE:1.2
	netbsd-7:1.2.0.26
	netbsd-7-base:1.2
	yamt-pagecache-base9:1.2
	yamt-pagecache-tag8:1.2
	netbsd-6-1-4-RELEASE:1.2
	netbsd-6-0-5-RELEASE:1.2
	tls-earlyentropy:1.2.0.24
	tls-earlyentropy-base:1.2
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.2
	riastradh-drm2-base3:1.2
	netbsd-6-1-3-RELEASE:1.2
	netbsd-6-0-4-RELEASE:1.2
	netbsd-6-1-2-RELEASE:1.2
	netbsd-6-0-3-RELEASE:1.2
	netbsd-6-1-1-RELEASE:1.2
	riastradh-drm2-base2:1.2
	riastradh-drm2-base1:1.2
	riastradh-drm2:1.2.0.16
	riastradh-drm2-base:1.2
	netbsd-6-1:1.2.0.22
	netbsd-6-0-2-RELEASE:1.2
	netbsd-6-1-RELEASE:1.2
	khorben-n900:1.2.0.20
	netbsd-6-1-RC4:1.2
	netbsd-6-1-RC3:1.2
	agc-symver:1.2.0.18
	agc-symver-base:1.2
	netbsd-6-1-RC2:1.2
	netbsd-6-1-RC1:1.2
	yamt-pagecache-base8:1.2
	netbsd-6-0-1-RELEASE:1.2
	yamt-pagecache-base7:1.2
	matt-nb6-plus-nbase:1.2
	yamt-pagecache-base6:1.2
	netbsd-6-0:1.2.0.14
	netbsd-6-0-RELEASE:1.2
	netbsd-6-0-RC2:1.2
	tls-maxphys:1.2.0.12
	tls-maxphys-base:1.2
	matt-nb6-plus:1.2.0.10
	matt-nb6-plus-base:1.2
	netbsd-6-0-RC1:1.2
	yamt-pagecache-base5:1.2
	yamt-pagecache-base4:1.2
	netbsd-6:1.2.0.8
	netbsd-6-base:1.2
	yamt-pagecache-base3:1.2
	yamt-pagecache-base2:1.2
	yamt-pagecache:1.2.0.6
	yamt-pagecache-base:1.2
	cherry-xenmp:1.2.0.4
	cherry-xenmp-base:1.2
	bouyer-quota2-nbase:1.2
	bouyer-quota2:1.2.0.2
	bouyer-quota2-base:1.2
	matt-mips64-premerge-20101231:1.2
	cron-4_1:1.1.1.1
	ISC:1.1.1;
locks; strict;
comment	@# @;


1.3
date	2017.06.09.17.36.30;	author christos;	state Exp;
branches;
next	1.2;
commitid	ya3nyoHkHSEkTIUz;

1.2
date	2010.05.06.18.53.17;	author christos;	state Exp;
branches;
next	1.1;

1.1
date	2010.05.06.18.50.28;	author christos;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2010.05.06.18.50.28;	author christos;	state Exp;
branches;
next	;


desc
@@


1.3
log
@Apply selected patches from OpenWall:
    http://cvsweb.openwall.com/cgi/cvsweb.cgi/Owl/packages/vixie-cron/

1. Add PAM support.
2. Sanitize children process reaping
3. futimens when we have an fd
4. close_all for crontab(8)
5. use a table for spool dirs instead of duplicating code.
6. handle errors from process_exit()
7. Add ENABLE_FIX_DIRECTORIES ifdef and enable it by default for compat
8. Avoid using fd's < STDERR

Not applied:
1. no xfork (no setresuid)
2. did not do the lstat before open.
3. did not enable cron group
@
text
@#/* Copyright 1988,1990,1993,1994 by Paul Vixie
# * All rights reserved
# */

##
## Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
## Copyright (c) 1997,2000 by Internet Software Consortium, Inc.
##
## Permission to use, copy, modify, and distribute this software for any
## purpose with or without fee is hereby granted, provided that the above
## copyright notice and this permission notice appear in all copies.
##
## THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
## WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
## MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
## ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
## WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
## ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
## OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
##

# Makefile for ISC cron
#
# Id: Makefile,v 1.9 2004/01/23 18:56:42 vixie Exp
#
# vix 03mar88 [moved to RCS, rest of log is in there]
# vix 30mar87 [goodbye, time.c; hello, getopt]
# vix 12feb87 [cleanup for distribution]
# vix 30dec86 [written]

# NOTES:
#	'make' can be done by anyone
#	'make install' must be done by root
#
#	this package needs getopt(3), bitstring(3), and BSD install(8).
#
#	the configurable stuff in this makefile consists of compilation
#	options (use -O, cron runs forever) and destination directories.
#	SHELL is for the 'augumented make' systems where 'make' imports
#	SHELL from the environment and then uses it to run its commands.
#	if your environment SHELL variable is /bin/csh, make goes real
#	slow and sometimes does the wrong thing.  
#
#	this package needs the 'bitstring macros' library, which is
#	available from me or from the comp.sources.unix archive.  if you
#	put 'bitstring.h' in a non-standard place (i.e., not intuited by
#	cc(1)), you will have to define INCLUDE to set the include
#	directory for cc.  INCLUDE should be `-Isomethingorother'.
#
#	there's more configuration info in config.h; edit that first!

#################################### begin configurable stuff
#<<DESTROOT is assumed to have ./etc, ./bin, and ./man subdirectories>>
DESTROOT	=	$(DESTDIR)/usr
DESTSBIN	=	$(DESTROOT)/sbin
DESTBIN		=	$(DESTROOT)/bin
DESTMAN		=	$(DESTROOT)/share/man
#<<need bitstring.h>>
INCLUDE		=	-I.
#INCLUDE	=
#<<need getopt()>>
LIBS		= -lutil
#<<optimize or debug?>>
#CDEBUG		=	-O
CDEBUG		=	-g
#<<lint flags of choice?>>
LINTFLAGS	=	-hbxa $(INCLUDE) $(DEBUGGING)
#<<want to use a nonstandard CC?>>
CC		=	gcc -Wall -Wno-unused -Wno-comment
#<<manifest defines>>
DEFS		=
#(SGI IRIX systems need this)
#DEFS		=	-D_BSD_SIGNALS -Dconst=
#<<the name of the BSD-like install program>>
#INSTALL = installbsd
INSTALL = install
#<<any special load flags>>
LDFLAGS		=
#################################### end configurable stuff

SHELL		=	/bin/sh
CFLAGS		=	$(CDEBUG) $(INCLUDE) $(DEFS)

INFOS		=	README CHANGES FEATURES INSTALL CONVERSION THANKS MAIL
MANPAGES	=	bitstring.3 crontab.5 crontab.1 cron.8 putman.sh
HEADERS		=	bitstring.h cron.h config.h pathnames.h externs.h \
			macros.h structs.h funcs.h globals.h
SOURCES		=	cron.c crontab.c database.c do_command.c entry.c \
			env.c job.c user.c popen.c misc.c pam_auth.c pw_dup.c
SHAR_SOURCE	=	$(INFOS) $(MANPAGES) Makefile $(HEADERS) $(SOURCES)
LINT_CRON	=	cron.c database.c user.c entry.c \
			misc.c job.c do_command.c env.c popen.c pw_dup.c
LINT_CRONTAB	=	crontab.c misc.c entry.c env.c
CRON_OBJ	=	cron.o database.o user.o entry.o job.o do_command.o \
			misc.o env.o popen.o pw_dup.o
CRONTAB_OBJ	=	crontab.o misc.o entry.o env.o pw_dup.o closeall.o

all		:	cron crontab

lint		:
			lint $(LINTFLAGS) $(LINT_CRON) $(LIBS) \
			|grep -v "constant argument to NOT" 2>&1
			lint $(LINTFLAGS) $(LINT_CRONTAB) $(LIBS) \
			|grep -v "constant argument to NOT" 2>&1

cron		:	$(CRON_OBJ)
			$(CC) $(LDFLAGS) -o cron $(CRON_OBJ) $(LIBS)

crontab		:	$(CRONTAB_OBJ)
			$(CC) $(LDFLAGS) -o crontab $(CRONTAB_OBJ) $(LIBS)

install		:	all
			$(INSTALL) -c -m  111 -o root -s cron    $(DESTSBIN)/
			$(INSTALL) -c -m 4111 -o root -s crontab $(DESTBIN)/
#			$(INSTALL) -c -m  111 -o root -g crontab -s cron $(DESTSBIN)/
#			$(INSTALL) -c -m 2111 -o root -g crontab -s crontab $(DESTBIN)/
			sh putman.sh crontab.1 $(DESTMAN)
			sh putman.sh cron.8    $(DESTMAN)
			sh putman.sh crontab.5 $(DESTMAN)

distclean	:	clean
			rm -f *.orig *.rej *.BAK *.CKP *~ #*
			rm -f a.out core tags

clean		:
			rm -f *.o
			rm -f cron crontab

tags		:;	ctags ${SOURCES}

kit		:	$(SHAR_SOURCE)
			shar $(SHAR_SOURCE) >kit

$(CRON_OBJ)	:	cron.h config.h externs.h pathnames.h Makefile
$(CRONTAB_OBJ)	:	cron.h config.h externs.h pathnames.h Makefile
@


1.2
log
@apply our changes.
@
text
@d89 1
a89 1
			env.c job.c user.c popen.c misc.c pw_dup.c
d96 1
a96 1
CRONTAB_OBJ	=	crontab.o misc.o entry.o env.o pw_dup.o
@


1.1
log
@Initial revision
@
text
@d62 1
a62 1
LIBS		=
@


1.1.1.1
log
@import cron 4.1
@
text
@@
