[SCM] Samba Shared Repository - branch master updated
Jeremy Allison
jra at samba.org
Wed Aug 22 12:39:02 MDT 2012
The branch, master has been updated
via 63ea428 Remove align_string(). No longer used.
via 7eee494 Fix bug in SMB_FIND_INFO_STANDARD parsing found by Volker.
from 1219eaf s4-python: Complete python bindings for idmap.idl
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 63ea42853cbc6cdfec4fe6f8aea8b717e889237c
Author: Jeremy Allison <jra at samba.org>
Date: Tue Aug 21 15:48:38 2012 -0700
Remove align_string(). No longer used.
Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Wed Aug 22 20:38:50 CEST 2012 on sn-devel-104
commit 7eee4947f30ba1526fadcb3157999e03c0b105e7
Author: Jeremy Allison <jra at samba.org>
Date: Tue Aug 21 15:46:54 2012 -0700
Fix bug in SMB_FIND_INFO_STANDARD parsing found by Volker.
The function align_string() is now broken as base_ptr no longer
points at the start of the SMB data packet, but
at the start of the returned TRANS2 data area.
Replace it with a check for FLAGS2_UNICODE_STRINGS and
a call to ucs2_align().
-----------------------------------------------------------------------
Summary of changes:
source3/include/proto.h | 1 -
source3/lib/charcnv.c | 11 -----------
source3/libsmb/clilist.c | 4 +++-
3 files changed, 3 insertions(+), 13 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 00dbab8..3635759 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -83,7 +83,6 @@ size_t pull_string_talloc(TALLOC_CTX *ctx,
const void *src,
size_t src_len,
int flags);
-size_t align_string(const void *base_ptr, const char *p, int flags);
size_t dos_PutUniCode(char *dst,const char *src, size_t len, bool null_terminate);
int rpcstr_push_talloc(TALLOC_CTX *ctx, smb_ucs2_t **dest, const char *src);
diff --git a/source3/lib/charcnv.c b/source3/lib/charcnv.c
index 32ba97a..1fa2c5c 100644
--- a/source3/lib/charcnv.c
+++ b/source3/lib/charcnv.c
@@ -494,17 +494,6 @@ size_t pull_string_talloc(TALLOC_CTX *ctx,
flags);
}
-
-size_t align_string(const void *base_ptr, const char *p, int flags)
-{
- if (!(flags & STR_ASCII) && \
- ((flags & STR_UNICODE || \
- (SVAL(base_ptr, smb_flg2) & FLAGS2_UNICODE_STRINGS)))) {
- return ucs2_align(base_ptr, p, flags);
- }
- return 0;
-}
-
/*******************************************************************
Write a string in (little-endian) unicode format. src is in
the current DOS codepage. len is the length in bytes of the
diff --git a/source3/libsmb/clilist.c b/source3/libsmb/clilist.c
index 6185c5a..056494e 100644
--- a/source3/libsmb/clilist.c
+++ b/source3/libsmb/clilist.c
@@ -87,7 +87,9 @@ static size_t interpret_long_filename(TALLOC_CTX *ctx,
finfo->mode = CVAL(p,24);
len = CVAL(p, 26);
p += 27;
- p += align_string(base_ptr, p, 0);
+ if (recv_flags2 & FLAGS2_UNICODE_STRINGS) {
+ p += ucs2_align(base_ptr, p, STR_UNICODE);
+ }
/* We can safely use len here (which is required by OS/2)
* and the NAS-BASIC server instead of +2 or +1 as the
--
Samba Shared Repository
More information about the samba-cvs
mailing list