svn commit: samba r20605 - in branches/SAMBA_3_0/source/smbd: .

vlendec at samba.org vlendec at samba.org
Mon Jan 8 13:05:36 GMT 2007


Author: vlendec
Date: 2007-01-08 13:05:36 +0000 (Mon, 08 Jan 2007)
New Revision: 20605

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=20605

Log:
Simplify logic in reply_setatr slightly
Modified:
   branches/SAMBA_3_0/source/smbd/reply.c


Changeset:
Modified: branches/SAMBA_3_0/source/smbd/reply.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/reply.c	2007-01-08 08:09:29 UTC (rev 20604)
+++ branches/SAMBA_3_0/source/smbd/reply.c	2007-01-08 13:05:36 UTC (rev 20605)
@@ -999,7 +999,7 @@
 	RESOLVE_DFSPATH(fname, conn, inbuf, outbuf);
   
 	unix_convert(fname,conn,0,&bad_path,&sbuf);
-	if (bad_path) {
+	if (bad_path || !check_name(fname, conn)) {
 		END_PROFILE(SMBsetatr);
 		return ERROR_NT(NT_STATUS_OBJECT_PATH_NOT_FOUND);
 	}
@@ -1022,9 +1022,7 @@
 		else
 			mode &= ~aDIR;
 
-		if (check_name(fname,conn)) {
-			ok = (file_set_dosmode(conn,fname,mode,&sbuf,False) == 0);
-		}
+		ok = (file_set_dosmode(conn,fname,mode,&sbuf,False) == 0);
 	} else {
 		ok = True;
 	}



More information about the samba-cvs mailing list