Date: Sun, 22 Feb 2015 00:00:11 +0000 (UTC) From: Jamie Gritton <jamie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r279123 - head/usr.sbin/jls Message-ID: <201502220000.t1M00Bdo055133@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jamie Date: Sun Feb 22 00:00:10 2015 New Revision: 279123 URL: https://svnweb.freebsd.org/changeset/base/279123 Log: Allow for parameters added with the JP_OPT flag to not exist. That's why the flag exists in the first place. MFC after: 1 week Modified: head/usr.sbin/jls/jls.c Modified: head/usr.sbin/jls/jls.c ============================================================================== --- head/usr.sbin/jls/jls.c Sat Feb 21 23:47:20 2015 (r279122) +++ head/usr.sbin/jls/jls.c Sun Feb 22 00:00:10 2015 (r279123) @@ -294,10 +294,8 @@ add_param(const char *name, void *value, param->jp_flags |= flags; return param - params; } - if (jailparam_init(param, name) < 0) - errx(1, "%s", jail_errmsg); - param->jp_flags = flags; - if ((value != NULL ? jailparam_import_raw(param, value, valuelen) + if (jailparam_init(param, name) < 0 || + (value != NULL ? jailparam_import_raw(param, value, valuelen) : jailparam_import(param, value)) < 0) { if (flags & JP_OPT) { nparams--; @@ -305,6 +303,7 @@ add_param(const char *name, void *value, } errx(1, "%s", jail_errmsg); } + param->jp_flags = flags; return param - params; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502220000.t1M00Bdo055133>