summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-07-10 20:03:09 +0000
committerJeremy Allison <jra@samba.org>1998-07-10 20:03:09 +0000
commit5f4be1498f7c907a539fe9b5998dfbcaa9e20e20 (patch)
tree00b678a000f536a5cfa1fddaf15b2ae4ea01780e
parent7a8d0a4ed4e07090bfe776b5544712274d2426e4 (diff)
downloadsamba-5f4be1498f7c907a539fe9b5998dfbcaa9e20e20.tar.gz
samba-5f4be1498f7c907a539fe9b5998dfbcaa9e20e20.tar.xz
samba-5f4be1498f7c907a539fe9b5998dfbcaa9e20e20.zip
Fix for bug PR#8294 reported by <detlef.lammermann@er.materna.de>
- the Files array was storing the 'dos_to_unix' translated name, rather than the untranslated name. This could case problems when the name was run through dos_to_unix again. Jeremy.
-rw-r--r--source/lib/util.c2
-rw-r--r--source/smbd/server.c9
2 files changed, 9 insertions, 2 deletions
diff --git a/source/lib/util.c b/source/lib/util.c
index 750ca0f3ab4..2bd7636fb06 100644
--- a/source/lib/util.c
+++ b/source/lib/util.c
@@ -234,7 +234,7 @@ static void check_log_size(void)
pstring name;
fclose(dbf); dbf = NULL;
slprintf(name,sizeof(name)-1,"%s.old",debugf);
- sys_rename(debugf,name);
+ rename(debugf,name);
reopen_logs();
}
}
diff --git a/source/smbd/server.c b/source/smbd/server.c
index 300e8d28e80..e167941ccb3 100644
--- a/source/smbd/server.c
+++ b/source/smbd/server.c
@@ -1512,7 +1512,14 @@ static void open_file(int fnum,int cnum,char *fname1,int flags,int mode, struct
fsp->granted_oplock = False;
fsp->sent_oplock_break = False;
fsp->cnum = cnum;
- string_set(&fsp->name,dos_to_unix(fname,False));
+ /*
+ * Note that the file name here is the *untranslated* name
+ * ie. it is still in the DOS codepage sent from the client.
+ * All use of this filename will pass though the sys_xxxx
+ * functions which will do the dos_to_unix translation before
+ * mapping into a UNIX filename. JRA.
+ */
+ string_set(&fsp->name,fname);
fsp->wbmpx_ptr = NULL;
/*