diff options
author | Volker Lendecke <vl@samba.org> | 2010-01-25 16:44:38 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2010-01-25 16:45:32 +0100 |
commit | 005bbd0826f05794562a772e6fa05fd5ba9a43e7 (patch) | |
tree | 68a87b51a69c3c5adf749023d803a78bd6d71cf0 /libcli | |
parent | d86d5be63692220bc2ad5fb84eaeb70a7a03dca2 (diff) | |
download | samba-005bbd0826f05794562a772e6fa05fd5ba9a43e7.tar.gz samba-005bbd0826f05794562a772e6fa05fd5ba9a43e7.tar.bz2 samba-005bbd0826f05794562a772e6fa05fd5ba9a43e7.zip |
Revert "libcli/security: Remove a call to strncasecmp"
This reverts commit 7c687665eaf16b0c6f83c130f6d9e5459e0b2a32.
Diffstat (limited to 'libcli')
-rw-r--r-- | libcli/security/dom_sid.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libcli/security/dom_sid.c b/libcli/security/dom_sid.c index 7cb50c926c..0c8890079a 100644 --- a/libcli/security/dom_sid.c +++ b/libcli/security/dom_sid.c @@ -85,12 +85,16 @@ 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; } |