SCCS-vsn: usr.bin/at/atrun/atrun.c 5.6
#endif not lint
#ifndef lint
#endif not lint
#ifndef lint
-static char sccsid[] = "@(#)atrun.c 5.5 (Berkeley) %G%";
+static char sccsid[] = "@(#)atrun.c 5.6 (Berkeley) %G%";
*/
if ((infile = fopen(spoolfile,"r")) == NULL) {
perror(spoolfile);
*/
if ((infile = fopen(spoolfile,"r")) == NULL) {
perror(spoolfile);
+ (void) unlink(spoolfile);
(fscanf(infile,"# notify by mail: %3s%*[^\n]\n",mailvar) != 1)
) {
fprintf(stderr, "%s: bad spool header\n", spoolfile);
(fscanf(infile,"# notify by mail: %3s%*[^\n]\n",mailvar) != 1)
) {
fprintf(stderr, "%s: bad spool header\n", spoolfile);
+ (void) unlink(spoolfile);
if (pwdbuf == NULL) {
fprintf(stderr, "%s: could not find owner in passwd file\n",
spoolfile);
if (pwdbuf == NULL) {
fprintf(stderr, "%s: could not find owner in passwd file\n",
spoolfile);
+ (void) unlink(spoolfile);
exit(1);
}
if (chown(spoolfile,pwdbuf->pw_uid,pwdbuf->pw_gid) == -1) {
perror(spoolfile);
exit(1);
}
if (chown(spoolfile,pwdbuf->pw_uid,pwdbuf->pw_gid) == -1) {
perror(spoolfile);
+ (void) unlink(spoolfile);