From 3810b37903220af1a369d3c4032ae25fb2d7949d Mon Sep 17 00:00:00 2001 From: Allan Jude Date: Thu, 21 Jul 2022 13:58:05 +0000 Subject: [PATCH] mac_ddb: Make db_show_vnet_valid() handle !VIMAGE Reported by: kib Sponsored by: Juniper Networks, Inc. Sponsored by: Klara, Inc. --- sys/security/mac_ddb/mac_ddb.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/security/mac_ddb/mac_ddb.c b/sys/security/mac_ddb/mac_ddb.c index 847be4997226..8f2f0d78bb07 100644 --- a/sys/security/mac_ddb/mac_ddb.c +++ b/sys/security/mac_ddb/mac_ddb.c @@ -196,6 +196,7 @@ db_show_rman_valid(db_expr_t addr, bool have_addr, db_expr_t count, char *modif) static int db_show_vnet_valid(db_expr_t addr, bool have_addr, db_expr_t count, char *modif) { +#ifdef VIMAGE VNET_ITERATOR_DECL(vnet); if (!have_addr) @@ -207,6 +208,9 @@ db_show_vnet_valid(db_expr_t addr, bool have_addr, db_expr_t count, char *modif) } return (EACCES); +#else + return (EOPNOTSUPP); +#endif } #endif