diff options
Diffstat (limited to 'fs/exec.c')
-rw-r--r-- | fs/exec.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1083,14 +1083,14 @@ EXPORT_SYMBOL(setup_new_exec); | |||
1083 | */ | 1083 | */ |
1084 | int prepare_bprm_creds(struct linux_binprm *bprm) | 1084 | int prepare_bprm_creds(struct linux_binprm *bprm) |
1085 | { | 1085 | { |
1086 | if (mutex_lock_interruptible(¤t->cred_guard_mutex)) | 1086 | if (mutex_lock_interruptible(¤t->signal->cred_guard_mutex)) |
1087 | return -ERESTARTNOINTR; | 1087 | return -ERESTARTNOINTR; |
1088 | 1088 | ||
1089 | bprm->cred = prepare_exec_creds(); | 1089 | bprm->cred = prepare_exec_creds(); |
1090 | if (likely(bprm->cred)) | 1090 | if (likely(bprm->cred)) |
1091 | return 0; | 1091 | return 0; |
1092 | 1092 | ||
1093 | mutex_unlock(¤t->cred_guard_mutex); | 1093 | mutex_unlock(¤t->signal->cred_guard_mutex); |
1094 | return -ENOMEM; | 1094 | return -ENOMEM; |
1095 | } | 1095 | } |
1096 | 1096 | ||
@@ -1098,7 +1098,7 @@ void free_bprm(struct linux_binprm *bprm) | |||
1098 | { | 1098 | { |
1099 | free_arg_pages(bprm); | 1099 | free_arg_pages(bprm); |
1100 | if (bprm->cred) { | 1100 | if (bprm->cred) { |
1101 | mutex_unlock(¤t->cred_guard_mutex); | 1101 | mutex_unlock(¤t->signal->cred_guard_mutex); |
1102 | abort_creds(bprm->cred); | 1102 | abort_creds(bprm->cred); |
1103 | } | 1103 | } |
1104 | kfree(bprm); | 1104 | kfree(bprm); |
@@ -1119,13 +1119,13 @@ void install_exec_creds(struct linux_binprm *bprm) | |||
1119 | * credentials; any time after this it may be unlocked. | 1119 | * credentials; any time after this it may be unlocked. |
1120 | */ | 1120 | */ |
1121 | security_bprm_committed_creds(bprm); | 1121 | security_bprm_committed_creds(bprm); |
1122 | mutex_unlock(¤t->cred_guard_mutex); | 1122 | mutex_unlock(¤t->signal->cred_guard_mutex); |
1123 | } | 1123 | } |
1124 | EXPORT_SYMBOL(install_exec_creds); | 1124 | EXPORT_SYMBOL(install_exec_creds); |
1125 | 1125 | ||
1126 | /* | 1126 | /* |
1127 | * determine how safe it is to execute the proposed program | 1127 | * determine how safe it is to execute the proposed program |
1128 | * - the caller must hold current->cred_guard_mutex to protect against | 1128 | * - the caller must hold ->cred_guard_mutex to protect against |
1129 | * PTRACE_ATTACH | 1129 | * PTRACE_ATTACH |
1130 | */ | 1130 | */ |
1131 | int check_unsafe_exec(struct linux_binprm *bprm) | 1131 | int check_unsafe_exec(struct linux_binprm *bprm) |