summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2004-05-19 17:43:09 +0000
committerStef Walter <stef@memberwebs.com>2004-05-19 17:43:09 +0000
commit16a07b3e85b2e8994350583b3a74b79e2680f4f5 (patch)
tree254d4b94a00cdd8d6f800c627c2f3c30193459dc
parent36987df385cbbcd8b7e72c97af620d76b8f1ae8f (diff)
Bug fixes for kvm prepare jail
-rw-r--r--srcx/jps.c2
-rw-r--r--srcx/util.c4
2 files changed, 2 insertions, 4 deletions
diff --git a/srcx/jps.c b/srcx/jps.c
index 85f7184..8a27015 100644
--- a/srcx/jps.c
+++ b/srcx/jps.c
@@ -111,7 +111,7 @@ int main(int argc, char* argv[])
free_jail_sysctl(len, sxp);
/* Go into the jail */
- if(jail_attach(xp->pr_id) == -1)
+ if(jail_attach(jid) == -1)
err(1, "couldn't attach to jail");
if(simple)
diff --git a/srcx/util.c b/srcx/util.c
index c406163..5fcad1c 100644
--- a/srcx/util.c
+++ b/srcx/util.c
@@ -205,8 +205,6 @@ int kvm_prepare_jail(struct xprison* xp)
strcpy(path, xp->pr_path);
strcat(path, _PATH_DEV);
- warnx("the %s directory doesn't exist. creating...", path);
-
if(mkdir(path, 0) == -1 ||
chmod(path, S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH) == -1)
{
@@ -223,7 +221,7 @@ int kvm_prepare_jail(struct xprison* xp)
strcpy(path, xp->pr_path);
strcat(path, _PATH_DEVNULL);
- warnx("the %s device doesn't exist in jail. creating...", path);
+ warnx("creating %s device in jail.", path);
if(mknod(path, mode, dev) == -1)
{