Lines Matching refs:tmp
338 (void) snprintf(Filename, sizeof(Filename), "/tmp/crontab.XXXXXXXXXX");
405 if (chdir("/tmp") < 0)
406 err(ERROR_EXIT, "chdir(/tmp)");
502 FILE *tmp;
513 (void) snprintf(n, sizeof(n), "tmp.%d", Pid);
516 if (!(tmp = fopen(tn, "w+"))) {
525 fprintf(tmp, "# DO NOT EDIT THIS FILE - edit the master and reinstall.\n");
526 fprintf(tmp, "# (%s installed on %-24.24s)\n", Filename, ctime(&now));
527 fprintf(tmp, "# (Cron version -- %s)\n", rcsid);
529 /* copy the crontab to the tmp
534 putc(ch, tmp);
535 ftruncate(fileno(tmp), ftell(tmp));
536 fflush(tmp); rewind(tmp);
538 if (ferror(tmp)) {
540 fclose(tmp); unlink(tn);
554 switch (load_env(envstr, tmp)) {
559 e = load_entry(tmp, check_error, pw, envp);
570 fclose(tmp); unlink(tn);
575 if (fchown(fileno(tmp), ROOT_UID, -1) < OK)
581 fclose(tmp); unlink(tn);
586 if (fchmod(fileno(tmp), 0600) < OK)
592 fclose(tmp); unlink(tn);
596 if (fclose(tmp) == EOF) {