Author: jamie
Date: Wed Aug 26 00:42:59 2020
New Revision: 364791
URL: https://svnweb.freebsd.org/changeset/base/364791

Log:
  Handle jail.conf variables that have the same names as parameters.
  
  PR:           248444
  Submitted by: Akos Somfai
  Reported by:  Markus Stoff

Modified:
  head/usr.sbin/jail/config.c

Modified: head/usr.sbin/jail/config.c
==============================================================================
--- head/usr.sbin/jail/config.c Wed Aug 26 00:31:59 2020        (r364790)
+++ head/usr.sbin/jail/config.c Wed Aug 26 00:42:59 2020        (r364791)
@@ -393,7 +393,8 @@ add_param(struct cfjail *j, const struct cfparam *p, e
                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;
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to