Bug 612207 - SELinux prevents chsh from changing shell to mksh or yash
Summary: SELinux prevents chsh from changing shell to mksh or yash
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 13
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2010-07-07 14:56 UTC by Watanabe, Yuki
Modified: 2010-10-19 01:05 UTC (History)
3 users (show)

Clone Of:
Last Closed: 2010-10-19 01:05:09 UTC

Attachments (Terms of Use)

Description Watanabe, Yuki 2010-07-07 14:56:37 UTC
Description of problem:
When you try to change your login shell to mksh or yash using the chsh command, SELinux prevents it.

Version-Release number of selected component (if applicable):
mksh.i686             39c-1.fc13
selinux-policy.noarch 3.7.19-33.fc13
yash.i686             2.22-0.3.b0.fc13

How reproducible:
Always when SELinux is enabled.

Steps to Reproduce:
$ sudo yum install mksh yash
$ chsh -s /bin/mksh 
Changing shell for magicant.
Password: [enter password]
chsh: "/bin/mksh" is not executable.
$ chsh -s /bin/yash
Changing shell for magicant.
Password: [enter password]
chsh: "/bin/yash" is not executable.

Additional info:
The situation seems much alike to:

Comment 1 Miroslav Grepl 2010-07-08 14:41:36 UTC
What AVC are you seeing?

Comment 2 Miroslav Grepl 2010-07-08 14:44:59 UTC
If you change the context of the yash shell to shell_exec_t 

chcon -t shell_exec_t /bin/yash

Does it work?

Comment 3 Watanabe, Yuki 2010-07-08 15:18:27 UTC
Just after executing the chsh command, I see AVC alert notification. But when I click the "show" button in the notification, the "SELinux Security Alerts" window says "No alerts to view"...

After doing chcon, chsh successfully changes the shell.

Comment 4 Miroslav Grepl 2010-07-09 07:52:11 UTC
Fixed in selinux-policy-3.7.19-34.fc13

Comment 5 Watanabe, Yuki 2010-07-09 13:47:28 UTC
I'm now trying selinux-policy-3.7.19-35.fc13 and can verify fix for yash, but still get the same error for mksh.

Comment 6 Daniel Walsh 2010-07-12 18:54:42 UTC
Looks like you fixed this in Rawhide but not F13.

Comment 7 Miroslav Grepl 2010-07-13 07:25:14 UTC
Fixed in selinux-policy-3.7.19-36.fc13

Comment 8 Fedora Update System 2010-07-14 14:25:07 UTC
selinux-policy-3.7.19-37.fc13 has been submitted as an update for Fedora 13.

Comment 9 Fedora Update System 2010-07-14 23:07:05 UTC
selinux-policy-3.7.19-37.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: http://admin.fedoraproject.org/updates/selinux-policy-3.7.19-37.fc13

Comment 10 Watanabe, Yuki 2010-10-19 01:05:09 UTC
This bug has been fixed. Closing. Thanks!

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