summaryrefslogtreecommitdiff
path: root/usr.sbin/jail/command.c
diff options
context:
space:
mode:
authorJamie Gritton <jamie@FreeBSD.org>2010-11-04 17:01:21 +0000
committerJamie Gritton <jamie@FreeBSD.org>2010-11-04 17:01:21 +0000
commit52a4962202b821096ebc0689cb77faee2e72f49c (patch)
treebced28660a29b3ffad515a0234107c8eeb256ded /usr.sbin/jail/command.c
parente3c69673a6fceb5533f028aefdd8995959866f5c (diff)
downloadsrc-test2-52a4962202b821096ebc0689cb77faee2e72f49c.tar.gz
src-test2-52a4962202b821096ebc0689cb77faee2e72f49c.zip
Notes
Diffstat (limited to 'usr.sbin/jail/command.c')
-rw-r--r--usr.sbin/jail/command.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/usr.sbin/jail/command.c b/usr.sbin/jail/command.c
index 437096a13e91..dfb7e4eb5157 100644
--- a/usr.sbin/jail/command.c
+++ b/usr.sbin/jail/command.c
@@ -189,7 +189,7 @@ run_command(struct cfjail *j, int *plimit, enum intparam comparam)
jidstr ? jidstr : string_param(j->intparams[KP_NAME]);
argv[4] = NULL;
j->flags |= JF_IFUP;
- } else if (comparam == IP_MOUNT) {
+ } else if (comparam == IP_MOUNT || comparam == IP__MOUNT_FROM_FSTAB) {
argv = alloca(8 * sizeof(char *));
comcs = alloca(comstring->len + 1);
strcpy(comcs, comstring->s);
@@ -198,8 +198,8 @@ run_command(struct cfjail *j, int *plimit, enum intparam comparam)
cs = strtok(NULL, " \t\f\v\r\n"))
argv[argc++] = cs;
if (argc < 3) {
- jail_warnx(j, "mount: %s: missing information",
- comstring->s);
+ jail_warnx(j, "%s: %s: missing information",
+ j->intparams[comparam]->name, comstring->s);
failed(j);
return -1;
}
@@ -223,13 +223,6 @@ run_command(struct cfjail *j, int *plimit, enum intparam comparam)
}
*(const char **)&argv[1] = "-t";
j->flags |= JF_MOUNTED;
- } else if (comparam == IP_MOUNT_FSTAB) {
- argv = alloca(4 * sizeof(char *));
- *(const char **)&argv[0] = down ? "/sbin/umount" : _PATH_MOUNT;
- *(const char **)&argv[1] = "-aF";
- argv[2] = comstring->s;
- argv[3] = NULL;
- j->flags |= JF_MOUNTED;
} else if (comparam == IP_MOUNT_DEVFS) {
path = string_param(j->intparams[KP_PATH]);
if (path == NULL) {