From: guido@trentalancia.net (guido guido) Date: Sat, 13 Aug 2016 18:15:56 +0200 (CEST) Subject: [refpolicy] [PATCH v4] Update the dhcp client and ifconfig parts of the sysnetwork module In-Reply-To: <01b60cc4-bf5a-247b-08c7-9a0642729137@ieee.org> References: <1470694327.13546.1.camel@trentalancia.net> <1470762337.7062.1.camel@trentalancia.net> <1471095487.21480.15.camel@trentalancia.net> <1471095869.21480.17.camel@trentalancia.net> <01b60cc4-bf5a-247b-08c7-9a0642729137@ieee.org> Message-ID: <1074221792.5628.1471104956197.JavaMail.open-xchange@popper04.register.it> To: refpolicy@oss.tresys.com List-Id: refpolicy.oss.tresys.com Hello Chris. > On 13th August 2016 at 16.13 Chris PeBenito wrote: > > > On 08/13/16 09:44, Guido Trentalancia wrote: > > Update the sysnetwork module to add some permissions needed by > > the dhcp client and ifconfig. > > > > Create auxiliary interfaces in the ntp module. > > > > The permission to execute restorecon/setfiles (required by the > > dhclient-script script and granted in a previous version of this > > patch) is not granted, as it does not break the script functioning. > > > > Include revisions from Chris PeBenito. > > > [...] > > > @@ -287,6 +295,7 @@ allow ifconfig_t self:netlink_route_sock > > allow ifconfig_t self:netlink_xfrm_socket create_netlink_socket_perms; > > allow ifconfig_t self:tcp_socket { create ioctl }; > > > > +kernel_load_module(ifconfig_t) > > I missed this earlier but am concerned with this change. There is an > open question on why this is needed when it has > kernel_request_load_module() already (see "ifconfig loads kernel > modules" thread from the beginning of the month). I cannot see the reason why dhcpc_t can call kernel_load_module(), while the ifconfig_t domain cannot... It's triggered, for example, by the following usage: dhclient usb0 so, it believe it tries to load the module for the usb (or other kind of) networking. What do you say ? > > @@ -305,6 +314,8 @@ domain_use_interactive_fds(ifconfig_t) > > files_read_etc_files(ifconfig_t) > > files_read_etc_runtime_files(ifconfig_t) > > > > +files_read_firmware_files(ifconfig_t) > > I still have issues with this (see other thread). I can remove the newly created firmware_t type and grant permissions to read lib_t instead... Regards, Guido