diff options
| author | Paul Traina <pst@FreeBSD.org> | 1996-08-05 00:31:27 +0000 |
|---|---|---|
| committer | Paul Traina <pst@FreeBSD.org> | 1996-08-05 00:31:27 +0000 |
| commit | b04b7cf55d5a99f31ff09b47b387079a27b726ce (patch) | |
| tree | 38a015fcff32fdf03b62dcd7459f2e70e903d751 /usr.sbin | |
| parent | a5a4544e775f8375600487ff6b2d55ff3b7f33f6 (diff) | |
Notes
Diffstat (limited to 'usr.sbin')
| -rw-r--r-- | usr.sbin/cron/cron/cron.h | 4 | ||||
| -rw-r--r-- | usr.sbin/cron/crontab/crontab.c | 10 |
2 files changed, 9 insertions, 5 deletions
diff --git a/usr.sbin/cron/cron/cron.h b/usr.sbin/cron/cron/cron.h index 66de64bcbe56..457392f3f4e5 100644 --- a/usr.sbin/cron/cron/cron.h +++ b/usr.sbin/cron/cron/cron.h @@ -17,7 +17,7 @@ /* cron.h - header for vixie's cron * - * $Id: cron.h,v 1.1.1.1 1994/08/27 13:43:04 jkh Exp $ + * $Id: cron.h,v 1.2 1995/05/30 03:46:59 rgrimes Exp $ * * vix 14nov88 [rest of log is in RCS] * vix 14jan87 [0 or 7 can be sunday; thanks, mwm@berkeley] @@ -35,6 +35,8 @@ #include <bitstring.h> #include <pwd.h> #include <sys/wait.h> +#include <time.h> +#include <signal.h> #include "pathnames.h" #include "config.h" diff --git a/usr.sbin/cron/crontab/crontab.c b/usr.sbin/cron/crontab/crontab.c index 676c90380b3a..fbf6048637d7 100644 --- a/usr.sbin/cron/crontab/crontab.c +++ b/usr.sbin/cron/crontab/crontab.c @@ -17,7 +17,7 @@ */ #if !defined(lint) && !defined(LINT) -static char rcsid[] = "$Id: crontab.c,v 1.3 1995/05/30 03:47:04 rgrimes Exp $"; +static char rcsid[] = "$Id: crontab.c,v 1.4 1996/04/09 20:28:16 scrappy Exp $"; #endif /* crontab - install and manage per-user crontab files @@ -167,7 +167,7 @@ parse_args(argc, argv) ProgramName, optarg); exit(ERROR_EXIT); } - (void) strcpy(User, optarg); + (void) snprintf(User, sizeof(user), "%s", optarg); break; case 'l': if (Option != opt_unknown) @@ -198,7 +198,8 @@ parse_args(argc, argv) } else { if (argv[optind] != NULL) { Option = opt_replace; - (void) strcpy (Filename, argv[optind]); + (void) snprintf(Filename, sizeof(Filename), "%s", + argv[optind]); } else { usage("file name must be specified for replace"); } @@ -480,7 +481,8 @@ edit_cmd() { ProgramName, Filename); goto done; default: - fprintf(stderr, "%s: panic: bad switch() in replace_cmd()\n"); + fprintf(stderr, "%s: panic: bad switch() in replace_cmd()\n", + ProgramName); goto fatal; } remove: |
