diff options
author | Jamie Gritton <jamie@FreeBSD.org> | 2010-09-10 21:45:42 +0000 |
---|---|---|
committer | Jamie Gritton <jamie@FreeBSD.org> | 2010-09-10 21:45:42 +0000 |
commit | f337198db0c11d6a3881793da22ca529aa0c13b3 (patch) | |
tree | 4db0760712010aa135da435a23c05a6e6c3c231c /sys/kern/kern_jail.c | |
parent | 87eb4065762d0dac3f85c9c7b398d6da523875c4 (diff) | |
download | src-f337198db0c11d6a3881793da22ca529aa0c13b3.tar.gz src-f337198db0c11d6a3881793da22ca529aa0c13b3.zip |
Notes
Diffstat (limited to 'sys/kern/kern_jail.c')
-rw-r--r-- | sys/kern/kern_jail.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index ded2379acbfa..4882e8e83eb6 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -584,12 +584,15 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) gotchildmax = 1; error = vfs_copyopt(opts, "enforce_statfs", &enforce, sizeof(enforce)); - gotenforce = (error == 0); - if (gotenforce) { - if (enforce < 0 || enforce > 2) - return (EINVAL); - } else if (error != ENOENT) + if (error == ENOENT) + gotenforce = 0; + else if (error != 0) goto done_free; + else if (enforce < 0 || enforce > 2) { + error = EINVAL; + goto done_free; + } else + gotenforce = 1; pr_flags = ch_flags = 0; for (fi = 0; fi < sizeof(pr_flag_names) / sizeof(pr_flag_names[0]); |