mirror of
https://github.com/SELinuxProject/selinux
synced 2025-02-03 03:12:17 +00:00
mcstransd select correct colour range.
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> Signed-off-by: Steve Lawrence <slawrence@tresys.com>
This commit is contained in:
parent
20b43b3fd3
commit
fe17b3d2d9
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user