mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 23:10:58 +00:00
STABLE14101-linux26-defer-cred-changing-20090511
LICENSE IPL10
FIXES 124737
Newer Linux kernels differentiate between the real and effective
credentials of a process, and prevent a process's credentials from being
change when the effective credentials have been set to a different value.
When AFS notices a keyring PAG exists but no group-based PAG does, the
attempt to rectify this, if done in a VFS call (which changes effective creds)
triggers this issue. We defer the change to the groups to avoid it.
(cherry picked from commit 7d530b9080
)
This commit is contained in:
parent
c88e2778d3
commit
a6403c0134
@ -104,6 +104,12 @@ crset(cred_t * cr)
|
|||||||
#if defined(STRUCT_TASK_HAS_CRED)
|
#if defined(STRUCT_TASK_HAS_CRED)
|
||||||
struct cred *new_creds;
|
struct cred *new_creds;
|
||||||
|
|
||||||
|
/* If our current task doesn't have identical real and effective
|
||||||
|
* credentials, commit_cred won't let us change them, so we just
|
||||||
|
* bail here.
|
||||||
|
*/
|
||||||
|
if (current->cred != current->real_cred)
|
||||||
|
return;
|
||||||
new_creds = prepare_creds();
|
new_creds = prepare_creds();
|
||||||
new_creds->fsuid = cr->cr_uid;
|
new_creds->fsuid = cr->cr_uid;
|
||||||
new_creds->uid = cr->cr_ruid;
|
new_creds->uid = cr->cr_ruid;
|
||||||
|
Loading…
Reference in New Issue
Block a user