Module Name: src
Committed By: christos
Date: Thu Jan 17 18:54:29 UTC 2013
Modified Files:
src/usr.sbin/syslogd: syslogd.c
Log Message:
ut_line does not have /dev in front of it. Add it, from dholland@
To generate a diff of this commit:
cvs rdiff -u -r1.113 -r1.114 src/usr.sbin/syslogd/syslogd.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/syslogd/syslogd.c
diff -u src/usr.sbin/syslogd/syslogd.c:1.113 src/usr.sbin/syslogd/syslogd.c:1.114
--- src/usr.sbin/syslogd/syslogd.c:1.113 Tue Jan 15 17:37:04 2013
+++ src/usr.sbin/syslogd/syslogd.c Thu Jan 17 13:54:28 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: syslogd.c,v 1.113 2013/01/15 22:37:04 christos Exp $ */
+/* $NetBSD: syslogd.c,v 1.114 2013/01/17 18:54:28 christos Exp $ */
/*
* Copyright (c) 1983, 1988, 1993, 1994
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 19
#if 0
static char sccsid[] = "@(#)syslogd.c 8.3 (Berkeley) 4/4/94";
#else
-__RCSID("$NetBSD: syslogd.c,v 1.113 2013/01/15 22:37:04 christos Exp $");
+__RCSID("$NetBSD: syslogd.c,v 1.114 2013/01/17 18:54:28 christos Exp $");
#endif
#endif /* not lint */
@@ -2563,8 +2563,10 @@ wallmsg(struct filed *f, struct iovec *i
break;
if (strcmp(f->f_un.f_uname[i], ep->name) == 0) {
struct stat st;
-
- if (stat(ep->line, &st) != -1 &&
+ char tty[MAXPATHLEN];
+ snprintf(tty, sizeof(tty), "%s/%s", _PATH_DEV,
+ ep->line);
+ if (stat(tty, &st) != -1 &&
(st.st_mode & S_IWGRP) == 0)
break;