Bug 788046 - SELINUX: semanage boolean failed due to invalid regex
Summary: SELINUX: semanage boolean failed due to invalid regex
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: policycoreutils
Version: rawhide
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-07 10:40 UTC by Avi Tal
Modified: 2016-04-22 04:59 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-10-17 06:36:01 UTC
Type: ---


Attachments (Terms of Use)

Description Avi Tal 2012-02-07 10:40:02 UTC
libselinux-2.1.6-5.fc16.x86_64
libselinux-python-2.1.6-5.fc16.x86_64
selinux-policy-3.10.0-75.fc16.noarch
libselinux-utils-2.1.6-5.fc16.x86_64
selinux-policy-targeted-3.10.0-75.fc16.noarch


Description of problem:
# /usr/sbin/semanage boolean -m -S targeted -F /dev/stdin
/etc/selinux/targeted/contexts/files/file_contexts.local:  line 4 has invalid regex /etc/sysconfig/network-scripts/ifcfg-(*)?:  Invalid preceding regular expression


# cat /etc/selinux/targeted/contexts/files/file_contexts.local

# This file is auto-generated by libsemanage
# Do not edit directly.

/etc/sysconfig/network-scripts/ifcfg-(*)?    system_u:object_r:net_conf_t:s0
/etc/sysconfig/network-scripts/ifcfg-ovirtmgmt    system_u:object_r:net_conf_t:s0

Comment 1 Miroslav Grepl 2012-02-07 11:19:12 UTC
How did you add the first definition?

$ semanage fcontext -a -t net_conf_t "/etc/sysconfig/network-scripts/ifcfg-(*)"
/etc/selinux/targeted/contexts/files/file_contexts.local:  line 4 has invalid regex /etc/sysconfig/network-scripts/ifcfg-(*):  Invalid preceding regular expressio

Comment 2 Miroslav Grepl 2012-02-07 11:21:39 UTC
Ahh, I see "/etc/selinux/targeted/contexts/files/file_contexts.local" is updated and this labeling is added which causes issues.

You will need to delete it from this file by hand.

Comment 3 Daniel Walsh 2012-02-07 14:45:59 UTC
Miroslav are you saying the semanage command allowed the bad data in?

Comment 4 Miroslav Grepl 2012-02-07 14:54:01 UTC
(In reply to comment #3)
> Miroslav are you saying the semanage command allowed the bad data in?

Yes. But I have not looked at it yet.

Comment 5 Daniel Walsh 2012-10-16 17:43:59 UTC
Miroslav going through old bugs, is this one fixed?

Comment 6 Miroslav Grepl 2012-10-17 06:36:01 UTC
Yes, we fixed it.


Note You need to log in before you can comment on or make changes to this bug.