summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-01-08 13:05:36 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:16:57 -0500
commitf19db8f33ed3749f6b72ae3a4cee83574c606e88 (patch)
treeee2db266aeacc297fffb79f0797803881ef0aa02 /source
parent44f9d25a9026df29fcaae8723ef52b1d3101628b (diff)
downloadsamba-f19db8f33ed3749f6b72ae3a4cee83574c606e88.tar.gz
samba-f19db8f33ed3749f6b72ae3a4cee83574c606e88.tar.xz
samba-f19db8f33ed3749f6b72ae3a4cee83574c606e88.zip
r20605: Simplify logic in reply_setatr slightly
Diffstat (limited to 'source')
-rw-r--r--source/smbd/reply.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/source/smbd/reply.c b/source/smbd/reply.c
index 62fd0ea6861..646cc795229 100644
--- a/source/smbd/reply.c
+++ b/source/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;
}