[SCM] Samba Shared Repository - branch master updated
Jeremy Allison
jra at samba.org
Tue Jun 9 13:01:10 MDT 2015
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 <slow at samba.org>
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 <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Tue Jun 9 21:00:02 CEST 2015 on sn-devel-104
commit 1c60dc5c3252685d51324481063461f60cf968fe
Author: Ralph Boehme <slow at samba.org>
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 <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
-----------------------------------------------------------------------
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
More information about the samba-cvs
mailing list