Commit 713c0ecd authored by Sten Spans's avatar Sten Spans Committed by James Morris

security: fix security_file_lock cmd argument

Pass posix-translated lock operations to security_file_lock
when invoked via sys_flock.
Signed-off-by: default avatarSten Spans <Sten_Spans@genua.de>
Signed-off-by: default avatarJames Morris <jmorris@namei.org>
parent 7d45ecaf
...@@ -1591,7 +1591,7 @@ SYSCALL_DEFINE2(flock, unsigned int, fd, unsigned int, cmd) ...@@ -1591,7 +1591,7 @@ SYSCALL_DEFINE2(flock, unsigned int, fd, unsigned int, cmd)
if (can_sleep) if (can_sleep)
lock->fl_flags |= FL_SLEEP; lock->fl_flags |= FL_SLEEP;
error = security_file_lock(filp, cmd); error = security_file_lock(filp, lock->fl_type);
if (error) if (error)
goto out_free; goto out_free;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment