summaryrefslogtreecommitdiffstats
path: root/usr.sbin/jexec
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/jexec')
-rw-r--r--usr.sbin/jexec/jexec.86
-rw-r--r--usr.sbin/jexec/jexec.c2
2 files changed, 6 insertions, 2 deletions
diff --git a/usr.sbin/jexec/jexec.8 b/usr.sbin/jexec/jexec.8
index d325fbf..2df0f60 100644
--- a/usr.sbin/jexec/jexec.8
+++ b/usr.sbin/jexec/jexec.8
@@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd April 19, 2006
+.Dd May 26, 2008
.Dt JEXEC 8
.Os
.Sh NAME
@@ -59,6 +59,10 @@ The user name from jailed environment as whom the
.Ar command
should run.
.El
+.Sh "CAUTIONS"
+Only jid is guaranteed to uniquely identify a jail.
+For hostname or ip-number to work here unambiguousness of one or both
+of them have to be assured beforehand.
.Sh SEE ALSO
.Xr jail_attach 2 ,
.Xr jail 8 ,
diff --git a/usr.sbin/jexec/jexec.c b/usr.sbin/jexec/jexec.c
index 75f005f..5b67da3 100644
--- a/usr.sbin/jexec/jexec.c
+++ b/usr.sbin/jexec/jexec.c
@@ -98,7 +98,7 @@ main(int argc, char *argv[])
jid = (int)strtol(argv[0], NULL, 10);
if (jail_attach(jid) == -1)
if (jail_attach(addr2jid(argv[0])) == -1)
- errx(1, "jail_attach(): Cant convert %s to jid", argv[0]);
+ errx(1, "jail_attach(): Cannot convert %s to jid", argv[0]);
if (chdir("/") == -1)
err(1, "chdir(): /");
if (username != NULL) {
OpenPOWER on IntegriCloud