summaryrefslogtreecommitdiff
path: root/source3/smbd/filename.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-09-08 19:21:04 +0000
committerJeremy Allison <jra@samba.org>1998-09-08 19:21:04 +0000
commit6e0c276ec8b918165a19b3dfc86bc7bef6d1f706 (patch)
treefb8c41b2af435269dbe4f5019d121b6572ad07d5 /source3/smbd/filename.c
parent519a6d5f0ed0d81cf739394c1c8c305f8ae43c87 (diff)
downloadsamba-6e0c276ec8b918165a19b3dfc86bc7bef6d1f706.tar.gz
samba-6e0c276ec8b918165a19b3dfc86bc7bef6d1f706.tar.bz2
samba-6e0c276ec8b918165a19b3dfc86bc7bef6d1f706.zip
Added back groupname map stuff removed by Andrew's "slash 'n' burn"
tactics :-). Protected by #ifdef until used. Fixed bug in fd_attempt_close() where a pointer to potentially free'd memory was returned. I hate that. Added "blocking locks" as a per-share option for performance testing. Changed is_mangled() so it will return true if called with a pathname and any component of the pathname was mangled (it was already attempting to do this, but not checking for a '/' as end-of-mangle). This should be a better fix for the wierd stat cache bug Andrew identified. Jeremy. (This used to be commit 0de01f45980c7bc261248a9cead972a8d8cbd594)
Diffstat (limited to 'source3/smbd/filename.c')
-rw-r--r--source3/smbd/filename.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c
index a88829de9d..0910e03ee3 100644
--- a/source3/smbd/filename.c
+++ b/source3/smbd/filename.c
@@ -339,7 +339,10 @@ BOOL unix_convert(char *name,connection_struct *conn,char *saved_last_component,
int saved_errno;
BOOL component_was_mangled = False;
BOOL name_has_wildcard = False;
+#if 0
+ /* Andrew's conservative code... JRA. */
extern char magic_char;
+#endif
*dirpath = 0;
*bad_path = False;
@@ -441,9 +444,20 @@ BOOL unix_convert(char *name,connection_struct *conn,char *saved_last_component,
if(strchr(start,'?') || strchr(start,'*'))
name_has_wildcard = True;
+ /*
+ * is_mangled() was changed to look at an entire pathname, not
+ * just a component. JRA.
+ */
+
+ if(is_mangled(start))
+ component_was_mangled = True;
+
+#if 0
+ /* Keep Andrew's conservative code around, just in case. JRA. */
/* this is an extremely conservative test for mangled names. */
if (strchr(start,magic_char))
component_was_mangled = True;
+#endif
/*
* Now we need to recursively match the name against the real