Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Fix support for 16 character lognames
details: https://anonhg.NetBSD.org/src/rev/181a8ac0c901
branches: trunk
changeset: 543055:181a8ac0c901
user: dsl <dsl%NetBSD.org@localhost>
date: Sat Feb 15 18:47:41 2003 +0000
description:
Fix support for 16 character lognames
(approved by christos)
diffstat:
sys/kern/kern_sysctl.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r 4cda2946a19e -r 181a8ac0c901 sys/kern/kern_sysctl.c
--- a/sys/kern/kern_sysctl.c Sat Feb 15 18:33:29 2003 +0000
+++ b/sys/kern/kern_sysctl.c Sat Feb 15 18:47:41 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_sysctl.c,v 1.125 2003/02/10 00:35:16 atatat Exp $ */
+/* $NetBSD: kern_sysctl.c,v 1.126 2003/02/15 18:47:41 dsl Exp $ */
/*-
* Copyright (c) 1982, 1986, 1989, 1993
@@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_sysctl.c,v 1.125 2003/02/10 00:35:16 atatat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_sysctl.c,v 1.126 2003/02/15 18:47:41 dsl Exp $");
#include "opt_ddb.h"
#include "opt_insecure.h"
@@ -1861,7 +1861,8 @@
strncpy(ki->p_comm, p->p_comm,
min(sizeof(ki->p_comm), sizeof(p->p_comm)));
- strncpy(ki->p_login, p->p_session->s_login, sizeof(ki->p_login));
+ strncpy(ki->p_login, p->p_session->s_login,
+ min(sizeof ki->p_login - 1, sizeof p->p_session->s_login));
ki->p_nlwps = p->p_nlwps;
ki->p_nrlwps = p->p_nrlwps;
Home |
Main Index |
Thread Index |
Old Index