From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934567Ab3BMRYp (ORCPT ); Wed, 13 Feb 2013 12:24:45 -0500 Received: from mx1.redhat.com ([209.132.183.28]:20643 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934457Ab3BMRYm (ORCPT ); Wed, 13 Feb 2013 12:24:42 -0500 Date: Wed, 13 Feb 2013 10:30:14 -0500 From: Vivek Goyal To: "Kasatkin, Dmitry" Cc: Mimi Zohar , linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] ima: Support appraise_type=imasig_optional Message-ID: <20130213153013.GB6750@redhat.com> References: <1360620614.3524.223.camel@falcor1.watson.ibm.com> <20130212142636.GA23410@redhat.com> <1360689247.3524.275.camel@falcor1.watson.ibm.com> <20130212185203.GA29958@redhat.com> <20130212185725.GC23410@redhat.com> <20130213132920.GA3540@redhat.com> <20130213143807.GC3540@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 13, 2013 at 05:26:27PM +0200, Kasatkin, Dmitry wrote: > On Wed, Feb 13, 2013 at 4:38 PM, Vivek Goyal wrote: > > On Wed, Feb 13, 2013 at 03:36:45PM +0200, Kasatkin, Dmitry wrote: > >> It should not be the only line in the policy. > >> Can you share full policy? > > > > I verified by putting some printk. There is only single rule in > > ima_policy_rules list after I have updated the rules through "policy" > > file. > > > > echo "appraise fowner=0 func=BPRM_CHECK appraise_type=imasig_optional" > > > /sys/kernel/security/policy > > There is a default policy which has several rules. > > And when you do your "echo" you will replace all rules with that single rule. > But ok, you have one rule only and it is fine to have even a single rule... Yep, I got that. Default policy gets overruled when a new policy is loaded. In secureboot mode, somehow above rule needs to take effect by default. One option would be that kernel can enforce above rule. (I guess by adding it to both default_list as well as policy list). Thanks Vivek