From: Steve Lawrence <slawrence@tresys.com>
To: Chris PeBenito <cpebenito@tresys.com>, <selinux@tycho.nsa.gov>
Subject: Re: [PATCH 1/1] Fix error path in mls_semantic_level_expand().
Date: Mon, 23 Feb 2015 08:20:45 -0500 [thread overview]
Message-ID: <54EB292D.9010904@tresys.com> (raw)
In-Reply-To: <1424617943-12541-1-git-send-email-cpebenito@tresys.com>
On 02/22/2015 10:12 AM, Chris PeBenito wrote:
> If the level contains a category that is not associated with a sensitivity,
> the code correctly detects the condition, but does not return an error.
>
> Signed-off-by: Chris PeBenito <cpebenito@tresys.com>
Acked-by: Steve Lawrence <slawrence@tresys.com>
Thanks!
> ---
> libsepol/src/expand.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/libsepol/src/expand.c b/libsepol/src/expand.c
> index 467f7a7..3193ef5 100644
> --- a/libsepol/src/expand.c
> +++ b/libsepol/src/expand.c
> @@ -914,10 +914,11 @@ int mls_semantic_level_expand(mls_semantic_level_t * sl, mls_level_t * l,
> }
> for (i = cat->low - 1; i < cat->high; i++) {
> if (!ebitmap_get_bit(&levdatum->level->cat, i)) {
> - ERR(h, "Category %s can not be associate with "
> + ERR(h, "Category %s can not be associated with "
> "level %s",
> p->p_cat_val_to_name[i],
> p->p_sens_val_to_name[l->sens - 1]);
> + return -1;
> }
> if (ebitmap_set_bit(&l->cat, i, 1)) {
> ERR(h, "Out of memory!");
>
prev parent reply other threads:[~2015-02-23 13:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-22 15:12 [PATCH 1/1] Fix error path in mls_semantic_level_expand() Chris PeBenito
2015-02-23 13:20 ` Steve Lawrence [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=54EB292D.9010904@tresys.com \
--to=slawrence@tresys.com \
--cc=cpebenito@tresys.com \
--cc=selinux@tycho.nsa.gov \
/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.