Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Jul 2022 14:01:09 GMT
From:      Allan Jude <allanjude@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 3810b3790322 - main - mac_ddb: Make db_show_vnet_valid() handle !VIMAGE
Message-ID:  <202207211401.26LE196o028182@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by allanjude:

URL: https://cgit.FreeBSD.org/src/commit/?id=3810b37903220af1a369d3c4032ae25fb2d7949d

commit 3810b37903220af1a369d3c4032ae25fb2d7949d
Author:     Allan Jude <allanjude@FreeBSD.org>
AuthorDate: 2022-07-21 13:58:05 +0000
Commit:     Allan Jude <allanjude@FreeBSD.org>
CommitDate: 2022-07-21 14:01:01 +0000

    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
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202207211401.26LE196o028182>