summaryrefslogtreecommitdiffstats
path: root/libexec/login_token
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2013-12-03 01:29:00 +0000
committerderaadt <deraadt@openbsd.org>2013-12-03 01:29:00 +0000
commitd05a8106e88e075f7931e57a9f9c290c8c2d47a0 (patch)
tree8cf3cd3ad1cb969e7e8a797d6eb676684a786c33 /libexec/login_token
parenttimeb.h has not been used forever (diff)
downloadwireguard-openbsd-d05a8106e88e075f7931e57a9f9c290c8c2d47a0.tar.xz
wireguard-openbsd-d05a8106e88e075f7931e57a9f9c290c8c2d47a0.zip
use LOGIN_NAME_MAX instead of L_cuserid, and adjust .h includes; ok millert
Diffstat (limited to 'libexec/login_token')
-rw-r--r--libexec/login_token/init.c3
-rw-r--r--libexec/login_token/login_token.c5
-rw-r--r--libexec/login_token/token.c3
-rw-r--r--libexec/login_token/tokendb.h4
4 files changed, 9 insertions, 6 deletions
diff --git a/libexec/login_token/init.c b/libexec/login_token/init.c
index 40412e95966..0b3ab9b8d37 100644
--- a/libexec/login_token/init.c
+++ b/libexec/login_token/init.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: init.c,v 1.4 2013/01/13 21:21:17 fgsch Exp $ */
+/* $OpenBSD: init.c,v 1.5 2013/12/03 01:29:00 deraadt Exp $ */
/*-
* Copyright (c) 1996 Berkeley Software Design, Inc. All rights reserved.
@@ -35,6 +35,7 @@
*/
#include <sys/types.h>
+#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/libexec/login_token/login_token.c b/libexec/login_token/login_token.c
index cf14ece0df5..1f84e823906 100644
--- a/libexec/login_token/login_token.c
+++ b/libexec/login_token/login_token.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: login_token.c,v 1.10 2013/01/13 21:21:17 fgsch Exp $ */
+/* $OpenBSD: login_token.c,v 1.11 2013/12/03 01:29:00 deraadt Exp $ */
/*-
* Copyright (c) 1995, 1996 Berkeley Software Design, Inc. All rights reserved.
@@ -41,9 +41,10 @@
#include <err.h>
#include <readpassphrase.h>
#include <signal.h>
+#include <stdlib.h>
#include <stdio.h>
#include <syslog.h>
-#include <stdlib.h>
+#include <limits.h>
#include <string.h>
#include <unistd.h>
#include <login_cap.h>
diff --git a/libexec/login_token/token.c b/libexec/login_token/token.c
index 4bc65bf2e2b..7c6f4569c8d 100644
--- a/libexec/login_token/token.c
+++ b/libexec/login_token/token.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: token.c,v 1.17 2013/11/27 21:25:25 deraadt Exp $ */
+/* $OpenBSD: token.c,v 1.18 2013/12/03 01:29:00 deraadt Exp $ */
/*-
* Copyright (c) 1995 Migration Associates Corp. All Rights Reserved
@@ -46,6 +46,7 @@
#include <ctype.h>
#include <stdio.h>
#include <syslog.h>
+#include <limits.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
diff --git a/libexec/login_token/tokendb.h b/libexec/login_token/tokendb.h
index e8d43afa846..5bdaa0235b0 100644
--- a/libexec/login_token/tokendb.h
+++ b/libexec/login_token/tokendb.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tokendb.h,v 1.4 2002/11/21 22:11:45 millert Exp $ */
+/* $OpenBSD: tokendb.h,v 1.5 2013/12/03 01:29:00 deraadt Exp $ */
/*-
* Copyright (c) 1995 Migration Associates Corp. All Rights Reserved
@@ -41,7 +41,7 @@
*/
typedef struct {
- char uname[L_cuserid]; /* user login name */
+ char uname[LOGIN_NAME_MAX]; /* user login name */
char secret[16]; /* token shared secret */
unsigned flags; /* record flags */
unsigned mode; /* token mode flags */