From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QvHIz-0003hE-9x for garchives@archives.gentoo.org; Sun, 21 Aug 2011 23:19:49 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7FF0E21C1A1; Sun, 21 Aug 2011 23:19:37 +0000 (UTC) Received: from basement.kutulu.org (187.250.102.97.cfl.res.rr.com [97.102.250.187]) by pigeon.gentoo.org (Postfix) with ESMTP id 7648121C19B for ; Sun, 21 Aug 2011 23:19:16 +0000 (UTC) Received: from localhost (basement.kutulu.org [127.0.0.1]) by basement.kutulu.org (Postfix) with ESMTP id D4A7E12200B for ; Sun, 21 Aug 2011 19:19:15 -0400 (EDT) X-Virus-Scanned: amavisd-new at kutulu.org Received: from basement.kutulu.org ([127.0.0.1]) by localhost (basement.kutulu.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GdHJdKq1SSQc for ; Sun, 21 Aug 2011 19:19:15 -0400 (EDT) Received: from [192.168.69.4] (wombat.kutulu.org [192.168.69.4]) by basement.kutulu.org (Postfix) with ESMTP id 5BBB3122004 for ; Sun, 21 Aug 2011 19:19:15 -0400 (EDT) Message-ID: <4E519275.8090003@kutulu.org> Date: Sun, 21 Aug 2011 19:19:17 -0400 From: Mike Edenfield User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.20) Gecko/20110804 Thunderbird/3.1.12 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-hardened@lists.gentoo.org Reply-to: gentoo-hardened@lists.gentoo.org MIME-Version: 1.0 To: gentoo-hardened@lists.gentoo.org Subject: Re: [gentoo-hardened] SELinux base policy r2 in hardened-dev overlay References: <20110819205148.GA29497@gentoo.org> <20110821100646.GA16371@gentoo.org> <201108211339.15280.mail@smogura.eu> <20110821141808.GA22005@gentoo.org> In-Reply-To: <20110821141808.GA22005@gentoo.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Archives-Salt: X-Archives-Hash: c7a5e5fc10c590c7e43173fb481d17c9 On 8/21/2011 10:18 AM, Sven Vermeulen wrote: > On Sun, Aug 21, 2011 at 01:39:15PM +0200, Rados??aw Smogura wrote: >> I'm not SeLinux guroo, but at eye glance it looks like init (runint) script >> 1. reads contexts/run_init_type (but I think this is done to password >> authentication) >> 2. then it reads and changes to contexts/initrc_context domain. >> >> This is made in policycoreutils-extras/runscript_selinux.c. There are some >> comments about initrc_devpts_t. >> >> Maybe changin 2. will be solution, instead of read contexts/initrc_context >> take context from target script? > > The solution to support_initrc_exec_t must be a policy-based one > afaik. I don't think it'll be too difficult to find (the places within > refpolicy that are offering interfaces just for Gentoo's integrated run_init > are documented), it'll just take some time to get it in proper shape. Is there a specific reason that the domain-specific initrc support cannot be made part of run_init? Instead of reading a single default context from initrc_context, you could instead label, for ex. the init script itself, and have run_init use that instead? ISTM that the reason the existing domain-specific init policy doesn't work is because run_init is doing something unexpected, so it makes sense that fixing run_init would be the correct solution... --Mike