diff options
| author | James Morris <jmorris@namei.org> | 2011-05-24 22:55:24 +1000 | 
|---|---|---|
| committer | James Morris <jmorris@namei.org> | 2011-05-24 22:55:24 +1000 | 
| commit | 434d42cfd05a7cc452457a81d2029540cba12150 (patch) | |
| tree | 3a6b9b7f9ff2e1b7409dd66c15242b2a75aa4422 /security/commoncap.c | |
| parent | d762f4383100c2a87b1a3f2d678cd3b5425655b4 (diff) | |
| parent | 12a5a2621b1ee14d32beca35304d7c6076a58815 (diff) | |
| download | olio-linux-3.10-434d42cfd05a7cc452457a81d2029540cba12150.tar.xz olio-linux-3.10-434d42cfd05a7cc452457a81d2029540cba12150.zip  | |
Merge branch 'next' into for-linus
Diffstat (limited to 'security/commoncap.c')
| -rw-r--r-- | security/commoncap.c | 13 | 
1 files changed, 4 insertions, 9 deletions
diff --git a/security/commoncap.c b/security/commoncap.c index f20e984ccfb..a93b3b73307 100644 --- a/security/commoncap.c +++ b/security/commoncap.c @@ -529,15 +529,10 @@ skip:  	new->suid = new->fsuid = new->euid;  	new->sgid = new->fsgid = new->egid; -	/* For init, we want to retain the capabilities set in the initial -	 * task.  Thus we skip the usual capability rules -	 */ -	if (!is_global_init(current)) { -		if (effective) -			new->cap_effective = new->cap_permitted; -		else -			cap_clear(new->cap_effective); -	} +	if (effective) +		new->cap_effective = new->cap_permitted; +	else +		cap_clear(new->cap_effective);  	bprm->cap_effective = effective;  	/*  |