Upgrade jail(2) to latest jail(2) API to make the regression test work
again. Eventually should switch to jail_set(2). Reported by: rwatson MFC after: 10 days
This commit is contained in:
parent
0d9535331d
commit
3e622db1cb
@ -77,6 +77,7 @@ main(int argc, __unused char *argv[])
|
||||
{
|
||||
struct sockaddr_in sin;
|
||||
struct jail thejail;
|
||||
struct in_addr ia4;
|
||||
|
||||
if (argc != 1)
|
||||
usage();
|
||||
@ -94,12 +95,18 @@ main(int argc, __unused char *argv[])
|
||||
|
||||
/*
|
||||
* Now re-run in a jail.
|
||||
* XXX-BZ should switch to jail_set(2).
|
||||
*/
|
||||
ia4.s_addr = htonl(INADDR_LOOPBACK);
|
||||
|
||||
bzero(&thejail, sizeof(thejail));
|
||||
thejail.version = 0;
|
||||
thejail.version = JAIL_API_VERSION;
|
||||
thejail.path = "/";
|
||||
thejail.hostname = "jail";
|
||||
thejail.ip_number = INADDR_LOOPBACK;
|
||||
thejail.jailname = "udpconnectjail";
|
||||
thejail.ip4s = 1;
|
||||
thejail.ip4 = &ia4;
|
||||
|
||||
if (jail(&thejail) < 0)
|
||||
errx(-1, "jail: %s", strerror(errno));
|
||||
test("in jail", &sin);
|
||||
|
Loading…
Reference in New Issue
Block a user