Proposed new Unix POSIX_OPEN/POSIX_UNLINK calls.

James Peach jorgar at gmail.com
Thu Mar 1 21:32:33 GMT 2007


On 01/03/07, Jeremy Allison <jra at samba.org> wrote:
> 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

Sounds fine to me. I assume that if the pathname or file handle does
not match the requested target you will get an error?

-- 
James Peach | jorgar at gmail.com


More information about the samba-technical mailing list