Bug 509344 - SELinux policy generation fails
Summary: SELinux policy generation fails
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: policycoreutils
Version: 11
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-07-02 11:39 UTC by Fabrice Colin
Modified: 2009-11-18 13:10 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-11-18 13:10:02 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Fabrice Colin 2009-07-02 11:39:18 UTC
Description of problem:
I am trying to create a new policy with system-config-selinux, using the SELinux Policy Generation Tool open by "Policy Module" > "New".
After filling in the details, nothing happens when pressing the Apply button and the following trace is output :

/root/selinuxTraceback (most recent call last):
  File "/usr/share/system-config-selinux/polgengui.py", line 273, in forward
    self.generate_policy()
  File "/usr/share/system-config-selinux/polgengui.py", line 414, in generate_policy
    self.info(my_policy.generate(outputdir))
  File "/usr/share/system-config-selinux/polgen.py", line 1000, in generate
    out += "%-25s %s\n" % (_("Type Enforcement file"), self.write_te(out_dir))
  File "/usr/share/system-config-selinux/polgen.py", line 962, in write_te
    fd.write(self.generate_te())
  File "/usr/share/system-config-selinux/polgen.py", line 848, in generate_te
    newte += self.generate_process()
  File "/usr/share/system-config-selinux/polgen.py", line 577, in generate_process
    self.process.sort()
AttributeError: policy instance has no attribute 'process'


Version-Release number of selected component (if applicable):
$ rpm -qf `which system-config-selinux `
policycoreutils-gui-2.0.62-12.11.fc11.x86_64

How reproducible:
Just using the default values in all pages of the wizard seems to reproduce this every time.

Steps to Reproduce:
1. Open system-config-selinux
2. Go to "Policy Module" > "New"
3. Use default values
4. Press the Apply button
  
Actual results:
Program fails to generate a new module.

Expected results:
A new module is created in the user-specified location.

Additional info:
Replacing line 577 of /usr/share/system-config-selinux/polgen.py with
"
self.processes.sort()
"
does the trick.

Fabrice

Comment 1 Daniel Walsh 2009-07-09 13:18:06 UTC
Fixed in policycoreutils-2.0.62-12.12.fc11


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