summaryrefslogtreecommitdiff
path: root/source4/lib/ldb
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-10-02 11:23:21 +0200
committerStefan Metzmacher <metze@samba.org>2008-10-02 11:41:10 +0200
commit5fc7fb48a0d7da8c4d0eec580c37b8a503faecce (patch)
tree4782304214640caa56ba3c58764825d066804f66 /source4/lib/ldb
parentaf1c802791e3c9f54220d8c80c3de79ef422d726 (diff)
downloadsamba-5fc7fb48a0d7da8c4d0eec580c37b8a503faecce.tar.gz
samba-5fc7fb48a0d7da8c4d0eec580c37b8a503faecce.tar.bz2
samba-5fc7fb48a0d7da8c4d0eec580c37b8a503faecce.zip
s4:lib/ldb: fix stupid <SID=...> dn parsing bugs
metze
Diffstat (limited to 'source4/lib/ldb')
-rw-r--r--source4/lib/ldb/common/ldb_dn.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/lib/ldb/common/ldb_dn.c b/source4/lib/ldb/common/ldb_dn.c
index c0d36cfbf3..e36aea4e69 100644
--- a/source4/lib/ldb/common/ldb_dn.c
+++ b/source4/lib/ldb/common/ldb_dn.c
@@ -91,7 +91,7 @@ struct ldb_dn *ldb_dn_from_ldb_val(void *mem_ctx, struct ldb_context *ldb, const
* exploded_dn control is used */
dn->special = true;
/* FIXME: add a GUID string to ldb_dn structure */
- } else if (strdn->length >= 8 && strncasecmp((const char *)strdn->data, "<SID=", 8) == 0) {
+ } else if (strdn->length >= 5 && strncasecmp((const char *)strdn->data, "<SID=", 5) == 0) {
/* this is special DN returned when the
* exploded_dn control is used */
dn->special = true;
@@ -150,7 +150,7 @@ struct ldb_dn *ldb_dn_new_fmt(void *mem_ctx, struct ldb_context *ldb, const char
* exploded_dn control is used */
dn->special = true;
/* FIXME: add a GUID string to ldb_dn structure */
- } else if (strncasecmp(strdn, "<SID=", 8) == 0) {
+ } else if (strncasecmp(strdn, "<SID=", 5) == 0) {
/* this is special DN returned when the
* exploded_dn control is used */
dn->special = true;