Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760540AbYCDEKF (ORCPT ); Mon, 3 Mar 2008 23:10:05 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754901AbYCDEJx (ORCPT ); Mon, 3 Mar 2008 23:09:53 -0500 Received: from namei.org ([69.55.235.186]:52626 "EHLO us.intercode.com.au" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754162AbYCDEJw (ORCPT ); Mon, 3 Mar 2008 23:09:52 -0500 Date: Tue, 4 Mar 2008 15:07:50 +1100 (EST) From: James Morris X-X-Sender: jmorris@us.intercode.com.au To: "Ahmed S. Darwish" cc: Stephen Smalley , Casey Schaufler , Adrian Bunk , Chris Wright , Eric Paris , Alexey Dobriyan , LKML , LSM-ML , Anrew Morton Subject: Re: [PATCH -v5 -mm] LSM: Add security= boot parameter In-Reply-To: <20080304030407.GA25686@ubuntu> Message-ID: References: <20080301211108.GF25835@cs181133002.pp.htv.fi> <674864.46980.qm@web36615.mail.mud.yahoo.com> <20080301232708.GA625@ubuntu> <20080302074912.GA3215@ubuntu> <20080302105946.GA6406@ubuntu> <20080303153510.GA6963@ubuntu> <1204559642.23738.63.camel@moss-spartans.epoch.ncsc.mil> <20080303212433.GA12998@ubuntu> <20080304030407.GA25686@ubuntu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 933 Lines: 34 On Tue, 4 Mar 2008, Ahmed S. Darwish wrote: > Signed-off-by: Ahmed S. Darwish Acked-by: James Morris > + int rc = 1; > + > + spin_lock(&chosen_lsm_lock); > + if (!*chosen_lsm) > + strncpy(chosen_lsm, ops->name, SECURITY_NAME_MAX); > + else if (strncmp(ops->name, chosen_lsm, SECURITY_NAME_MAX)) > + rc = 0; > + spin_unlock(&chosen_lsm_lock); > + > + if (rc) > + printk(KERN_INFO "Security: Loading '%s' security module.\n", > + ops->name); > + > + return rc; Possibly consider using 0 for success and -EBUSY on failure (but not a showstopper for me, as it's not really an "error"). - James -- James Morris -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/