diff options
author | Jeremy Allison <jra@samba.org> | 1998-09-08 19:21:04 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1998-09-08 19:21:04 +0000 |
commit | 6e0c276ec8b918165a19b3dfc86bc7bef6d1f706 (patch) | |
tree | fb8c41b2af435269dbe4f5019d121b6572ad07d5 /source3/smbd/mangle.c | |
parent | 519a6d5f0ed0d81cf739394c1c8c305f8ae43c87 (diff) | |
download | samba-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/mangle.c')
-rw-r--r-- | source3/smbd/mangle.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/smbd/mangle.c b/source3/smbd/mangle.c index 0a3d3f54eb..f0d5a9d85c 100644 --- a/source3/smbd/mangle.c +++ b/source3/smbd/mangle.c @@ -272,7 +272,7 @@ static BOOL is_illegal_name( char *name ) /* ************************************************************************** ** * Return True if the name *could be* a mangled name. * - * Input: s - A file name. + * Input: s - A path name - in UNIX pathname format. * * Output: True if the name matches the pattern described below in the * notes, else False. @@ -281,7 +281,8 @@ static BOOL is_illegal_name( char *name ) * done separately. This function returns true if the name contains * a magic character followed by excactly two characters from the * basechars list (above), which in turn are followed either by the - * nul (end of string) byte or a dot (extension). + * nul (end of string) byte or a dot (extension) or by a '/' (end of + * a directory name). * * ************************************************************************** ** */ @@ -295,7 +296,7 @@ BOOL is_mangled( char *s ) magic = strchr( s, magic_char ); while( magic && magic[1] && magic[2] ) /* 3 chars, 1st is magic. */ { - if( ('.' == magic[3] || !(magic[3])) /* Ends with '.' or nul? */ + if( ('.' == magic[3] || '/' == magic[3] || !(magic[3])) /* Ends with '.' or nul or '/' ? */ && isbasechar( toupper(magic[1]) ) /* is 2nd char basechar? */ && isbasechar( toupper(magic[2]) ) ) /* is 3rd char basechar? */ return( True ); /* If all above, then true, */ |