mirror of
https://git.freebsd.org/src.git
synced 2026-01-11 19:57:22 +00:00
ngctl: Fix build without JAIL
Reported by: Michael Dexter
Fixes: 72d01e62b0 netgraph: teach ngctl to attach and run itself in a jail
MFC after: 1 day
This commit is contained in:
parent
90593b1bdb
commit
685e60e860
1 changed files with 4 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue