diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-07-12 08:23:50 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-07-12 08:23:50 +0000 |
commit | 1867156076ef90623ca6dcd210e64404b7c343d1 (patch) | |
tree | c9dc0188d7b4c6572adf57179ac1c6155a322c5e | |
parent | abb4411452ad36fa43e6aaa446b6732c0d710ba4 (diff) |
disable debugging in crontab
-rw-r--r-- | usr.bin/crontab/Makefile | 4 | ||||
-rw-r--r-- | usr.sbin/cron/crontab.c | 13 |
2 files changed, 13 insertions, 4 deletions
diff --git a/usr.bin/crontab/Makefile b/usr.bin/crontab/Makefile index 5dbf742c255..bfd1f7e4cd7 100644 --- a/usr.bin/crontab/Makefile +++ b/usr.bin/crontab/Makefile @@ -1,8 +1,8 @@ -# $OpenBSD: Makefile,v 1.2 1996/06/26 05:32:25 deraadt Exp $ +# $OpenBSD: Makefile,v 1.3 1998/07/12 08:23:49 deraadt Exp $ PROG= crontab SRCS= crontab.c misc.c entry.c env.c -CFLAGS+=-I${.CURDIR} -I${.CURDIR}/../../usr.sbin/cron -DDEBUGGING=1 +CFLAGS+=-I${.CURDIR} -I${.CURDIR}/../../usr.sbin/cron -DDEBUGGING=0 BINOWN =root BINMODE=4555 MAN= crontab.1 crontab.5 diff --git a/usr.sbin/cron/crontab.c b/usr.sbin/cron/crontab.c index 901b43902f9..b354d362319 100644 --- a/usr.sbin/cron/crontab.c +++ b/usr.sbin/cron/crontab.c @@ -16,7 +16,7 @@ */ #if !defined(lint) && !defined(LINT) -static char rcsid[] = "$Id: crontab.c,v 1.11 1997/04/12 17:50:17 millert Exp $"; +static char rcsid[] = "$Id: crontab.c,v 1.12 1998/07/12 08:23:47 deraadt Exp $"; #endif /* crontab - install and manage per-user crontab files @@ -129,6 +129,11 @@ main(argc, argv) /*NOTREACHED*/ } +#if DEBUGGING +char *getoptarg = "u:lerx:" +#else +char *getoptarg = "u:ler"; +#endif static void parse_args(argc, argv) @@ -148,12 +153,16 @@ parse_args(argc, argv) strcpy(RealUser, User); Filename[0] = '\0'; Option = opt_unknown; - while (EOF != (argch = getopt(argc, argv, "u:lerx:"))) { + + while (EOF != (argch = getopt(argc, argv, getoptarg))) { switch (argch) { +#if DEBUGGING case 'x': if (!set_debug_flags(optarg)) usage("bad debug option"); + usage("unrecognized option"); break; +#endif case 'u': if (getuid() != ROOT_UID) { |