Special case for "" in getatr?

Jeremy Allison jra at samba.org
Sat Jul 8 20:56:54 GMT 2006


On Sat, Jul 08, 2006 at 10:48:30PM +0200, Volker Lendecke wrote:
> Hi, Jeremy!
> 
> To me it seems that "" is not a special case in w2k3. I can
> set the hidden flag via the GUI (sadly not via setatr), and
> see it in the getatr. What do you think about
> 
> Index: smbd/reply.c
> ===================================================================
> --- smbd/reply.c	(Revision 16881)
> +++ smbd/reply.c	(Arbeitskopie)
> @@ -896,16 +896,7 @@
>  
>  	RESOLVE_DFSPATH(fname, conn, inbuf, outbuf);
>    
> -	/* dos smetimes asks for a stat of "" - it returns a "hidden directory"
> -		under WfWg - weird! */
> -	if (! (*fname)) {
> -		mode = aHIDDEN | aDIR;
> -		if (!CAN_WRITE(conn))
> -			mode |= aRONLY;
> -		size = 0;
> -		mtime = 0;
> -		ok = True;
> -	} else {
> +	{
>  		unix_convert(fname,conn,0,&bad_path,&sbuf);
>  		if (bad_path) {
>  			END_PROFILE(SMBgetatr);

This is *unbelievably* old code (at least 8+ years I'd guess)
so it's probably for DOS 6.x or previous. If W2K3 doesn't do
it any more I'm happy to lose it - we can always put it back
if DOS vmware testing breaks.

Jeremy.


More information about the samba-technical mailing list