Skip to contentSkip to conversation

Let dhcp use init fds

refpolicy Martin Orr 2 participants 3 messages Jun 25, 2008 – Aug 7, 2008 SELinux security module

lore
Share & tools
lore

Martin Orr

author
#0 lore raw

Without this patch, I see no output from dhclient when it is run during boot. There is no avc message because it is dontaudited in init_daemon_domain.

modules/system/sysnetwork.te renamed from modules/system/sysnetwork.te.orig +1 -0
Index: policy/modules/system/sysnetwork.te
===================================================================
@@ -126,6 +126,7 @@
 files_dontaudit_search_locks(dhcpc_t)
 
 init_rw_utmp(dhcpc_t)
+init_use_fds(dhcpc_t)
 
 logging_send_syslog_msg(dhcpc_t)
 
Signature · 6 lines
Martin Orr

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#1 lore raw
Quoted 8 lines · Martin Orr

Without this patch, I see no output from dhclient when it is run during boot. There is no avc message because it is dontaudited in init_daemon_domain.

Index: policy/modules/system/sysnetwork.te
===================================================================

modules/system/sysnetwork.te line 131

Quoted 6 lines
modules/system/sysnetwork.te renamed from modules/system/sysnetwork.te.orig +1 -0
@@ -126,6 +126,7 @@
 files_dontaudit_search_locks(dhcpc_t)
 
 init_rw_utmp(dhcpc_t)
+init_use_fds(dhcpc_t)
 
 logging_send_syslog_msg(dhcpc_t)

I would think that allowing it to write to the console would be required to make this work too. If thats the case I'm not sure we want it; I don't think we want daemons writing to the console.

Signature · 9 lines
Chris PeBenito
Tresys Technology, LLC
(410) 290-1411 x150


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
author
#2 lore raw
Quoted 11 lines · Christopher J. PeBenito
Quoted 10 lines · Martin Orr

Without this patch, I see no output from dhclient when it is run during boot. There is no avc message because it is dontaudited in init_daemon_domain.

Index: policy/modules/system/sysnetwork.te
===================================================================

modules/system/sysnetwork.te renamed from modules/system/sysnetwork.te.orig +0 -0
@@ -126,6 +126,7 @@
 files_dontaudit_search_locks(dhcpc_t)
 
Quoted 8 lines

modules/system/sysnetwork.te line 131

Quoted 4 lines
modules/system/sysnetwork.te renamed from modules/system/sysnetwork.te.orig +1 -0
 init_rw_utmp(dhcpc_t)
+init_use_fds(dhcpc_t)
 
 logging_send_syslog_msg(dhcpc_t)

I would think that allowing it to write to the console would be required to make this work too. If thats the case I'm not sure we want it; I don't think we want daemons writing to the console.

That puzzled me too, and I tracked it down to logging_send_syslog_msg:

	# cjp: this should most likely be removed:
	term_use_console($1)

I want messages from dhcp specifically to appear on the console, because it takes a long time and can fail e.g. if I knocked the network cable loose, but I suppose that's not enough reason to put it in refpolicy, and I can keep it in my local policy quite happily.

Signature · 6 lines
Martin Orr

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.