summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYASUOKA Masahiko <yasuoka@cvs.openbsd.org>2024-07-17 11:19:28 +0000
committerYASUOKA Masahiko <yasuoka@cvs.openbsd.org>2024-07-17 11:19:28 +0000
commit144020ac1d0fedb014385af9df6b493ae9dc7cb2 (patch)
tree26887ff9369b032ecd56672a909887878e718969
parent3458c21d23ee6741997255427c86d208837f911f (diff)
Error if config parameter is unknown. This also fixes a gcc warning.
spotted by deraadt
-rw-r--r--usr.sbin/radiusd/radiusd_eap2mschap.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.sbin/radiusd/radiusd_eap2mschap.c b/usr.sbin/radiusd/radiusd_eap2mschap.c
index 2e0b252e5c3..7e38b295c14 100644
--- a/usr.sbin/radiusd/radiusd_eap2mschap.c
+++ b/usr.sbin/radiusd/radiusd_eap2mschap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: radiusd_eap2mschap.c,v 1.1 2024/07/14 16:09:23 yasuoka Exp $ */
+/* $OpenBSD: radiusd_eap2mschap.c,v 1.2 2024/07/17 11:19:27 yasuoka Exp $ */
/*
* Copyright (c) 2024 Internet Initiative Japan Inc.
@@ -119,7 +119,12 @@ eap2mschap_config_set(void *ctx, const char *name, int argc,
} else if (strcmp(name, "_debug") == 0)
log_init(1);
else if (strncmp(name, "_", 1) == 0)
- /* ignore */;
+ /* ignore all internal messages */;
+ else {
+ module_send_message(self->base, IMSG_NG,
+ "Unknown config parameter `%s'", name);
+ return;
+ }
module_send_message(self->base, IMSG_OK, NULL);
return;