From ccc54da805983e6ba267a2ec1f50a68e4a9acfec Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 8 Jan 2007 13:05:36 +0000 Subject: [PATCH] r20605: Simplify logic in reply_setatr slightly (This used to be commit f19db8f33ed3749f6b72ae3a4cee83574c606e88) --- source3/smbd/reply.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 62fd0ea6861..646cc795229 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -999,7 +999,7 @@ int reply_setatr(connection_struct *conn, char *inbuf,char *outbuf, int dum_size 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 @@ int reply_setatr(connection_struct *conn, char *inbuf,char *outbuf, int dum_size 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; }