Problem copying files from Win2k Novell client to Samba (repost)

Dan Barrett dan.barrett at
Fri Jun 7 06:41:02 GMT 2002


I only observed sd_len==0 from our Novell clietn for NT_TRANSACT_CREATE.  My first attempt at a fix was in call_nt_transact_create(), and it worked for my problem.  So NT_TRANSACT_CREATE was the sd_len==0 for our particular problem.


-----Original Message-----
From: Jeremy Allison [mailto:jra at]
Sent: Thursday, June 06, 2002 9:13 PM
To: Dan Barrett
Cc: Wade Turland; samba-technical at
Subject: Re: Problem copying files from Win2k Novell client to Samba

On Thu, Jun 06, 2002 at 12:40:46PM -0400, Dan Barrett wrote:
> The problem I reported would occur with Samba 2.2.4, but not 2.2.2.  set_sd() in 2.2.4 returns False if the sd_len passed by the client is 0.  This would be okay, except Novell clients apparently set sd_len=0. 
> To fix the novell problem, I changed set_sd() to return True, not False if sd_len==0.  I never got a response on why this code was added to 2.2.4.
> -Dan Barrett
> static BOOL set_sd(files_struct *fsp, char *data, uint32 sd_len, uint32 security_info_sent, int *pdef_class,uint32 *pdef_code)
> {
> 	prs_struct pd;
> 	SEC_DESC *psd = NULL;
> 	TALLOC_CTX *mem_ctx;
> 	BOOL ret;
> 	/* Stock Samba fails if sd_len==0, but some Novell client copies pass SMB requests with valid EA info, but no SD.  We want to allow these types of opens.*/  
> 	if (sd_len == 0) {
> 		DEBUG(5,("set_sd: sd_len==0. Allowing anyway.\n"));
> 		*pdef_class = 0;
> 		*pdef_code = 0;
> 		return True;
> 	}

In what SMB calls do the Novell clients set sd_len == 0 ?
I can see allowing this in the NT_TRANSACT_CREATE call
(which is the same as NTcreateAndX but supposedly with SD
info as well), but not in the nt_transact_set_security_desc
call, whose whole purpose is to set SD's.

Can you give me some more info (ASAP if I'm going to get
this fixed for 2.2.5 please).


More information about the samba-technical mailing list