r15028: Fix logic error checking valid args to POSIX lock
authorJeremy Allison <jra@samba.org>
Mon, 10 Apr 2006 23:32:05 +0000 (23:32 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:15:57 +0000 (11:15 -0500)
call.
Jeremy.
(This used to be commit 44b0d856ae867d1c407507dcf7940dd39f4f963a)

source3/libsmb/clifile.c

index 80deb3a3320b1211c06195d783c12c6b8cdf1746..46ff8af6d5c1742bb8e9509ced9a81bdf480fe70 100644 (file)
@@ -1148,7 +1148,7 @@ BOOL cli_posix_lock(struct cli_state *cli, int fnum,
                        SMB_BIG_UINT offset, SMB_BIG_UINT len,
                        BOOL wait_lock, enum brl_type lock_type)
 {
-       if (lock_type != READ_LOCK || lock_type != WRITE_LOCK) {
+       if (lock_type != READ_LOCK && lock_type != WRITE_LOCK) {
                return False;
        }
        return cli_posix_lock_internal(cli, fnum, offset, len, wait_lock, lock_type);