Fix various bogons.

Submitted by:	Rudolf Cejka <cejkar@dcse.fee.vutbr.cz>
Reviewed by:	phk
This commit is contained in:
Poul-Henning Kamp 1999-05-04 18:20:53 +00:00
parent 5da819e1e5
commit ce5c1cd1ff
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=46432
3 changed files with 26 additions and 1 deletions

View File

@ -1,3 +1,5 @@
# $id$
PROG= jail
MAN8= jail.8

View File

@ -1,3 +1,14 @@
.\"
.\"----------------------------------------------------------------------------
.\""THE BEER-WARE LICENSE" (Revision 42):
.\"<phk@FreeBSD.ORG> wrote this file. As long as you retain this notice you
.\"can do whatever you want with this stuff. If we meet some day, and you think
.\"this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
.\"----------------------------------------------------------------------------
.\"
.\"$Id$
.\"
.\"
.Dd April 28, 1999
.Dt JAIL 8
.Os FreeBSD 4.0

View File

@ -1,3 +1,15 @@
/*
* ----------------------------------------------------------------------------
* "THE BEER-WARE LICENSE" (Revision 42):
* <phk@FreeBSD.ORG> wrote this file. As long as you retain this notice you
* can do whatever you want with this stuff. If we meet some day, and you think
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
* ----------------------------------------------------------------------------
*
* $Id$
*
*/
#include <stdio.h>
#include <err.h>
#include <sys/types.h>
@ -21,7 +33,7 @@ main(int argc, char **argv)
i = inet_aton(argv[3], &in);
if (!i)
errx(1, "Couldn't make sense if ip number\n");
j.ip_number = in.s_addr;
j.ip_number = ntohl(in.s_addr);
i = jail(&j);
if (i)
err(1, "Imprisonment failed");