summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryasuoka <yasuoka@openbsd.org>2016-03-08 02:05:00 +0000
committeryasuoka <yasuoka@openbsd.org>2016-03-08 02:05:00 +0000
commit5e4e58f11fa707b3f54e97c75accfa9455f41ebe (patch)
treebc5a8b96acab1160514257526f5681892976ac7c
parentRemove __cplusplus include guard. (diff)
downloadwireguard-openbsd-5e4e58f11fa707b3f54e97c75accfa9455f41ebe.tar.xz
wireguard-openbsd-5e4e58f11fa707b3f54e97c75accfa9455f41ebe.zip
Fix: "authconf.users_file_path" is a char[] but is checked as a char*.
Diff from Mathieu Papineau (via Claer)
-rw-r--r--usr.sbin/npppd/npppd/npppd_auth.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/npppd/npppd/npppd_auth.c b/usr.sbin/npppd/npppd/npppd_auth.c
index 72955d35927..101f8cc9a7f 100644
--- a/usr.sbin/npppd/npppd/npppd_auth.c
+++ b/usr.sbin/npppd/npppd/npppd_auth.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: npppd_auth.c,v 1.17 2015/12/05 18:43:36 mmcc Exp $ */
+/* $OpenBSD: npppd_auth.c,v 1.18 2016/03/08 02:05:00 yasuoka Exp $ */
/*-
* Copyright (c) 2009 Internet Initiative Japan Inc.
@@ -26,7 +26,7 @@
* SUCH DAMAGE.
*/
/**@file authentication realm */
-/* $Id: npppd_auth.c,v 1.17 2015/12/05 18:43:36 mmcc Exp $ */
+/* $Id: npppd_auth.c,v 1.18 2016/03/08 02:05:00 yasuoka Exp $ */
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/socket.h>
@@ -197,7 +197,7 @@ npppd_auth_reload(npppd_auth_base *base)
base->has_users_file = 0;
base->radius_ready = 0;
- if (auth->users_file_path != NULL) {
+ if (strlen(auth->users_file_path) > 0) {
strlcpy(base->users_file_path, auth->users_file_path,
sizeof(base->users_file_path));
base->has_users_file = 1;