The branch, master has been updated
       via  0615b72 smbd/trans2: add a useful diagnostic for files with bad 
encoding
       via  1c60dc5 lib/util/charset: fix conversion failure logging
      from  b26a144 vfs_fruit: add option veto_appledouble

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 0615b72a6b62d590831f1c24c5678dd29b9a2338
Author: Ralph Boehme <[email protected]>
Date:   Wed Jun 3 17:07:46 2015 +0200

    smbd/trans2: add a useful diagnostic for files with bad encoding
    
    Catch conversion error and log the path of the offending file.
    
    Signed-off-by: Ralph Boehme <[email protected]>
    Reviewed-by: Jeremy Allison <[email protected]>
    
    Autobuild-User(master): Jeremy Allison <[email protected]>
    Autobuild-Date(master): Tue Jun  9 21:00:02 CEST 2015 on sn-devel-104

commit 1c60dc5c3252685d51324481063461f60cf968fe
Author: Ralph Boehme <[email protected]>
Date:   Wed Jun 3 16:58:22 2015 +0200

    lib/util/charset: fix conversion failure logging
    
    Move catch-all debug statement with loglevel 0 from behind the switch
    clause into the switch clause as default case. Fixes an issue that
    resulted in the log being flooded with level 0 messages in case someone
    put a file with an illegal UTF8 encoding (eg '\xA0test') on the server.
    
    Signed-off-by: Ralph Boehme <[email protected]>
    Reviewed-by: Jeremy Allison <[email protected]>

-----------------------------------------------------------------------

Summary of changes:
 lib/util/charset/convert_string.c | 4 +++-
 source3/smbd/trans2.c             | 4 ++++
 2 files changed, 7 insertions(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/lib/util/charset/convert_string.c 
b/lib/util/charset/convert_string.c
index 2e66680..50065f8 100644
--- a/lib/util/charset/convert_string.c
+++ b/lib/util/charset/convert_string.c
@@ -434,8 +434,10 @@ bool convert_string_talloc_handle(TALLOC_CTX *ctx, struct 
smb_iconv_handle *ic,
                                reason="Illegal multibyte sequence";
                                DEBUG(3,("convert_string_talloc: Conversion 
error: %s(%s)\n",reason,inbuf));
                                break;
+                       default:
+                               DEBUG(0,("Conversion error: 
%s(%s)\n",reason,inbuf));
+                               break;
                }
-               DEBUG(0,("Conversion error: %s(%s)\n",reason,inbuf));
                /* smb_panic(reason); */
                TALLOC_FREE(ob);
                return false;
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 6c77e85..e518c7b 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -2374,6 +2374,10 @@ NTSTATUS smbd_dirptr_lanman2_entry(TALLOC_CTX *ctx,
                                     ppdata,
                                     end_data,
                                     &last_entry_off);
+       if (NT_STATUS_EQUAL(status, NT_STATUS_ILLEGAL_CHARACTER)) {
+               DEBUG(1,("Conversion error: illegal character: %s\n",
+                        smb_fname_str_dbg(smb_fname)));
+       }
        TALLOC_FREE(fname);
        TALLOC_FREE(smb_fname);
        if (NT_STATUS_EQUAL(status, STATUS_MORE_ENTRIES)) {


-- 
Samba Shared Repository

Reply via email to