lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120926175136.GB30620@sergelap>
Date:	Wed, 26 Sep 2012 12:51:36 -0500
From:	Serge Hallyn <serge.hallyn@...onical.com>
To:	"Eric W. Biederman" <ebiederm@...ssion.com>
Cc:	linux-security-module@...r.kernel.org,
	Linux Containers <containers@...ts.linux-foundation.org>,
	linux-kernel@...r.kernel.org,
	James Morris <james.l.morris@...cle.com>,
	Eric Paris <eparis@...isplace.org>,
	Stephen Smalley <sds@...ho.nsa.gov>
Subject: Re: [PATCH 04/14] userns: Convert selinux to use kuid and kgid where
 appropriate

Quoting Eric W. Biederman (ebiederm@...ssion.com):
> From: "Eric W. Biederman" <ebiederm@...ssion.com>
> 
> Cc: Stephen Smalley <sds@...ho.nsa.gov>
> Cc: James Morris <james.l.morris@...cle.com>
> Cc: Eric Paris <eparis@...isplace.org>

Acked-by: Serge E. Hallyn <serge.hallyn@...ntu.com>

> Signed-off-by: "Eric W. Biederman" <ebiederm@...ssion.com>
> ---
>  security/selinux/selinuxfs.c   |    6 +++---
>  security/selinux/ss/services.c |    2 +-
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c
> index 298e695..55af8c5 100644
> --- a/security/selinux/selinuxfs.c
> +++ b/security/selinux/selinuxfs.c
> @@ -174,7 +174,7 @@ static ssize_t sel_write_enforce(struct file *file, const char __user *buf,
>  		audit_log(current->audit_context, GFP_KERNEL, AUDIT_MAC_STATUS,
>  			"enforcing=%d old_enforcing=%d auid=%u ses=%u",
>  			new_value, selinux_enforcing,
> -			audit_get_loginuid(current),
> +			from_kuid(&init_user_ns, audit_get_loginuid(current)),
>  			audit_get_sessionid(current));
>  		selinux_enforcing = new_value;
>  		if (selinux_enforcing)
> @@ -305,7 +305,7 @@ static ssize_t sel_write_disable(struct file *file, const char __user *buf,
>  			goto out;
>  		audit_log(current->audit_context, GFP_KERNEL, AUDIT_MAC_STATUS,
>  			"selinux=0 auid=%u ses=%u",
> -			audit_get_loginuid(current),
> +			from_kuid(&init_user_ns, audit_get_loginuid(current)),
>  			audit_get_sessionid(current));
>  	}
>  
> @@ -551,7 +551,7 @@ static ssize_t sel_write_load(struct file *file, const char __user *buf,
>  out1:
>  	audit_log(current->audit_context, GFP_KERNEL, AUDIT_MAC_POLICY_LOAD,
>  		"policy loaded auid=%u ses=%u",
> -		audit_get_loginuid(current),
> +		from_kuid(&init_user_ns, audit_get_loginuid(current)),
>  		audit_get_sessionid(current));
>  out:
>  	mutex_unlock(&sel_mutex);
> diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c
> index 4321b8f..b4feecc 100644
> --- a/security/selinux/ss/services.c
> +++ b/security/selinux/ss/services.c
> @@ -2440,7 +2440,7 @@ int security_set_bools(int len, int *values)
>  				sym_name(&policydb, SYM_BOOLS, i),
>  				!!values[i],
>  				policydb.bool_val_to_struct[i]->state,
> -				audit_get_loginuid(current),
> +				from_kuid(&init_user_ns, audit_get_loginuid(current)),
>  				audit_get_sessionid(current));
>  		}
>  		if (values[i])
> -- 
> 1.7.5.4
> 
> _______________________________________________
> Containers mailing list
> Containers@...ts.linux-foundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/containers
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ