Description of problem: by default context (system_u:object_r:ndc_exec_t) rndc is not able to connect to named (system_u:object_r:named_exec_t). I set contexts by restorecon utility. When I tried set rndc's context with "chcon --reference /usr/sbin/named" all works fine. Version-Release number of selected component (if applicable): rpm -q selinux-policy selinux-policy-2.5.12-5.fc7 How reproducible: always Steps to Reproduce: 1. restorecon /usr/sbin/rndc 2. restorecon /usr/sbin/named 3. try run "rndc status" to get status of named Actual results: see nice output: "rndc: bind socket: permission denied" Expected results: controling server through rndc (server control utility) Additional info: as I wrote upper, after "chcon --reference /usr/sbin/named /usr/sbin/rndc" all works fine.
What avc's were you seeing before the chcon?
This is in log. I'm not selinux expert so problem could be in bind package or my configuration :) type=AVC msg=audit(1177424519.822:42): avc: denied { node_bind } for pid=3864 comm="rndc" scontext=user_u:system_r:ndc_t:s0 tcontext=system_u:object_r:inaddr_any_node_t:s0 tclass=tcp_socket type=SYSCALL msg=audit(1177424519.822:42): arch=c000003e syscall=49 success=no exit=-13 a0=14 a1=55555575ba00 a2=10 a3=0 items=0 ppid=3579 pid=3864 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 comm="rndc" exe="/usr/sbin/rndc" subj=user_u:system_r:ndc_t:s0 key=(null) -A-
Latest policy should have this fixed. selinux-policy-2.6.1-1.fc7
(In reply to comment #3) > Latest policy should have this fixed. > > selinux-policy-2.6.1-1.fc7 Yeah. I've compiled latest selinux-policy from CVS and all works fine. Closing