svn commit: r285345 - stable/9/usr.sbin/jail
Jamie Gritton
jamie at FreeBSD.org
Thu Jul 9 23:40:31 UTC 2015
Author: jamie
Date: Thu Jul 9 23:40:29 2015
New Revision: 285345
URL: https://svnweb.freebsd.org/changeset/base/285345
Log:
MFC r241196:
Move properly to the next parameter when jailparam_init fails
(i.e. on an unknown parameter), to avoid freeing bogus pointers.
MFC r256256 (partial):
- Fix a minor bug in jail(8) which prevented it from returning false
when jail -r failed.
Modified:
stable/9/usr.sbin/jail/config.c
stable/9/usr.sbin/jail/jail.c
Directory Properties:
stable/9/usr.sbin/jail/ (props changed)
Modified: stable/9/usr.sbin/jail/config.c
==============================================================================
--- stable/9/usr.sbin/jail/config.c Thu Jul 9 23:09:59 2015 (r285344)
+++ stable/9/usr.sbin/jail/config.c Thu Jul 9 23:40:29 2015 (r285345)
@@ -688,6 +688,7 @@ import_params(struct cfjail *j)
if (jailparam_init(jp, p->name) < 0) {
error = -1;
jail_warnx(j, "%s", jail_errmsg);
+ jp++;
continue;
}
if (TAILQ_EMPTY(&p->val))
Modified: stable/9/usr.sbin/jail/jail.c
==============================================================================
--- stable/9/usr.sbin/jail/jail.c Thu Jul 9 23:09:59 2015 (r285344)
+++ stable/9/usr.sbin/jail/jail.c Thu Jul 9 23:40:29 2015 (r285345)
@@ -470,10 +470,12 @@ main(int argc, char **argv)
if (dep_check(j))
continue;
if (j->jid < 0) {
- if (!(j->flags & (JF_DEPEND | JF_WILD))
- && verbose >= 0)
- jail_quoted_warnx(j,
- "not found", NULL);
+ if (!(j->flags & (JF_DEPEND|JF_WILD))) {
+ if (verbose >= 0)
+ jail_quoted_warnx(j,
+ "not found", NULL);
+ failed(j);
+ }
goto jail_remove_done;
}
j->comparam = stopcommands;
More information about the svn-src-stable-9
mailing list