aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJamie Gritton <jamie@FreeBSD.org>2020-08-26 00:42:59 +0000
committerJamie Gritton <jamie@FreeBSD.org>2020-08-26 00:42:59 +0000
commit177b077e577f98f2b7bd88f958248abb94e1cf2d (patch)
tree3bf95de89f05bca33cb6d160a6257696d2c060a2
parent82178ae09325af5269b8240f39f8d8171b45c422 (diff)
downloadsrc-177b077e577f98f2b7bd88f958248abb94e1cf2d.tar.gz
src-177b077e577f98f2b7bd88f958248abb94e1cf2d.zip
Handle jail.conf variables that have the same names as parameters.
PR: 248444 Submitted by: Akos Somfai Reported by: Markus Stoff
Notes
Notes: svn path=/head/; revision=364791
-rw-r--r--usr.sbin/jail/config.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/jail/config.c b/usr.sbin/jail/config.c
index 234c4e257976..3d9fc92c99bb 100644
--- a/usr.sbin/jail/config.c
+++ b/usr.sbin/jail/config.c
@@ -393,7 +393,8 @@ add_param(struct cfjail *j, const struct cfparam *p, enum intparam ipnum,
else
for (ipnum = IP__NULL + 1; ipnum < IP_NPARAM; ipnum++)
if (!(intparams[ipnum].flags & PF_CONV) &&
- equalopts(name, intparams[ipnum].name)) {
+ equalopts(name, intparams[ipnum].name) &&
+ !(p->flags & PF_VAR)) {
j->intparams[ipnum] = np;
np->flags |= intparams[ipnum].flags;
break;