Remove touch() from fileops.c and just call utimes/futimes directly.

Rename lock_file -> sudo_lock_file to avoid namespace pollution
This commit is contained in:
Todd C. Miller
2014-06-26 15:51:15 -06:00
parent 36e828b59f
commit f029e3e744
9 changed files with 35 additions and 63 deletions

View File

@@ -186,7 +186,7 @@ do_logfile(char *msg)
if (fp == NULL) {
send_mail(_("unable to open log file: %s: %s"),
def_logfile, strerror(errno));
} else if (!lock_file(fileno(fp), SUDO_LOCK)) {
} else if (!sudo_lock_file(fileno(fp), SUDO_LOCK)) {
send_mail(_("unable to lock log file: %s: %s"),
def_logfile, strerror(errno));
} else {
@@ -217,7 +217,7 @@ do_logfile(char *msg)
efree(full_line);
}
(void) fflush(fp);
(void) lock_file(fileno(fp), SUDO_UNLOCK);
(void) sudo_lock_file(fileno(fp), SUDO_UNLOCK);
(void) fclose(fp);
}
sudoers_setlocale(oldlocale, NULL);