xref: /openbsd/usr.sbin/cron/pathnames.h (revision a6445c1d)
1 /*	$OpenBSD: pathnames.h,v 1.12 2007/02/13 18:39:34 mglocker Exp $	*/
2 
3 /* Copyright 1993,1994 by Paul Vixie
4  * All rights reserved
5  */
6 
7 /*
8  * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
9  * Copyright (c) 1997,2000 by Internet Software Consortium, Inc.
10  *
11  * Permission to use, copy, modify, and distribute this software for any
12  * purpose with or without fee is hereby granted, provided that the above
13  * copyright notice and this permission notice appear in all copies.
14  *
15  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
16  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
17  * MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
18  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
19  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
20  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
21  * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
22  */
23 
24 #ifndef _PATHNAMES_H_
25 #define _PATHNAMES_H_
26 
27 #if (defined(BSD)) && (BSD >= 199103) || defined(__linux) || defined(AIX)
28 # include <paths.h>
29 #endif /*BSD*/
30 
31 #ifndef CRONDIR
32 			/* CRONDIR is where cron(8) and crontab(1) both chdir
33 			 * to; SPOOL_DIR, CRON_ALLOW, CRON_DENY, and LOG_FILE
34 			 * are all relative to this directory.
35 			 */
36 #define CRONDIR		"/var/cron"
37 #endif
38 
39 			/* SPOOLDIR is where the crontabs live.
40 			 * This directory will have its modtime updated
41 			 * whenever crontab(1) changes a crontab; this is
42 			 * the signal for cron(8) to look at each individual
43 			 * crontab file and reload those whose modtimes are
44 			 * newer than they were last time around (or which
45 			 * didn't exist last time around...)
46 			 */
47 #define SPOOL_DIR	"tabs"
48 
49 			/* ATDIR is where the at jobs live (relative to CRONDIR)
50 			 * This directory will have its modtime updated
51 			 * whenever at(1) changes a crontab; this is
52 			 * the signal for cron(8) to look for changes in the
53 			 * jobs directory (new, changed or jobs).
54 			 */
55 #define AT_DIR		"atjobs"
56 
57 			/* CRONSOCK is the name of the socket used by at and
58 			 * crontab to poke cron to re-read the at and cron
59 			 * spool files while cron is asleep.
60 			 * It lives in the spool directory.
61 			 */
62 #define	CRONSOCK	".sock"
63 
64 			/* cron allow/deny file.  At least cron.deny must
65 			 * exist for ordinary users to run crontab.
66 			 */
67 #define	CRON_ALLOW	"cron.allow"
68 #define	CRON_DENY	"cron.deny"
69 
70 			/* at allow/deny file.  At least at.deny must
71 			 * exist for ordinary users to run at.
72 			 */
73 #define	AT_ALLOW	"at.allow"
74 #define	AT_DENY		"at.deny"
75 
76 			/* undefining this turns off logging to a file.  If
77 			 * neither LOG_FILE or SYSLOG is defined, we don't log.
78 			 * If both are defined, we log both ways.  Note that if
79 			 * LOG_CRON is defined by <syslog.h>, LOG_FILE will not
80 			 * be used.
81 			 */
82 #define LOG_FILE	"log"
83 
84 			/* where should the daemon stick its PID?
85 			 * PIDDIR must end in '/'.
86 			 */
87 #ifdef _PATH_VARRUN
88 # define PIDDIR	_PATH_VARRUN
89 #else
90 # define PIDDIR "/etc/"
91 #endif
92 #define PIDFILE		"cron.pid"
93 #define _PATH_CRON_PID	PIDDIR PIDFILE
94 
95 			/* 4.3BSD-style crontab */
96 #define SYSCRONTAB	"/etc/crontab"
97 
98 			/* what editor to use if no EDITOR or VISUAL
99 			 * environment variable specified.
100 			 */
101 #if defined(_PATH_VI)
102 # define EDITOR _PATH_VI
103 #else
104 # define EDITOR "/usr/ucb/vi"
105 #endif
106 
107 #ifndef _PATH_SENDMAIL
108 # define _PATH_SENDMAIL "/usr/lib/sendmail"
109 #endif
110 
111 #ifndef _PATH_BSHELL
112 # define _PATH_BSHELL "/bin/sh"
113 #endif
114 
115 #ifndef _PATH_DEFPATH
116 # define _PATH_DEFPATH "/usr/bin:/bin"
117 #endif
118 
119 #ifndef _PATH_TMP
120 # define _PATH_TMP "/tmp/"
121 #endif
122 
123 #ifndef _PATH_DEVNULL
124 # define _PATH_DEVNULL "/dev/null"
125 #endif
126 
127 #endif /* _PATHNAMES_H_ */
128