From 69058407ef0079bf919c4ffb0b8464a986772536 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 24 Feb 2004 00:38:39 +0000 Subject: Fixup bad-path error found by gentest. Jeremy. (This used to be commit 63d47f336464080e20e68f21d826e82786b9719e) --- source3/smbd/trans2.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'source3/smbd/trans2.c') 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, ¶ms[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)) -- cgit