selinux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Topi Miettinen <toiwoton@gmail.com>
To: James Carter <jwcart2@gmail.com>, selinux@vger.kernel.org
Subject: Re: [PATCH v3 2/2] libsepol/cil: Return error when identifier declared as both type and attribute
Date: Wed, 27 May 2020 10:02:28 +0300	[thread overview]
Message-ID: <0cd7a2db-3b3f-fb03-19f9-f8984a913833@gmail.com> (raw)
In-Reply-To: <20200526185058.42827-2-jwcart2@gmail.com>

On 26.5.2020 21.50, James Carter wrote:
> CIL allows a type to be redeclared when using the multiple declarations
> option ("-m" or "--muliple-decls"), but make it an error for an identifier
> to be declared as both a type and an attribute.
> 
> Change the error message so that it always gives the location and flavor
> of both declarations. The flavors will be the same in all other cases,
> but in this case they explain why there is an error even if multiple
> declartions are allowed.
> 
> Fixes: Commit fafe4c212bf6c32c ("libsepol: cil: Add ability to redeclare types[attributes]")
> Reported-by: Topi Miettinen <toiwoton@gmail.com>
> Signed-off-by: James Carter <jwcart2@gmail.com>

Thanks, this prevents mismatching declarations. Does this also fix the 
memory issue and prevent that buggy policy could get loaded sometimes?

-Topi

  reply	other threads:[~2020-05-27  7:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-26 18:50 [PATCH v3 1/2] libsepol/cil: Initialize the multiple_decls field of the cil db James Carter
2020-05-26 18:50 ` [PATCH v3 2/2] libsepol/cil: Return error when identifier declared as both type and attribute James Carter
2020-05-27  7:02   ` Topi Miettinen [this message]
2020-05-27 12:06     ` James Carter
2020-05-27 13:16   ` Stephen Smalley
2020-05-29 12:52     ` Stephen Smalley

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=0cd7a2db-3b3f-fb03-19f9-f8984a913833@gmail.com \
    --to=toiwoton@gmail.com \
    --cc=jwcart2@gmail.com \
    --cc=selinux@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).