[SCM] Samba Shared Repository - branch v3-6-test updated
Jeremy Allison
jra at samba.org
Mon Mar 28 19:20:20 MDT 2011
The branch, v3-6-test has been updated
via 0847421 Remove two unused labels.
via e37a5de =?UTF-8?q?alpha=5Fstrcpy()=20is=20a=20utility=20function=20which=20reportedly:
from 1aaf83a s3-selftest Fix test_smbclient_auth.sh
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test
- Log -----------------------------------------------------------------
commit 08474212abe5aa761ad8c1f90635275586aad16b
Author: Jeremy Allison <jra at samba.org>
Date: Mon Mar 28 16:07:13 2011 -0700
Remove two unused labels.
Autobuild-User: Jeremy Allison <jra at samba.org>
Autobuild-Date: Tue Mar 29 02:23:02 CEST 2011 on sn-devel-104
(cherry picked from commit bae14fba520e6c89b162cc42b26f22144821b0a4)
commit e37a5de40098ebe1006a75daab64e9a820e726f4
Author: David Disseldorp <ddiss at suse.de>
Date: Mon Mar 28 15:59:32 2011 -0700
=?UTF-8?q?alpha=5Fstrcpy()=20is=20a=20utility=20function=20which=20reportedly:
=20Strips=20out=20all=20but=20'a-Z0-9'=20and=20the=20character=20in=20other=5Fsafe=5Fchars=20and
=20replaces=20with=20'=5F'.
=20This=20statement=20does=20not=20currently=20hold=20true=20in=20all=20cases=20(e.g.=20src=20=3D
=20"=D0=A2=D0=90=D0=9D=D0=A6=D0=95=D0=92=D0=90=D0=A2=D0=AC").?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
(cherry picked from commit db966efe8a4cc065f4e998bbed8a9d2c0ec2c976)
-----------------------------------------------------------------------
Summary of changes:
source3/lib/util_str.c | 12 +++++++++---
source3/winbindd/winbindd_samr.c | 2 --
2 files changed, 9 insertions(+), 5 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c
index 6a17297..cabdf9e 100644
--- a/source3/lib/util_str.c
+++ b/source3/lib/util_str.c
@@ -586,7 +586,9 @@ char *safe_strcat_fn(const char *fn,
Paranoid strcpy into a buffer of given length (includes terminating
zero. Strips out all but 'a-Z0-9' and the character in other_safe_chars
and replaces with '_'. Deliberately does *NOT* check for multibyte
- characters. Don't change it !
+ characters. Treats src as an array of bytes, not as a multibyte
+ string. Any byte >0x7f is automatically converted to '_'.
+ other_safe_chars must also contain an ascii string (bytes<0x7f).
**/
char *alpha_strcpy_fn(const char *fn,
@@ -622,8 +624,12 @@ char *alpha_strcpy_fn(const char *fn,
for(i = 0; i < len; i++) {
int val = (src[i] & 0xff);
- if (isupper_ascii(val) || islower_ascii(val) ||
- isdigit(val) || strchr_m(other_safe_chars, val))
+ if (val > 0x7f) {
+ dest[i] = '_';
+ continue;
+ }
+ if (isupper(val) || islower(val) ||
+ isdigit(val) || strchr(other_safe_chars, val))
dest[i] = src[i];
else
dest[i] = '_';
diff --git a/source3/winbindd/winbindd_samr.c b/source3/winbindd/winbindd_samr.c
index d7411f1..3bc07a9 100644
--- a/source3/winbindd/winbindd_samr.c
+++ b/source3/winbindd/winbindd_samr.c
@@ -68,7 +68,6 @@ static NTSTATUS open_internal_samr_pipe(TALLOC_CTX *mem_ctx,
return status;
}
-done:
if (samr_pipe) {
*samr_pipe = cli;
}
@@ -146,7 +145,6 @@ static NTSTATUS open_internal_lsa_pipe(TALLOC_CTX *mem_ctx,
return status;
}
-done:
if (lsa_pipe) {
*lsa_pipe = cli;
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list