diff options
Diffstat (limited to 'fs/fcntl.c')
-rw-r--r-- | fs/fcntl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/fcntl.c b/fs/fcntl.c index 63964d863ad6..c594cc0e40fb 100644 --- a/fs/fcntl.c +++ b/fs/fcntl.c | |||
@@ -205,13 +205,14 @@ static void f_modown(struct file *filp, struct pid *pid, enum pid_type type, | |||
205 | int __f_setown(struct file *filp, struct pid *pid, enum pid_type type, | 205 | int __f_setown(struct file *filp, struct pid *pid, enum pid_type type, |
206 | int force) | 206 | int force) |
207 | { | 207 | { |
208 | const struct cred *cred = current_cred(); | ||
208 | int err; | 209 | int err; |
209 | 210 | ||
210 | err = security_file_set_fowner(filp); | 211 | err = security_file_set_fowner(filp); |
211 | if (err) | 212 | if (err) |
212 | return err; | 213 | return err; |
213 | 214 | ||
214 | f_modown(filp, pid, type, current_uid(), current_euid(), force); | 215 | f_modown(filp, pid, type, cred->uid, cred->euid, force); |
215 | return 0; | 216 | return 0; |
216 | } | 217 | } |
217 | EXPORT_SYMBOL(__f_setown); | 218 | EXPORT_SYMBOL(__f_setown); |