summaryrefslogtreecommitdiff
path: root/libexec/login_token
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2001-08-18 18:31:22 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2001-08-18 18:31:22 +0000
commitaa5ec6e986b2282d373774bb1dfbc0d8d4bd2b6f (patch)
treef0cfddb8baa8a94c8ddcc4e24b32cfd363e85775 /libexec/login_token
parentf635e5aa9e03108817900699c84263901777bd52 (diff)
strlcpy invades the tree
Diffstat (limited to 'libexec/login_token')
-rw-r--r--libexec/login_token/token.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libexec/login_token/token.c b/libexec/login_token/token.c
index 10a689c2a03..41c002d60d1 100644
--- a/libexec/login_token/token.c
+++ b/libexec/login_token/token.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: token.c,v 1.5 2001/06/28 21:18:45 millert Exp $ */
+/* $OpenBSD: token.c,v 1.6 2001/08/18 18:31:21 deraadt Exp $ */
/*-
* Copyright (c) 1995 Migration Associates Corp. All Rights Reserved
@@ -285,7 +285,7 @@ tokenuserinit(int flags, char *username, unsigned char *usecret, unsigned mode)
return (1);
memset(&tokenrec, 0, sizeof(tokenrec));
- strncpy(tokenrec.uname, username, sizeof(tokenrec.uname));
+ strlcpy(tokenrec.uname, username, sizeof(tokenrec.uname));
cb2h(secret, tokenrec.secret);
tokenrec.mode = 0;
tokenrec.flags = TOKEN_ENABLED | TOKEN_USEMODES;