summaryrefslogtreecommitdiff
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
commitccc54da805983e6ba267a2ec1f50a68e4a9acfec (patch)
tree5ea2934709f2ade8bfa58ae370942ce570bdd748
parent395d304f225a855a7c032dd18c12e9fd0b1a284c (diff)
downloadsamba-ccc54da805983e6ba267a2ec1f50a68e4a9acfec.tar.gz
samba-ccc54da805983e6ba267a2ec1f50a68e4a9acfec.tar.bz2
samba-ccc54da805983e6ba267a2ec1f50a68e4a9acfec.zip
r20605: Simplify logic in reply_setatr slightly
(This used to be commit f19db8f33ed3749f6b72ae3a4cee83574c606e88)
-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;
}