Lines Matching defs:tmp
339 (void) snprintf(Filename, sizeof(Filename), "/tmp/crontab.XXXXXXXXXX");
406 if (chdir("/tmp") < 0)
407 err(ERROR_EXIT, "chdir(/tmp)");
503 FILE *tmp;
514 (void) snprintf(n, sizeof(n), "tmp.%d", Pid);
517 if (!(tmp = fopen(tn, "w+"))) {
526 fprintf(tmp, "# DO NOT EDIT THIS FILE - edit the master and reinstall.\n");
527 fprintf(tmp, "# (%s installed on %-24.24s)\n", Filename, ctime(&now));
528 fprintf(tmp, "# (Cron version -- %s)\n", rcsid);
530 /* copy the crontab to the tmp
535 putc(ch, tmp);
536 ftruncate(fileno(tmp), ftello(tmp));
537 fflush(tmp); rewind(tmp);
539 if (ferror(tmp)) {
541 fclose(tmp); unlink(tn);
555 switch (load_env(envstr, tmp)) {
560 e = load_entry(tmp, check_error, pw, envp);
571 fclose(tmp); unlink(tn);
576 if (fchown(fileno(tmp), ROOT_UID, -1) < OK)
582 fclose(tmp); unlink(tn);
587 if (fchmod(fileno(tmp), 0600) < OK)
593 fclose(tmp); unlink(tn);
597 if (fclose(tmp) == EOF) {