0 byte lock ranges ARE valid
authorAndrew Tridgell <tridge@samba.org>
Fri, 24 Aug 2001 04:55:28 +0000 (04:55 +0000)
committerAndrew Tridgell <tridge@samba.org>
Fri, 24 Aug 2001 04:55:28 +0000 (04:55 +0000)
(This used to be commit 5498da6664a457e4d64502d37fa887dabd9baaa0)

source3/locking/locking.c

index 80537c8bc1beae2468faf59997b5d70847c1f5c3..81b2e92f68494b4d0c644303df525b6706c80646 100644 (file)
@@ -108,12 +108,9 @@ BOOL do_lock(files_struct *fsp,connection_struct *conn, uint16 lock_pid,
        if (!lp_locking(SNUM(conn)))
                return(True);
 
-       if (count == 0) {
-               *eclass = ERRDOS;
-               *ecode = ERRnoaccess;
-               return False;
-       }
-       
+       /* NOTE! 0 byte long ranges ARE allowed and should be stored  */
+
+
        DEBUG(10,("do_lock: lock type %s start=%.0f len=%.0f requested for file %s\n",
                  lock_type_name(lock_type), (double)offset, (double)count, fsp->fsp_name ));