]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r285261, r285279:
authorhrs <hrs@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 23 Jul 2015 20:01:56 +0000 (20:01 +0000)
committerhrs <hrs@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 23 Jul 2015 20:01:56 +0000 (20:01 +0000)
commitcf9859d03391ed5deb04158edc6bd377842dd73e
treeaab9bf625c278d105a60996c7929a34ae955fb86
parent0d247a5f13f53035ea283a808229bd03e204854b
MFC r285261, r285279:

- Fix offset calculation in variable substitution
  in jail.conf.  The following did not work correctly:

 A="A_${B}_C_${D}"
 B="BBBBB"
 D="DDDD_${E}_FFFFF"
 E="EEEEE"

- Implement PF_IMMUTABLE flag and apply it to "name" and "jid" in
  jail.conf parameters.  This flag disallows redefinition of the parameter.

  "name" and/or "jid" are automatically defined in jail.conf by using
  the jail names at the front of jail parameter definitions.  However,
  one could override them by using a variable with the same name like
  $name = "foo".  This confused the parser and could end up with SIGSEGV.

  Note that this change also affects a case when all of parameters are
  defined in the command line arguments, not in jail.conf.  Specifically,
  "jail -c name=j1 name=j2" no longer works.  This should be harmless.

Approved by: re (gjb)

git-svn-id: svn://svn.freebsd.org/base/stable/10@285827 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
usr.sbin/jail/config.c
usr.sbin/jail/jailp.h