Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 612207 - SELinux prevents chsh from changing shell to mksh or yash
SELinux prevents chsh from changing shell to mksh or yash
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2010-07-07 10:56 EDT by Watanabe, Yuki
Modified: 2010-10-18 21:05 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-10-18 21:05:09 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Watanabe, Yuki 2010-07-07 10:56:37 EDT
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 10:41:36 EDT
What AVC are you seeing?
Comment 2 Miroslav Grepl 2010-07-08 10:44:59 EDT
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 11:18:27 EDT
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 03:52:11 EDT
Fixed in selinux-policy-3.7.19-34.fc13
Comment 5 Watanabe, Yuki 2010-07-09 09:47:28 EDT
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 14:54:42 EDT
Looks like you fixed this in Rawhide but not F13.
Comment 7 Miroslav Grepl 2010-07-13 03:25:14 EDT
Fixed in selinux-policy-3.7.19-36.fc13
Comment 8 Fedora Update System 2010-07-14 10:25:07 EDT
selinux-policy-3.7.19-37.fc13 has been submitted as an update for Fedora 13.
Comment 9 Fedora Update System 2010-07-14 19:07:05 EDT
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-18 21:05:09 EDT
This bug has been fixed. Closing. Thanks!

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