summaryrefslogtreecommitdiff
path: root/source3/smbd/reply.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/reply.c')
-rw-r--r--source3/smbd/reply.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 62fd0ea686..646cc79522 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;
}