* [PATCH 1/1] mcstransd select correct colour range.
@ 2011-04-10 16:18 Richard Haines
2011-04-12 13:26 ` Steve Lawrence
0 siblings, 1 reply; 2+ messages in thread
From: Richard Haines @ 2011-04-10 16:18 UTC (permalink / raw)
To: selinux
mcstransd: Now selects the range color for a matching 'range' entry in secolor.conf file, and not the first range to pass the dominance check.
The second patch has the man pages to support the colour functions that match how mcstransd manages colour selection.
Signed-off-by: Richard Haines <richard_c_haines@btinternet.com>
---
policycoreutils/mcstrans/src/mcscolor.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/policycoreutils/mcstrans/src/mcscolor.c b/policycoreutils/mcstrans/src/mcscolor.c
index a443320..90c4321 100644
--- a/policycoreutils/mcstrans/src/mcscolor.c
+++ b/policycoreutils/mcstrans/src/mcscolor.c
@@ -135,12 +135,12 @@ static const secolor_t *find_color(int idx, const char *component,
}
while (ptr) {
- if (idx == COLOR_RANGE) {
- if (check_dominance(ptr->pattern, raw) == 0)
- return &ptr->color;
- } else {
- if (fnmatch(ptr->pattern, component, 0) == 0)
- return &ptr->color;
+ if (fnmatch(ptr->pattern, component, 0) == 0) {
+ if (idx == COLOR_RANGE) {
+ if (check_dominance(ptr->pattern, raw) == 0)
+ return &ptr->color;
+ } else
+ return &ptr->color;
}
ptr = ptr->next;
}
--
1.7.3.2
Richard
--
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.
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] mcstransd select correct colour range.
2011-04-10 16:18 [PATCH 1/1] mcstransd select correct colour range Richard Haines
@ 2011-04-12 13:26 ` Steve Lawrence
0 siblings, 0 replies; 2+ messages in thread
From: Steve Lawrence @ 2011-04-12 13:26 UTC (permalink / raw)
To: Richard Haines; +Cc: selinux
On 04/10/2011 12:18 PM, Richard Haines wrote:
> mcstransd: Now selects the range color for a matching 'range' entry in secolor.conf file, and not the first range to pass the dominance check.
>
> The second patch has the man pages to support the colour functions that match how mcstransd manages colour selection.
>
> Signed-off-by: Richard Haines <richard_c_haines@btinternet.com>
> ---
> policycoreutils/mcstrans/src/mcscolor.c | 12 ++++++------
> 1 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/policycoreutils/mcstrans/src/mcscolor.c b/policycoreutils/mcstrans/src/mcscolor.c
> index a443320..90c4321 100644
> --- a/policycoreutils/mcstrans/src/mcscolor.c
> +++ b/policycoreutils/mcstrans/src/mcscolor.c
> @@ -135,12 +135,12 @@ static const secolor_t *find_color(int idx, const char *component,
> }
>
> while (ptr) {
> - if (idx == COLOR_RANGE) {
> - if (check_dominance(ptr->pattern, raw) == 0)
> - return &ptr->color;
> - } else {
> - if (fnmatch(ptr->pattern, component, 0) == 0)
> - return &ptr->color;
> + if (fnmatch(ptr->pattern, component, 0) == 0) {
> + if (idx == COLOR_RANGE) {
> + if (check_dominance(ptr->pattern, raw) == 0)
> + return &ptr->color;
> + } else
> + return &ptr->color;
> }
> ptr = ptr->next;
> }
Applied to policycoreutils-2.0.86
Thanks!
--
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-04-12 13:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-10 16:18 [PATCH 1/1] mcstransd select correct colour range Richard Haines
2011-04-12 13:26 ` Steve Lawrence
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.