summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorJim McDonough <jmcd@samba.org>2005-10-20 16:05:12 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:05:07 -0500
commitde3d0094b78cb20da7ed958e8d3a428583694309 (patch)
treea0cb6519548b42121a1c0c1665e2165211096569 /source
parente5cc94f13ff2dacb219c8a56fa13853d620ecda6 (diff)
downloadsamba-de3d0094b78cb20da7ed958e8d3a428583694309.tar.gz
samba-de3d0094b78cb20da7ed958e8d3a428583694309.tar.xz
samba-de3d0094b78cb20da7ed958e8d3a428583694309.zip
r11229: an even bigger speedup spotted by Volker. string_to_sid() is now taking 1/5th
the time it used to. Replace strcasecmp with invididual char checks for "S-" sid prefix.
Diffstat (limited to 'source')
-rw-r--r--source/lib/util_sid.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/lib/util_sid.c b/source/lib/util_sid.c
index cc1f55330fe..0a9e6fe310a 100644
--- a/source/lib/util_sid.c
+++ b/source/lib/util_sid.c
@@ -262,12 +262,12 @@ BOOL string_to_sid(DOM_SID *sidout, const char *sidstr)
/* BIG NOTE: this function only does SIDS where the identauth is not >= 2^32 */
uint32 conv;
- if (StrnCaseCmp( sidstr, "S-", 2)) {
+ if ((sidstr[0] != 'S' && sidstr[0] != 's') || sidstr[1] != '-') {
DEBUG(0,("string_to_sid: Sid %s does not start with 'S-'.\n", sidstr));
return False;
}
- ZERO_STRUCTP(sidout);
+// ZERO_STRUCTP(sidout);
/* Get the revision number. */
p = sidstr + 2;