From: Mimi Zohar <zohar@linux.ibm.com>
To: Matthew Garrett <matthewgarrett@google.com>,
linux-integrity@vger.kernel.org
Cc: zohar@linux.vnet.ibm.com, prsriva02@gmail.com,
bauerman@linux.ibm.com, roberto.sassu@huawei.com,
Matthew Garrett <mjg59@google.com>
Subject: Re: [PATCH V4] IMA: support for per policy rule template formats
Date: Tue, 18 Jun 2019 22:19:11 -0400 [thread overview]
Message-ID: <1560910751.4157.4.camel@linux.ibm.com> (raw)
In-Reply-To: <20190618202428.10320-1-matthewgarrett@google.com>
On Tue, 2019-06-18 at 13:24 -0700, Matthew Garrett wrote:
> @@ -1134,6 +1144,27 @@ static int ima_parse_rule(char *rule, struct ima_rule_entry *entry)
> else
> entry->flags |= IMA_PCR;
>
> + break;
> + case Opt_template:
> + ima_log_string(ab, "template", args[0].from);
> + if (entry->action != MEASURE) {
> + result = -EINVAL;
> + break;
> + }
> + template_desc = lookup_template_desc(args[0].from);
> + if (!template_desc || entry->template) {
> + result = -EINVAL;
> + } else {
> + /*
> + * template_desc_init_fields() does nothing
> + * if the template is already initialised,
> + * so it's safe to do this unconditionally
> + */
> + template_desc_init_fields(template_desc->fmt,
> + &(template_desc->fields),
> + &(template_desc->num_fields));
> + entry->template = template_desc;
> + }
The "else" isn't necessary, causing unnecessary indenting. Just add a
break.
Mimi
> break;
> case Opt_err:
> ima_log_string(ab, "UNKNOWN", p);
prev parent reply other threads:[~2019-06-19 15:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-18 20:24 [PATCH V4] IMA: support for per policy rule template formats Matthew Garrett
2019-06-19 2:19 ` Mimi Zohar [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1560910751.4157.4.camel@linux.ibm.com \
--to=zohar@linux.ibm.com \
--cc=bauerman@linux.ibm.com \
--cc=linux-integrity@vger.kernel.org \
--cc=matthewgarrett@google.com \
--cc=mjg59@google.com \
--cc=prsriva02@gmail.com \
--cc=roberto.sassu@huawei.com \
--cc=zohar@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.