Bug 641608

Summary: gpm support in mc doesn't work
Product: [Fedora] Fedora Reporter: Michael Schwendt <bugs.michael>
Component: selinux-policy-targetedAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: low    
Version: 13CC: cheery314, mishu
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: selinux-policy-3.7.19-69.fc13 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-11-11 22:22:57 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
audit.log excerpt none

Description Michael Schwendt 2010-10-09 15:30:38 UTC
Description of problem: Compared with Fedora 12, in Fedora 13 (and Fedora 14 development) the text mode console mouse-support using "gpm" doesn't work in "mc" anymore for normal user accounts and SELinux enforcing mode (targeted).

1. yum -y install gpm
2. sudo service gpm start
3. CTRL+ALT+F2 or any other virtual console
4. log in as normal user
5. start mc and try to enter directories with mouse double-click


Version-Release number of selected component (if applicable):
$ rpm -q mc gpm
mc-4.7.4-1.fc13.x86_64
gpm-1.20.6-9.fc13.x86_64


How reproducible:
Always


If running "setenforce 0" and then logging in as normal user, it works.

Comment 1 Michael Schwendt 2010-10-09 18:42:36 UTC
With setenforce 1 when starting mc:
Oct  9 20:38:27 localhost /usr/sbin/gpm[2560]: *** err [daemon/processconn.c(121)]: 
Oct  9 20:38:27 localhost /usr/sbin/gpm[2560]: stat on /dev/tty3 fails in processConn

With setenforce 0 when starting mc:
Oct  9 20:40:24 localhost /usr/sbin/gpm[2560]: *** info [daemon/processrequest.c(42)]: 
Oct  9 20:40:24 localhost /usr/sbin/gpm[2560]: Request on 6 (console 2)

Comment 2 cheery314 2010-10-10 23:22:18 UTC
Is there a way to create a local exception/policy for this?

Comment 3 Daniel Walsh 2010-10-12 15:03:20 UTC
Could you see if there are any avc messages in /var/log/audit/audit.log?  Or dmesg?

Comment 4 Michael Schwendt 2010-10-12 16:27:28 UTC
Nothing (and no sealert either). The quoted entries from /var/log/messages is the only evidence of something going wrong.

Comment 5 Daniel Walsh 2010-10-12 17:40:19 UTC
Try turning off dontaudit rules by executing.

semodule -DB

Then execute your commnads,  you will see the AVC messages then.

semodule -B 

Will turn the dontaudit rules back on .

Comment 6 Michael Schwendt 2010-10-12 18:18:45 UTC
Created attachment 453006 [details]
audit.log excerpt

These are the messages in audit.log when starting "mc" on virtual console 2 and double-clicking a directory.

Comment 7 Daniel Walsh 2010-10-12 18:44:33 UTC
Miroslav can you add

userdom_use_user_terminals(gpm_t)

Comment 8 Miroslav Grepl 2010-10-13 06:35:09 UTC
Fixed in selinux-policy-3.7.19-66.fc13

Comment 9 cheery314 2010-10-13 07:54:04 UTC
(In reply to comment #8)
> Fixed in selinux-policy-3.7.19-66.fc13

Thank you very much! When will the repo receive the update?

Comment 10 Miroslav Grepl 2010-10-13 08:33:48 UTC
Packages are available from koji for now

http://koji.fedoraproject.org/koji/buildinfo?buildID=200289

Comment 11 Fedora Update System 2010-10-27 08:09:19 UTC
selinux-policy-3.7.19-69.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/selinux-policy-3.7.19-69.fc13

Comment 12 Fedora Update System 2010-10-28 06:19:48 UTC
selinux-policy-3.7.19-69.fc13 has been pushed to the Fedora 13 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 selinux-policy'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/selinux-policy-3.7.19-69.fc13

Comment 13 Fedora Update System 2010-11-11 22:22:34 UTC
selinux-policy-3.7.19-69.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.