[SCM] Samba Shared Repository - branch master updated
Volker Lendecke
vlendec at samba.org
Mon Jan 25 08:46:02 MST 2010
The branch, master has been updated
via 005bbd0... Revert "libcli/security: Remove a call to strncasecmp"
via d86d5be... Revert "libcli/security: Convert some strtol calls to strtoul"
via fa47dbb... Revert "libcli/security: Fix a valgrind error in dom_sid_parse"
from 4291e28... s4-python: Fix formatting.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 005bbd0826f05794562a772e6fa05fd5ba9a43e7
Author: Volker Lendecke <vl at samba.org>
Date: Mon Jan 25 16:44:38 2010 +0100
Revert "libcli/security: Remove a call to strncasecmp"
This reverts commit 7c687665eaf16b0c6f83c130f6d9e5459e0b2a32.
commit d86d5be63692220bc2ad5fb84eaeb70a7a03dca2
Author: Volker Lendecke <vl at samba.org>
Date: Mon Jan 25 16:44:27 2010 +0100
Revert "libcli/security: Convert some strtol calls to strtoul"
This reverts commit 7fe66e06c4df575c410d4d70ff38f120c2f4363b.
commit fa47dbb57ad43a97aaf03b371b0dd8addc4a5c47
Author: Volker Lendecke <vl at samba.org>
Date: Mon Jan 25 16:42:49 2010 +0100
Revert "libcli/security: Fix a valgrind error in dom_sid_parse"
This reverts commit f1c889a4e61d6d751cbabd8014b4345b8051b97c.
-----------------------------------------------------------------------
Summary of changes:
libcli/security/dom_sid.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
Changeset truncated at 500 lines:
diff --git a/libcli/security/dom_sid.c b/libcli/security/dom_sid.c
index 6a046cd..0c88900 100644
--- a/libcli/security/dom_sid.c
+++ b/libcli/security/dom_sid.c
@@ -85,24 +85,28 @@ bool dom_sid_equal(const struct dom_sid *sid1, const struct dom_sid *sid2)
return dom_sid_compare(sid1, sid2) == 0;
}
+/* Yes, I did think about multibyte issues here, and for all I can see there's
+ * none of those for parsing a SID. */
+#undef strncasecmp
+
bool dom_sid_parse(const char *sidstr, struct dom_sid *ret)
{
uint_t rev, ia, num_sub_auths, i;
char *p;
- if ((sidstr[0] != 'S' && sidstr[0] != 's') || sidstr[1] != '-') {
+ if (strncasecmp(sidstr, "S-", 2)) {
return false;
}
sidstr += 2;
- rev = strtoul(sidstr, &p, 10);
+ rev = strtol(sidstr, &p, 10);
if (*p != '-') {
return false;
}
sidstr = p+1;
- ia = strtoul(sidstr, &p, 10);
+ ia = strtol(sidstr, &p, 10);
if (p == sidstr) {
return false;
}
@@ -113,10 +117,6 @@ bool dom_sid_parse(const char *sidstr, struct dom_sid *ret)
if (sidstr[i] == '-') num_sub_auths++;
}
- if (num_sub_auths > ARRAY_SIZE(ret->sub_auths)) {
- return false;
- }
-
ret->sid_rev_num = rev;
ret->id_auth[0] = 0;
ret->id_auth[1] = 0;
--
Samba Shared Repository
More information about the samba-cvs
mailing list