From: Karl MacMillan <kmacmillan@mentalrootkit.com>
To: Joshua Brindle <jbrindle@tresys.com>
Cc: "selinux@tycho.nsa.gov" <selinux@tycho.nsa.gov>,
Stephen Smalley <sds@tycho.nsa.gov>,
Darrel Goeddel <dgoeddel@TrustedCS.com>
Subject: Re: [PATCH] libsepol users in non-mls policy bugfix
Date: Mon, 30 Oct 2006 13:26:00 -0500 [thread overview]
Message-ID: <1162232760.29732.26.camel@localhost.localdomain> (raw)
In-Reply-To: <1162216762.3236.3.camel@twoface.columbia.tresys.com>
On Mon, 2006-10-30 at 08:59 -0500, Joshua Brindle wrote:
> This patch fixes a bug where adding a user in a non-mls module would
> cause a segfault at link time.
>
>
> diff -pruN trunk/libsepol/src/link.c user_mls_fix/libsepol/src/link.c
> --- trunk/libsepol/src/link.c 2006-10-28 15:35:26.000000000 -0400
> +++ user_mls_fix/libsepol/src/link.c 2006-10-28 15:26:44.000000000 -0400
> @@ -994,11 +994,15 @@ static int user_fix_callback(hashtab_key
> goto cleanup;
> }
>
> - if (mls_range_convert(&user->range, &new_user->range, mod))
> - goto cleanup;
> + if (mod->policy->mls) {
>
> - if (mls_level_convert(&user->dfltlevel, &new_user->dfltlevel, mod))
> - goto cleanup;
> + if (mls_range_convert(&user->range, &new_user->range, mod))
> + goto cleanup;
> +
> + if (mls_level_convert(&user->dfltlevel, &new_user->dfltlevel, mod))
> + goto cleanup;
> +
> + }
>
> return 0;
>
>
This patch looks ok, but shouldn't we also stop the segfault in
mls_level_convert? The use of assert there looks like it is catching
what should be a runtime error that should cause an error message rather
than bailing.
Otherwise:
Acked by: Karl MacMillan <kmacmillan@mentalrootkit.com>
>
>
> --
> This message was distributed to subscribers of the selinux mailing list.
> If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
> the words "unsubscribe selinux" without quotes as the message.
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
next prev parent reply other threads:[~2006-10-30 18:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-30 13:59 [PATCH] libsepol users in non-mls policy bugfix Joshua Brindle
2006-10-30 18:26 ` Karl MacMillan [this message]
2006-10-30 18:31 ` Joshua Brindle
2006-10-30 18:52 ` Darrel Goeddel
2006-10-30 18:56 ` Karl MacMillan
2006-10-30 21:41 ` Joshua Brindle
2006-10-31 18:03 ` Stephen Smalley
2006-10-31 18:40 ` Joshua Brindle
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=1162232760.29732.26.camel@localhost.localdomain \
--to=kmacmillan@mentalrootkit.com \
--cc=dgoeddel@TrustedCS.com \
--cc=jbrindle@tresys.com \
--cc=sds@tycho.nsa.gov \
--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.