summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-02-24 00:38:24 +0000
committerJeremy Allison <jra@samba.org>2004-02-24 00:38:24 +0000
commitad69d4db0a9852c97744602da924d3e1a4611601 (patch)
tree69b1aff4fbca3b384ed978795fbdd3732f311ec9 /source3/smbd
parentbf6eb83a3851278668b0f7883113ad3836a65c23 (diff)
downloadsamba-ad69d4db0a9852c97744602da924d3e1a4611601.tar.gz
samba-ad69d4db0a9852c97744602da924d3e1a4611601.tar.bz2
samba-ad69d4db0a9852c97744602da924d3e1a4611601.zip
Fixup bad-path error found by gentest.
Jeremy. (This used to be commit 55f13d743e78ed8f48bf209e838ea77df3121047)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/trans2.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 605169277d..63130aa8d8 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -2540,9 +2540,6 @@ static int call_trans2setfilepathinfo(connection_struct *conn,
info_level = SVAL(params,0);
srvstr_pull(inbuf, fname, &params[6], sizeof(fname), -1, STR_TERMINATE);
unix_convert(fname,conn,0,&bad_path,&sbuf);
- if(!check_name(fname, conn)) {
- return set_bad_path_error(errno, bad_path, outbuf, ERRDOS,ERRbadpath);
- }
/*
* For CIFS UNIX extensions the target name may not exist.
@@ -2550,8 +2547,13 @@ static int call_trans2setfilepathinfo(connection_struct *conn,
if(!VALID_STAT(sbuf) && !INFO_LEVEL_IS_UNIX(info_level)) {
DEBUG(3,("call_trans2setfilepathinfo: stat of %s failed (%s)\n", fname, strerror(errno)));
- return ERROR_NT(NT_STATUS_OBJECT_NAME_NOT_FOUND);
+ return set_bad_path_error(errno, bad_path, outbuf, ERRDOS,ERRbadpath);
}
+
+ if(!check_name(fname, conn)) {
+ return set_bad_path_error(errno, bad_path, outbuf, ERRDOS,ERRbadpath);
+ }
+
}
if (!CAN_WRITE(conn))