From b1cedbbeea14e67cbce32d6ab152c6c5413ba7d8 Mon Sep 17 00:00:00 2001 From: Arvid Requate Date: Fri, 2 Mar 2012 13:59:30 +0100 Subject: SEGV in acl_validate_spn_value: dnsHostName NULL This patch addresses a segfault in acl_validate_spn_value which occurs when the "dnsHostName" attribute is missing. This seems to be the case in domains migrated with samba3upgrade. Looks similar to MS KB 817543. Signed-off-by: Nadezhda Ivanova Autobuild-User: Nadezhda Ivanova Autobuild-Date: Fri Mar 2 21:26:40 CET 2012 on sn-devel-104 --- source4/dsdb/samdb/ldb_modules/acl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source4/dsdb/samdb/ldb_modules/acl.c b/source4/dsdb/samdb/ldb_modules/acl.c index abde85f682..6aed6825cb 100644 --- a/source4/dsdb/samdb/ldb_modules/acl.c +++ b/source4/dsdb/samdb/ldb_modules/acl.c @@ -516,7 +516,7 @@ static int acl_validate_spn_value(TALLOC_CTX *mem_ctx, if (strlen(instanceName) == (strlen(samAccountName) - 1) && strncasecmp(instanceName, samAccountName, strlen(samAccountName) - 1) == 0) { goto success; - } else if (strcasecmp(instanceName, dnsHostName) == 0) { + } else if (dnsHostName != NULL && strcasecmp(instanceName, dnsHostName) == 0) { goto success; } else if (is_dc) { const char *guid_str; -- cgit