Date: Wed, 10 Sep 2025 04:00:35 GMT From: Zhenlei Huang <zlei@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 685e60e860d6 - main - ngctl: Fix build without JAIL Message-ID: <202509100400.58A40Z2u005881@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=685e60e860d61f6e1bcf981f5c30647e0c025702 commit 685e60e860d61f6e1bcf981f5c30647e0c025702 Author: Zhenlei Huang <zlei@FreeBSD.org> AuthorDate: 2025-09-10 04:00:05 +0000 Commit: Zhenlei Huang <zlei@FreeBSD.org> CommitDate: 2025-09-10 04:00:05 +0000 ngctl: Fix build without JAIL Reported by: Michael Dexter Fixes: 72d01e62b082 netgraph: teach ngctl to attach and run itself in a jail MFC after: 1 day --- usr.sbin/ngctl/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/usr.sbin/ngctl/main.c b/usr.sbin/ngctl/main.c index b32e4f878b6e..b86f1ca27e71 100644 --- a/usr.sbin/ngctl/main.c +++ b/usr.sbin/ngctl/main.c @@ -144,7 +144,9 @@ main(int ac, char *av[]) char name[NG_NODESIZ]; int interactive = isatty(0) && isatty(1); FILE *fp = NULL; +#ifdef JAIL const char *jail_name = NULL; +#endif int ch, rtn = 0; /* Set default node name */ @@ -181,6 +183,7 @@ main(int ac, char *av[]) ac -= optind; av += optind; +#ifdef JAIL if (jail_name != NULL) { int jid; @@ -196,6 +199,7 @@ main(int ac, char *av[]) errx((errno == EPERM) ? EX_NOPERM : EX_OSERR, "cannot attach to jail"); } +#endif /* Create a new socket node */ if (NgMkSockNode(name, &csock, &dsock) < 0)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202509100400.58A40Z2u005881>