Skip to content

Commit

Permalink
security: fix security_file_lock cmd argument
Browse files Browse the repository at this point in the history
Pass posix-translated lock operations to security_file_lock
when invoked via sys_flock.

Signed-off-by: Sten Spans <Sten_Spans@genua.de>
Signed-off-by: James Morris <jmorris@namei.org>
  • Loading branch information
Sten Spans authored and James Morris committed Jul 16, 2009
1 parent 7d45eca commit 713c0ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/locks.c
Original file line number Diff line number Diff line change
Expand Up @@ -1591,7 +1591,7 @@ SYSCALL_DEFINE2(flock, unsigned int, fd, unsigned int, cmd)
if (can_sleep)
lock->fl_flags |= FL_SLEEP;

error = security_file_lock(filp, cmd);
error = security_file_lock(filp, lock->fl_type);
if (error)
goto out_free;

Expand Down

0 comments on commit 713c0ec

Please sign in to comment.