[linux-cifs-client] Re: Proposed new Unix, POSIX_OPEN/POSIX_UNLINK calls.

Jeremy Allison jra at samba.org
Fri Mar 2 19:25:08 GMT 2007


On Fri, Mar 02, 2007 at 10:51:33AM -0600, Steve French (smfltc) wrote:
> >>
> >>Here's the definition of the data block :
> >>
> >>/* Definition of request data block for SMB_POSIX_UNLINK */
> >>/*
> >>  [2 bytes] flags (defined below).
> >>*/
> >>
> >>#define SMB_POSIX_UNLINK_FILE_TARGET 0
> >>#define SMB_POSIX_UNLINK_DIRECTORY_TARGET 1
> > 
> >
> I am not certain that we (client people) need to know whether we are 
> unlinking a file
> or directory - but it probably is safer (races between the lookup to see 
> if it is a
> directory and rmdir - when the server might change the directory to a file?)
> 
> Also note removing FIFOs, symlinks, device nodes etc. ... how do we handle
> that?

As POSIX - treat as a pasth (ie. use SMB_POSIX_UNLINK_FILE_TARGET
for anything not a directory).

FYI: I think I have a bug in my server posix_unlink code in
that I'm not handling oplock breaks correctly, I intend to
test and fix that today.

Jeremy.


More information about the linux-cifs-client mailing list