question about code in open.c

Herb Lewis hlewis at panasas.com
Mon Jul 28 17:39:27 GMT 2008


In the file source/smbd/open.c in samba 3.2 we have the following
comment and code which disagree. We need to reword teh comment
to reflect reality.

         /* 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 */

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

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

                         return NT_STATUS_SHARING_VIOLATION;
                 }
         }


More information about the samba-technical mailing list