This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 665505 - SELinux instructions not functional
SELinux instructions not functional
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: setroubleshoot-plugins (Show other bugs)
14
i386 Linux
low Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Fedora Extras Quality Assurance
:
: 666179 666739 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-12-24 00:19 EST by Richard Burton
Modified: 2011-01-13 13:01 EST (History)
6 users (show)

See Also:
Fixed In Version: setroubleshoot-plugins-3.0.9-1.fc14
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-01-13 13:01:31 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Richard Burton 2010-12-24 00:19:10 EST
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.6.13-1.fc14 Firefox/3.6.13

Running crossover-standard (wine). Causes SELinux exception.
SELinux provides following instruction

You should report this as a bug.
You can generate a local policy module to allow this access.
Allow this access for now by executing:
# grep /opt/cxoffice/bin/wine-preloader /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

ran su - 
and then the grep line. Resulted in the following:
[root@rsb ~]# grep /opt/cxoffice/bin/wine-preloader /var/log/audit/audit.log | audit2allow -M mypol
compilation failed:
mypol.te:6:ERROR 'syntax error' at token '' on line 6:


What do I do to update local policy? Too bad there is not a button for this....


Reproducible: Always

Steps to Reproduce:
1. Run application under crossover (wine)
2. follow SELinux instructions
3.


Expected Results:  
Local policy updated with no errors. Better yet, a button to execute these commands from within SELinux.
Comment 1 Daniel Walsh 2010-12-28 15:17:57 EST
If you grep for wine-preloader in /var/log/audit/audit.log do you get data?

We do not want to make this a button because we would like you to try to analyze what the policy allows.

In this case you probably do not want to necessarily allow what it is asking for.


Please attach the output of 

ausearch -m avc -ts recent
Comment 2 Richard Burton 2010-12-28 19:24:44 EST
The grep results in
[root@rsb ~]# grep /opt/cxoffice/bin/wine-preloader /var/log/audit/audit.log |
> audit2allow -M mypol
compilation failed:
mypol.te:6:ERROR 'syntax error' at token '' on line 6:


/usr/bin/checkmodule:  error(s) encountered while parsing configuration
/usr/bin/checkmodule:  loading policy configuration from mypol.te




Here is the output from ausearch. I assume pwd directory does not matter?
[root@rsb ~]# ausearch -m avc -ts recent
<no matches>
Comment 3 Miroslav Grepl 2011-01-03 06:34:25 EST
Dan,
I think we should just change the following line in the catchall.py plugin


# grep $SOURCE_PATH /var/log/audit/audit.log | audit2allow -M mypol

to 

# grep $SOURCE /var/log/audit/audit.log | audit2allow -M mypol

The problem is $SOURCE_PATH is located on new line in the "audit.log" log file.
Comment 4 Miroslav Grepl 2011-01-03 06:34:54 EST
*** Bug 666179 has been marked as a duplicate of this bug. ***
Comment 5 Miroslav Grepl 2011-01-03 11:52:10 EST
*** Bug 666739 has been marked as a duplicate of this bug. ***
Comment 6 Fedora Update System 2011-01-03 16:12:26 EST
setroubleshoot-plugins-3.0.9-1.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/setroubleshoot-plugins-3.0.9-1.fc14
Comment 7 Fedora Update System 2011-01-04 15:53:26 EST
setroubleshoot-plugins-3.0.9-1.fc14 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update setroubleshoot-plugins'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/setroubleshoot-plugins-3.0.9-1.fc14
Comment 8 Vitor 2011-01-06 19:33:25 EST
(In reply to comment #7)

Problem persists after the upgrade. Details below.

[root@localhost ~]# uname -a
Linux localhost.localdomain 2.6.35.10-74.fc14.x86_64 #1 SMP Thu Dec 23 16:04:50 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux

[root@localhost ~]# rpm -q setroubleshoot-plugins
setroubleshoot-plugins-3.0.9-1.fc14.noarch

[root@localhost ~]# grep /usr/local/Wolfram/Mathematica/7.0/SystemFiles/FrontEnd/Binaries/Linux-x86-64/gltest /var/log/audit/audit.log 
type=SYSCALL msg=audit(1294358863.627:79): arch=c000003e syscall=10 success=no exit=-13 a0=7fff364af000 a1=1000 a2=1000007 a3=33cd421000 items=0 ppid=7634 pid=7635 auid=500 uid=500 gid=100 euid=500 suid=500 fsuid=500 egid=100 sgid=100 fsgid=100 tty=(none) ses=6 comm="gltest" exe="/usr/local/Wolfram/Mathematica/7.0/SystemFiles/FrontEnd/Binaries/Linux-x86-64/gltest" subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=(null)

[root@localhost ~]# grep /usr/local/Wolfram/Mathematica/7.0/SystemFiles/FrontEnd/Binaries/Linux-x86-64/gltest /var/log/audit/audit.log | audit2allow -M mypol
compilation failed:
mypol.te:6:ERROR 'syntax error' at token '' on line 6:


/usr/bin/checkmodule:  error(s) encountered while parsing configuration
/usr/bin/checkmodule:  loading policy configuration from mypol.te
Comment 9 Daniel Walsh 2011-01-07 12:01:30 EST
Please look at the alert again.  It should tell you to 

grep gltest /var/log/audit/audit.log 

Now.  Jut the base name not the full path.
Comment 10 Vitor 2011-01-07 21:12:48 EST
(In reply to comment #9)
> Now.  Jut the base name not the full path.

You're absolutely right. Problem solved.

Apologies for the noise...
Comment 11 Fedora Update System 2011-01-13 13:01:25 EST
setroubleshoot-plugins-3.0.9-1.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

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