summaryrefslogtreecommitdiff
path: root/libexec/talkd
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2004-10-01 12:27:09 +0000
committerchristos <christos@NetBSD.org>2004-10-01 12:27:09 +0000
commit985ed5b76721f5d881c3d7c7abb933b89a645126 (patch)
tree1146984cf2c20e7f02153a187f55dc0103803191 /libexec/talkd
parent34bdfea7c4041a606738f9360b353fc87d547743 (diff)
PR/27097: John Klos: Talk daemon does not find additional ttys for
a particular user if the first tty is not writable. This broke in revision 1.9 when it was strl'ified incorrectly (hi itojun). Thanks to enami for spotting this.
Diffstat (limited to 'libexec/talkd')
-rw-r--r--libexec/talkd/process.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libexec/talkd/process.c b/libexec/talkd/process.c
index 32d4de75ad3..0039aaec6cb 100644
--- a/libexec/talkd/process.c
+++ b/libexec/talkd/process.c
@@ -1,4 +1,4 @@
-/* $NetBSD: process.c,v 1.10 2003/08/07 09:46:50 agc Exp $ */
+/* $NetBSD: process.c,v 1.11 2004/10/01 12:27:09 christos Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)process.c 8.2 (Berkeley) 11/16/93";
#else
-__RCSID("$NetBSD: process.c,v 1.10 2003/08/07 09:46:50 agc Exp $");
+__RCSID("$NetBSD: process.c,v 1.11 2004/10/01 12:27:09 christos Exp $");
#endif
#endif /* not lint */
@@ -207,7 +207,8 @@ find_user(name, tty, ttysize)
continue;
if (anytty) {
/* no particular tty was requested */
- (void)strlcat(ftty, ep->line, sizeof(ftty));
+ (void)strlcpy(ftty + sizeof(_PATH_DEV) - 1, ep->line,
+ sizeof(ftty) - sizeof(_PATH_DEV) + 1);
if (stat(ftty, &statb) != 0)
continue;