RE: delete on close problems(Content Filtered by PrivateArk)

2003-01-06 Thread Nir Livni
I've been tryin' to do this with Win2K.
Here are the results:

Scenario:
User A opens for delete on close, and then user B opens for read

Samba: User B fails
Win2K: User B successful

I used win2k clients that run 
CreateFile(GENERIC_READ ,... , SHARE_READ | SHARE_DELETE ,...,
FILE_DELETE_ON_CLOSE , ...)  for user A CreateFile(GENERIC_READ ,... ,
SHARE_READ | SHARE_DELETE ,..., 0 , ...) for user B

THEY DO NOT BEHAVE THE SAME WAY!

Now, the second thing is, if we take a DIFFERENT scenario,
Where user A opens for read
Then user B opens for read
Then user A causes trans2setpathinfo and sets the delete_on_close bit in
samba
When user B closes the file, it MIGHT be deleted, although user B did not
open it for delete on close, because the check
For delete_on_close relies on the share_entry, and it does not check if the
pid that marked delete_on_close is the pid that now closes the file.


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Monday, January 06, 2003 7:00 PM
To: Nir Livni
Cc: 'Simo Sorce'; [EMAIL PROTECTED]
Subject: Re: delete on close problems(Content Filtered by PrivateArk)


On Mon, Jan 06, 2003 at 03:14:51PM +0200, Nir Livni wrote:
> Samba does not allow user B to open the file for read after user A has 
> opened it for delete_on_close. NT/2K server allows it.
> 
> My question is why samba allows user A to open delete_on_close after 
> user B opens for read, And does not allow user B open for read after 
> user A opens for delete_on_close.

Because "that's what W2K does" :-). Seriously, check out the torture tester
which tries to determine the exact delete-on-close semantics. Samba just
mimics the W2K ones.

Jeremy.



Re: delete on close problems(Content Filtered by PrivateArk)

2003-01-06 Thread jra
On Mon, Jan 06, 2003 at 03:14:51PM +0200, Nir Livni wrote:
> Samba does not allow user B to open the file for read after user A has
> opened it for delete_on_close.
> NT/2K server allows it.
> 
> My question is why samba allows user A to open delete_on_close after user B
> opens for read,
> And does not allow user B open for read after user A opens for
> delete_on_close.

Because "that's what W2K does" :-). Seriously, check out the torture
tester which tries to determine the exact delete-on-close semantics.
Samba just mimics the W2K ones.

Jeremy.



RE: delete on close problems(Content Filtered by PrivateArk)

2003-01-06 Thread Nir Livni
Samba does not allow user B to open the file for read after user A has
opened it for delete_on_close.
NT/2K server allows it.

My question is why samba allows user A to open delete_on_close after user B
opens for read,
And does not allow user B open for read after user A opens for
delete_on_close.


-Original Message-
From: Simo Sorce [mailto:[EMAIL PROTECTED]] 
Sent: Monday, January 06, 2003 3:03 PM
To: Nir Livni
Cc: [EMAIL PROTECTED]
Subject: Re: delete on close problems(Content Filtered by PrivateArk)


On Mon, 2003-01-06 at 13:48, Nir Livni wrote: 
> if user B opens the file for read (and SHARE_READ | SHARE_DELETE) and 
> only then user A opens the file for DELETE_ON_CLOSE, both open 
> requests succeed.
>  
> 1. Is this behaviour normal ?

Unfortunately there's no way to tell something is normal if not testing the
same against an NT/2k server. If the same happens there, then it is
"normal".

Simo.

-- 
Simo Sorce - [EMAIL PROTECTED]
Xsec s.r.l.
via Durando 10 Ed. G - 20158 - Milano
tel. +39 02 2399 7130 - fax: +39 02 700 442 399

<>