Proposed new Unix POSIX_OPEN/POSIX_UNLINK calls.

Jeremy Allison jra at samba.org
Thu Mar 1 20:52:35 GMT 2007


On Thu, Mar 01, 2007 at 12:45:19PM -0800, Jeremy Allison wrote:
> On Tue, Feb 06, 2007 at 04:26:03PM -0800, Jeremy Allison wrote:
> > Here's the (initially coded) spec for the POSIX open and
> > unlink calls.
> >
> > .....
> >
> > For unlink, call TRANSACT2_SETPATHINFO (0x06) call
> > info level :
> > 
> > SMB_POSIX_PATH_UNLINK          0x20A
> > 
> > No extra data is needed or returned.
> 
> I think I need to change the spec for unlink before
> 3.0.25 ships.
> 
> Clients need to be able to determine if they're
> doing unlink() or rmdir().
> 
> Given that, I think we need to add 2 bytes of
> data to the SMB_POSIX_PATH_UNLINK call, defined
> as follows :
> 
> 2 bytes : 0 - delete file, 1 - delete directory.
> 
> No data is returned other than an NTSTATUS code.
> 
> Any opposing thoughts before I change this ?

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




More information about the samba-technical mailing list