crontab.c (78321) | crontab.c (79452) |
---|---|
1/* Copyright 1988,1990,1993,1994 by Paul Vixie 2 * All rights reserved 3 * 4 * Distribute freely, except: don't remove my name from the source or 5 * documentation (don't take credit for my work), mark your changes (don't 6 * get me blamed for your possible bugs), don't alter or remove this 7 * notice. May be sold if buildable source is provided to buyer. No 8 * warrantee of any kind, express or implied, is included with this --- 4 unchanged lines hidden (view full) --- 13 * Send bug reports, bug fixes, enhancements, requests, flames, etc., and 14 * I'll try to keep a version up to date. I can be reached as follows: 15 * Paul Vixie <paul@vix.com> uunet!decwrl!vixie!paul 16 * From Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp 17 */ 18 19#if !defined(lint) && !defined(LINT) 20static const char rcsid[] = | 1/* Copyright 1988,1990,1993,1994 by Paul Vixie 2 * All rights reserved 3 * 4 * Distribute freely, except: don't remove my name from the source or 5 * documentation (don't take credit for my work), mark your changes (don't 6 * get me blamed for your possible bugs), don't alter or remove this 7 * notice. May be sold if buildable source is provided to buyer. No 8 * warrantee of any kind, express or implied, is included with this --- 4 unchanged lines hidden (view full) --- 13 * Send bug reports, bug fixes, enhancements, requests, flames, etc., and 14 * I'll try to keep a version up to date. I can be reached as follows: 15 * Paul Vixie <paul@vix.com> uunet!decwrl!vixie!paul 16 * From Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp 17 */ 18 19#if !defined(lint) && !defined(LINT) 20static const char rcsid[] = |
21 "$FreeBSD: head/usr.sbin/cron/crontab/crontab.c 78321 2001-06-16 03:16:52Z peter $"; | 21 "$FreeBSD: head/usr.sbin/cron/crontab/crontab.c 79452 2001-07-09 09:24:06Z brian $"; |
22#endif 23 24/* crontab - install and manage per-user crontab files 25 * vix 02may87 [RCS has the rest of the log] 26 * vix 26jan87 [original] 27 */ 28 29#define MAIN_PROGRAM --- 373 unchanged lines hidden (view full) --- 403 case 0: 404 /* child */ 405 if (setuid(getuid()) < 0) 406 err(ERROR_EXIT, "setuid(getuid())"); 407 if (chdir("/tmp") < 0) 408 err(ERROR_EXIT, "chdir(/tmp)"); 409 if (strlen(editor) + strlen(Filename) + 2 >= MAX_TEMPSTR) 410 errx(ERROR_EXIT, "editor or filename too long"); | 22#endif 23 24/* crontab - install and manage per-user crontab files 25 * vix 02may87 [RCS has the rest of the log] 26 * vix 26jan87 [original] 27 */ 28 29#define MAIN_PROGRAM --- 373 unchanged lines hidden (view full) --- 403 case 0: 404 /* child */ 405 if (setuid(getuid()) < 0) 406 err(ERROR_EXIT, "setuid(getuid())"); 407 if (chdir("/tmp") < 0) 408 err(ERROR_EXIT, "chdir(/tmp)"); 409 if (strlen(editor) + strlen(Filename) + 2 >= MAX_TEMPSTR) 410 errx(ERROR_EXIT, "editor or filename too long"); |
411 execlp(editor, editor, Filename, NULL); | 411 execlp(editor, editor, Filename, (char *)NULL); |
412 err(ERROR_EXIT, "%s", editor); 413 /*NOTREACHED*/ 414 default: 415 /* parent */ 416 break; 417 } 418 419 /* parent */ --- 207 unchanged lines hidden --- | 412 err(ERROR_EXIT, "%s", editor); 413 /*NOTREACHED*/ 414 default: 415 /* parent */ 416 break; 417 } 418 419 /* parent */ --- 207 unchanged lines hidden --- |