capability.c (1cdcbec1a3372c0c49c59d292e708fd07b509f18) | capability.c (b6dff3ec5e116e3af6f537d4caedcad6b9e5082a) |
---|---|
1/* 2 * linux/kernel/capability.c 3 * 4 * Copyright (C) 1997 Andrew Main <zefram@fysh.org> 5 * 6 * Integrated into 2.1.97+, Andrew G. Morgan <morgan@kernel.org> 7 * 30 May 2002: Cleanup, Robert M. Love <rml@tech9.net> 8 */ --- 157 unchanged lines hidden (view full) --- 166 * caller is permitted to set the desired effective capabilities. 167 */ 168kernel_cap_t cap_set_effective(const kernel_cap_t pE_new) 169{ 170 kernel_cap_t pE_old; 171 172 spin_lock(&task_capability_lock); 173 | 1/* 2 * linux/kernel/capability.c 3 * 4 * Copyright (C) 1997 Andrew Main <zefram@fysh.org> 5 * 6 * Integrated into 2.1.97+, Andrew G. Morgan <morgan@kernel.org> 7 * 30 May 2002: Cleanup, Robert M. Love <rml@tech9.net> 8 */ --- 157 unchanged lines hidden (view full) --- 166 * caller is permitted to set the desired effective capabilities. 167 */ 168kernel_cap_t cap_set_effective(const kernel_cap_t pE_new) 169{ 170 kernel_cap_t pE_old; 171 172 spin_lock(&task_capability_lock); 173 |
174 pE_old = current->cap_effective; 175 current->cap_effective = pE_new; | 174 pE_old = current->cred->cap_effective; 175 current->cred->cap_effective = pE_new; |
176 177 spin_unlock(&task_capability_lock); 178 179 return pE_old; 180} 181 182EXPORT_SYMBOL(cap_set_effective); 183 --- 164 unchanged lines hidden --- | 176 177 spin_unlock(&task_capability_lock); 178 179 return pE_old; 180} 181 182EXPORT_SYMBOL(cap_set_effective); 183 --- 164 unchanged lines hidden --- |