Messages in this thread | | | Date | Tue, 4 Mar 2008 15:07:50 +1100 (EST) | From | James Morris <> | Subject | Re: [PATCH -v5 -mm] LSM: Add security= boot parameter |
| |
On Tue, 4 Mar 2008, Ahmed S. Darwish wrote:
> Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Acked-by: James Morris <jmorris@namei.org>
> + 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 <jmorris@namei.org>
| |