summaryrefslogtreecommitdiffstats
path: root/fuse/ulockmgr.c
diff options
context:
space:
mode:
authorDees_Troy <dees_troy@teamw.in>2013-02-06 20:13:00 +0100
committerbigbiff bigbiff <bigbiff@teamw.in>2013-02-07 14:21:17 +0100
commite34c133ec6053025124416a3861f9f4c4f7fd772 (patch)
tree027d856cea0aa7abd29234727ef0924683d4d409 /fuse/ulockmgr.c
parentMerge "Fix misspelling and white space on fix perms" into twrp2.4 (diff)
downloadandroid_bootable_recovery-e34c133ec6053025124416a3861f9f4c4f7fd772.tar
android_bootable_recovery-e34c133ec6053025124416a3861f9f4c4f7fd772.tar.gz
android_bootable_recovery-e34c133ec6053025124416a3861f9f4c4f7fd772.tar.bz2
android_bootable_recovery-e34c133ec6053025124416a3861f9f4c4f7fd772.tar.lz
android_bootable_recovery-e34c133ec6053025124416a3861f9f4c4f7fd772.tar.xz
android_bootable_recovery-e34c133ec6053025124416a3861f9f4c4f7fd772.tar.zst
android_bootable_recovery-e34c133ec6053025124416a3861f9f4c4f7fd772.zip
Diffstat (limited to '')
-rw-r--r--fuse/ulockmgr.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fuse/ulockmgr.c b/fuse/ulockmgr.c
index 4a049d5b2..f0523ae70 100644
--- a/fuse/ulockmgr.c
+++ b/fuse/ulockmgr.c
@@ -400,6 +400,10 @@ int ulockmgr_op(int fd, int cmd, struct flock *lock, const void *owner,
if (cmd != F_GETLK && cmd != F_SETLK && cmd != F_SETLKW)
return -EINVAL;
+ if (lock->l_type != F_RDLCK && lock->l_type != F_WRLCK &&
+ lock->l_type != F_UNLCK)
+ return -EINVAL;
+
if (lock->l_whence != SEEK_SET && lock->l_whence != SEEK_CUR &&
lock->l_whence != SEEK_END)
return -EINVAL;