summaryrefslogtreecommitdiffstats
path: root/bin/systrace/systrace.c
diff options
context:
space:
mode:
authorsturm <sturm@openbsd.org>2005-05-03 18:03:26 +0000
committersturm <sturm@openbsd.org>2005-05-03 18:03:26 +0000
commita1d85c9f81ba60007adacf8086d1b0f4fb329fb0 (patch)
tree715458b936542bbeffca092bf2dcfd515f90c9f5 /bin/systrace/systrace.c
parenttypo, automaticaly -> automatically (diff)
downloadwireguard-openbsd-a1d85c9f81ba60007adacf8086d1b0f4fb329fb0.tar.xz
wireguard-openbsd-a1d85c9f81ba60007adacf8086d1b0f4fb329fb0.zip
some snprintf() -> strlcpy to improve readibility (and speed?)
from rohee@, ok millert@ before 3.7
Diffstat (limited to 'bin/systrace/systrace.c')
-rw-r--r--bin/systrace/systrace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/systrace/systrace.c b/bin/systrace/systrace.c
index 358b2764b4b..14c2bca91c4 100644
--- a/bin/systrace/systrace.c
+++ b/bin/systrace/systrace.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: systrace.c,v 1.49 2004/01/23 20:51:18 sturm Exp $ */
+/* $OpenBSD: systrace.c,v 1.50 2005/05/03 18:03:26 sturm Exp $ */
/*
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
* All rights reserved.
@@ -90,7 +90,7 @@ systrace_parameters(void)
if ((pw = getpwuid(uid)) == NULL)
snprintf(username, sizeof(username), "uid %u", uid);
else
- snprintf(username, sizeof(username), "%s", pw->pw_name);
+ strlcpy(username, pw->pw_name, sizeof(username));
strlcpy(home, pw->pw_dir, sizeof(home));