Re: [RFC] [PATCH] add struct module to mod_reg_security args

From: Greg KH (greg@private)
Date: Sun Jul 17 2005 - 09:19:54 PDT


On Sun, Jul 17, 2005 at 09:33:42AM -0500, serue@private wrote:
> Index: linux-2.6.13-rc3/include/linux/security.h
> ===================================================================
> --- linux-2.6.13-rc3.orig/include/linux/security.h	2005-06-17 14:48:29.000000000 -0500
> +++ linux-2.6.13-rc3/include/linux/security.h	2005-07-15 20:17:14.000000000 -0500
> @@ -32,6 +32,7 @@
>  #include <linux/sched.h>
>  
>  struct ctl_table;
> +struct module;
>  
>  /*
>   * These functions are in security/capability.c and are used
> @@ -1019,6 +1020,7 @@ struct swap_info_struct;
>   * 	allow module stacking.
>   * 	@name contains the name of the security module being stacked.
>   * 	@ops contains a pointer to the struct security_operations of the module to stack.
> + *	@owner is a pointer to the owning module, or NULL if built-in.
>   * @unregister_security:
>   *	remove a stacked module.
>   *	@name contains the name of the security module being unstacked.
> @@ -1204,7 +1206,8 @@ struct security_operations {
>  
>  	/* allow module stacking */
>  	int (*register_security) (const char *name,
> -	                          struct security_operations *ops);
> +	                          struct security_operations *ops,
> +				  struct module *owner);

No, why not just do like all other subsystems, put the struct module *
in the struct security_operations itself?

thanks,

greg k-h



This archive was generated by hypermail 2.1.3 : Sun Jul 17 2005 - 09:21:01 PDT