From 8dee7079712ba89b4db50aca1a7684d991d24492 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Sun, 15 Nov 2015 23:24:25 +0000 Subject: Clean up the remaining uses of stderr and perror() and use warn/err and/or syslog depending on whether stderr is hooked up at the time. Also remove closelog() which is not needed since we are headed for exec. OK guenther@ --- usr.sbin/cron/user.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'usr.sbin/cron/user.c') diff --git a/usr.sbin/cron/user.c b/usr.sbin/cron/user.c index 2b896a32e3e..7e5d64a2040 100644 --- a/usr.sbin/cron/user.c +++ b/usr.sbin/cron/user.c @@ -1,4 +1,4 @@ -/* $OpenBSD: user.c,v 1.17 2015/11/09 01:12:27 millert Exp $ */ +/* $OpenBSD: user.c,v 1.18 2015/11/15 23:24:24 millert Exp $ */ /* Copyright 1988,1990,1993,1994 by Paul Vixie * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") @@ -22,9 +22,11 @@ #include /* for structs.h */ #include #include +#include #include #include #include +#include #include /* for structs.h */ #include "macros.h" @@ -55,7 +57,7 @@ load_user(int crontab_fd, struct passwd *pw, const char *name) char **envp, **tenvp; if (!(file = fdopen(crontab_fd, "r"))) { - perror("fdopen on crontab_fd in load_user"); + syslog(LOG_ERR, "(%s) FDOPEN (%m)", pw->pw_name); return (NULL); } -- cgit v1.2.3