1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-20 11:11:24 +00:00

jail_v0.ip_number was always in host byte order. This was handled

in one of the many layers of indirection and shims through stable/7
in jail_handle_ips().  When it was cleaned up and unified through
kern_jail() for 8.x, the byte order swap was lost.

This only matters for ancient binaries that call jail(2) themselves
internally.
This commit is contained in:
Peter Wemm 2013-11-28 19:40:33 +00:00
parent 456a87bb3b
commit b5019bc45b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=258718
2 changed files with 2 additions and 2 deletions

View File

@ -1928,7 +1928,7 @@ freebsd32_jail(struct thread *td, struct freebsd32_jail_args *uap)
CP(j32_v0, j, version);
PTRIN_CP(j32_v0, j, path);
PTRIN_CP(j32_v0, j, hostname);
j.ip4s = j32_v0.ip_number;
j.ip4s = htonl(j32_v0.ip_number); /* jail_v0 is host order */
break;
}

View File

@ -314,7 +314,7 @@ sys_jail(struct thread *td, struct jail_args *uap)
j.version = j0.version;
j.path = j0.path;
j.hostname = j0.hostname;
j.ip4s = j0.ip_number;
j.ip4s = htonl(j0.ip_number); /* jail_v0 is host order */
break;
}