Re: [PATCH] ifdef struct task_struct::security

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Alexey Dobriyan ([email protected]):
> For those who don't care about CONFIG_SECURITY.

I'm quite sure we started that way, but the ifdefs were considered
too much of an eyesore.

If this is now acceptable, then the same thing might be considered
for inode->i_security, kern_ipc_perm.security, etc.  Getting rid of
just the task->security seems overly half-hearted.

-serge

> Signed-off-by: Alexey Dobriyan <[email protected]>
> ---
> 
>  include/linux/sched.h |    3 ++-
>  kernel/fork.c         |    2 ++
>  2 files changed, 4 insertions(+), 1 deletion(-)
> 
> --- a/include/linux/sched.h
> +++ b/include/linux/sched.h
> @@ -1086,8 +1086,9 @@ struct task_struct {
>  	int (*notifier)(void *priv);
>  	void *notifier_data;
>  	sigset_t *notifier_mask;
> -	
> +#ifdef CONFIG_SECURITY
>  	void *security;
> +#endif
>  	struct audit_context *audit_context;
>  	seccomp_t seccomp;
>  
> --- a/kernel/fork.c
> +++ b/kernel/fork.c
> @@ -1066,7 +1066,9 @@ static struct task_struct *copy_process(unsigned long clone_flags,
>  	do_posix_clock_monotonic_gettime(&p->start_time);
>  	p->real_start_time = p->start_time;
>  	monotonic_to_bootbased(&p->real_start_time);
> +#ifdef CONFIG_SECURITY
>  	p->security = NULL;
> +#endif
>  	p->io_context = NULL;
>  	p->io_wait = NULL;
>  	p->audit_context = NULL;
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux