Description of problem: When starting the samba daemon via the Swat interface, a context of "swat_t" is assigned to smbd. This causes SELinux access constraints. Version-Release number of selected component (if applicable): How reproducible: Very easily Steps to Reproduce: 1. Connect to http://localhost:901 and use Swat to start the smb daemon 2. Connect to the machine remotely via Samba and attempt to access an enabled share (Tested using WinXP access from a KVM virtual machine). Actual results: Access denied. Expected results: Access granted.
So swat directly starts samba or does it use the initrc script?
Judging by the code in startstop.c in the git repository for SWAT, it's started by swat itself: ------------- void start_smbd(void) { pstring binfile; if (geteuid() != 0) return; if (fork()) { return; } slprintf(binfile, sizeof(pstring) - 1, "%s/smbd", dyn_SBINDIR); become_daemon(True, False); execl(binfile, binfile, "-D", NULL); exit(0); } ------------- If you perform a restart using the initrc script, the context becomes "smbd_t" as expected. I don't understand SELinux well enough to know whether this is correctable safely in the policy or whether it needs swat to be modified.
Miroslac could you add samba_domtrans_smb(swat_t) in place of can_exec(swat_t, smbd_exec_t)
Fixed in selinux-policy-3.5.13-55.fc10
This message is a reminder that Fedora 10 is nearing its end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 10. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '10'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 10's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 10 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug to the applicable version. If you are unable to change the version, please add a comment here and someone will do it for you. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Closing as closed in the current release.