summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-02-24 00:38:39 +0000
committerJeremy Allison <jra@samba.org>2004-02-24 00:38:39 +0000
commit69058407ef0079bf919c4ffb0b8464a986772536 (patch)
treebcd093fc27a8b3e7d061701be9c2cc735081a5fc /source3
parentb88f446352b27d71a71d61a7151694c468cfe609 (diff)
downloadsamba-69058407ef0079bf919c4ffb0b8464a986772536.tar.gz
samba-69058407ef0079bf919c4ffb0b8464a986772536.tar.bz2
samba-69058407ef0079bf919c4ffb0b8464a986772536.zip
Fixup bad-path error found by gentest.
Jeremy. (This used to be commit 63d47f336464080e20e68f21d826e82786b9719e)
Diffstat (limited to 'source3')
-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))