summaryrefslogtreecommitdiff
path: root/source3/smbd/server.c
diff options
context:
space:
mode:
authorSamba Release Account <samba-bugs@samba.org>1997-02-11 22:53:29 +0000
committerSamba Release Account <samba-bugs@samba.org>1997-02-11 22:53:29 +0000
commit8bd0dbb1af535466018b7ae3e4f7f042d493e145 (patch)
treee6aea313b53924182f95ec2511186fda325dfb6d /source3/smbd/server.c
parent25ca2fd3d36382107e5443d64a6bf35fe7c47cca (diff)
downloadsamba-8bd0dbb1af535466018b7ae3e4f7f042d493e145.tar.gz
samba-8bd0dbb1af535466018b7ae3e4f7f042d493e145.tar.bz2
samba-8bd0dbb1af535466018b7ae3e4f7f042d493e145.zip
Replaced YOST code with more functionally equivalent code that
changes a bit less. Also added fix to tricky reply_mv case. jra@cygnus.com (This used to be commit f22ac13b1423186d463c9fc5b3588a3dcbd7bc1c)
Diffstat (limited to 'source3/smbd/server.c')
-rw-r--r--source3/smbd/server.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 5ff60c6c6c..4f3ee0fd0b 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -300,7 +300,7 @@ static BOOL mangled_equal(char *name1, char *name2)
{
pstring tmpname;
- if (is_8_3(name2))
+ if (is_8_3(name2, True))
return(False);
strcpy(tmpname,name2);
@@ -398,18 +398,29 @@ BOOL unix_convert(char *name,int cnum,pstring saved_last_component)
unix_format(name);
unix_clean_name(name);
- if (!case_sensitive &&
- (!case_preserve || (is_8_3(name) && !short_case_preserve)))
- strnorm(name);
-
/* names must be relative to the root of the service - trim any leading /.
also trim trailing /'s */
trim_string(name,"/","/");
+ /*
+ * Ensure saved_last_component is valid even if file exists.
+ */
+ if(saved_last_component) {
+ end = strrchr(name, '/');
+ if(end)
+ strcpy(saved_last_component, end + 1);
+ else
+ strcpy(saved_last_component, name);
+ }
+
+ if (!case_sensitive &&
+ (!case_preserve || (is_8_3(name, False) && !short_case_preserve)))
+ strnorm(name);
+
/* check if it's a printer file */
if (Connections[cnum].printer)
{
- if ((! *name) || strchr(name,'/') || !is_8_3(name))
+ if ((! *name) || strchr(name,'/') || !is_8_3(name, True))
{
char *s;
fstring name2;
@@ -422,17 +433,6 @@ BOOL unix_convert(char *name,int cnum,pstring saved_last_component)
return(True);
}
- /*
- * Ensure saved_last_component is valid even if file exists.
- */
- if(saved_last_component) {
- end = strrchr(name, '/');
- if(end)
- strcpy(saved_last_component, end + 1);
- else
- strcpy(saved_last_component, name);
- }
-
/* stat the name - if it exists then we are all done! */
if (sys_stat(name,&st) == 0)
return(True);