diff options
Diffstat (limited to 'security')
-rw-r--r-- | security/keys/keyctl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/security/keys/keyctl.c b/security/keys/keyctl.c index 3868c6700b58..60924f6a52db 100644 --- a/security/keys/keyctl.c +++ b/security/keys/keyctl.c | |||
@@ -1305,7 +1305,8 @@ long keyctl_session_to_parent(void) | |||
1305 | goto not_permitted; | 1305 | goto not_permitted; |
1306 | 1306 | ||
1307 | /* the keyrings must have the same UID */ | 1307 | /* the keyrings must have the same UID */ |
1308 | if (pcred->tgcred->session_keyring->uid != mycred->euid || | 1308 | if ((pcred->tgcred->session_keyring && |
1309 | pcred->tgcred->session_keyring->uid != mycred->euid) || | ||
1309 | mycred->tgcred->session_keyring->uid != mycred->euid) | 1310 | mycred->tgcred->session_keyring->uid != mycred->euid) |
1310 | goto not_permitted; | 1311 | goto not_permitted; |
1311 | 1312 | ||