summaryrefslogtreecommitdiff
path: root/fs/locks.c
diff options
context:
space:
mode:
authorSten Spans <Sten_Spans@genua.de>2009-07-16 09:41:39 +0200
committerJames Morris <jmorris@namei.org>2009-07-17 07:41:23 +1000
commit713c0ecdb888e9ef6f085e828555455c5916b07f (patch)
treecd07a7efca2c99046f5e0c6ee119b77bcfea9d1b /fs/locks.c
parent7d45ecafb6792ca68da9517969d37d910601845f (diff)
downloadlinux-3.10-713c0ecdb888e9ef6f085e828555455c5916b07f.tar.gz
linux-3.10-713c0ecdb888e9ef6f085e828555455c5916b07f.tar.bz2
linux-3.10-713c0ecdb888e9ef6f085e828555455c5916b07f.zip
security: fix security_file_lock cmd argument
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>
Diffstat (limited to 'fs/locks.c')
-rw-r--r--fs/locks.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/locks.c b/fs/locks.c
index b6440f52178..52366e877d7 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -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;