comment doesn't match code

Herb Lewis hlewis at panasas.com
Mon May 21 17:42:01 GMT 2007


in smbd/open.c in the function open_file_ntcreate we have the
following comment and code which contradict.

         /* note that we ignore failure for the following. It is
            basically a hack for NFS, and NFS will never set one of
            these only read them. Nobody but Samba can ever set a deny
            mode and we have already checked our more authoritative
            locking database for permission to set this deny mode. If
            the kernel refuses the operations then the kernel is wrong.
            note that GPFS supports it as well - jmcd */

         ret_flock = SMB_VFS_KERNEL_FLOCK(fsp, fsp->fh->fd, share_access);
         if(ret_flock == -1 ){

                 TALLOC_FREE(lck);
                 fd_close(conn, fsp);
                 file_free(fsp);

                 return NT_STATUS_SHARING_VIOLATION;
         }


More information about the samba-technical mailing list