ldap/admin/src/scripts/DSCreate.pm.in | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
New commits:
commit 3f2ea36e763c8e08b88265bd365c6daa5081419c
Author: William Brown <firstyear(a)redhat.com>
Date: Thu Nov 26 13:11:17 2015 +1000
Ticket 48332 - allow users to specify to relax the FQDN constraint
Bug Description: There are situations when the machine name for ds may not
match the dns name. In these cases we should allow installation without the
strict hostname checks we carry out.
Fix Description: Add a new option, General.StrictHostCheck which defaults
to true. If true, host name checking is carried out. If false, it is disabled
and any hostname in General.FullMachineName is considered valid.
https://fedorahosted.org/389/ticket/48332
Author: wibrown
Review by: rmeggins (Thanks!)
(cherry picked from commit 026956c7e3b4dc00b6738f9a195e6653fed03d79)
(cherry picked from commit 5d0f57335c1bf97529849d5d47cad769083052d0)
(cherry picked from commit e62ef7f4d19d78d015efa915f7740f4d8b615da4)
diff --git a/ldap/admin/src/scripts/DSCreate.pm.in b/ldap/admin/src/scripts/DSCreate.pm.in
index b7f9498..dbfcedf 100644
--- a/ldap/admin/src/scripts/DSCreate.pm.in
+++ b/ldap/admin/src/scripts/DSCreate.pm.in
@@ -150,9 +150,18 @@ sub sanityCheckParams {
debug(0, "WARNING: The root password is less than 8 characters long. You should choose a longer one.\n");
}
- if (@errs = checkHostname($inf->{General}->{FullMachineName}, 0)) {
- debug(1, @errs);
- return @errs;
+ $inf->{General}->{StrictHostCheck} = lc $inf->{General}->{StrictHostCheck};
+
+ if ("true" ne $inf->{General}->{StrictHostCheck} && "false" ne $inf->{General}->{StrictHostCheck}) {
+ debug(1, "StrictHostCheck is not a valid boolean");
+ return ('error_invalid_boolean', $inf->{General}->{StrictHostCheck});
+ }
+
+ if ($inf->{General}->{StrictHostCheck} eq "true" ) {
+ if (@errs = checkHostname($inf->{General}->{FullMachineName}, 0)) {
+ debug(1, @errs);
+ return @errs;
+ }
}
return ();
@@ -888,6 +897,10 @@ sub setDefaults {
"@datadir@",
$inf->{General}->{prefix});
+ if (!defined($inf->{General}->{StrictHostCheck})) {
+ $inf->{General}->{StrictHostCheck} = "true";
+ }
+
if (!defined($inf->{slapd}->{inst_dir})) {
$inf->{slapd}->{inst_dir} = "$inf->{General}->{ServerRoot}/slapd-$servid";
}
ldap/admin/src/scripts/DSCreate.pm.in | 19 ++++++++++++++++---
ldap/servers/slapd/tools/ldclt/ldclt.c | 5 +++++
2 files changed, 21 insertions(+), 3 deletions(-)
New commits:
commit e62ef7f4d19d78d015efa915f7740f4d8b615da4
Author: William Brown <firstyear(a)redhat.com>
Date: Thu Nov 26 13:11:17 2015 +1000
Ticket 48332 - allow users to specify to relax the FQDN constraint
Bug Description: There are situations when the machine name for ds may not
match the dns name. In these cases we should allow installation without the
strict hostname checks we carry out.
Fix Description: Add a new option, General.StrictHostCheck which defaults
to true. If true, host name checking is carried out. If false, it is disabled
and any hostname in General.FullMachineName is considered valid.
https://fedorahosted.org/389/ticket/48332
Author: wibrown
Review by: rmeggins (Thanks!)
(cherry picked from commit 026956c7e3b4dc00b6738f9a195e6653fed03d79)
(cherry picked from commit 5d0f57335c1bf97529849d5d47cad769083052d0)
diff --git a/ldap/admin/src/scripts/DSCreate.pm.in b/ldap/admin/src/scripts/DSCreate.pm.in
index 7285625..4e75026 100644
--- a/ldap/admin/src/scripts/DSCreate.pm.in
+++ b/ldap/admin/src/scripts/DSCreate.pm.in
@@ -154,9 +154,18 @@ sub sanityCheckParams {
debug(0, "WARNING: The root password is less than 8 characters long. You should choose a longer one.\n");
}
- if (@errs = checkHostname($inf->{General}->{FullMachineName}, 0)) {
- debug(1, @errs);
- return @errs;
+ $inf->{General}->{StrictHostCheck} = lc $inf->{General}->{StrictHostCheck};
+
+ if ("true" ne $inf->{General}->{StrictHostCheck} && "false" ne $inf->{General}->{StrictHostCheck}) {
+ debug(1, "StrictHostCheck is not a valid boolean");
+ return ('error_invalid_boolean', $inf->{General}->{StrictHostCheck});
+ }
+
+ if ($inf->{General}->{StrictHostCheck} eq "true" ) {
+ if (@errs = checkHostname($inf->{General}->{FullMachineName}, 0)) {
+ debug(1, @errs);
+ return @errs;
+ }
}
return ();
@@ -903,6 +912,10 @@ sub setDefaults {
"@datadir@",
$inf->{General}->{prefix});
+ if (!defined($inf->{General}->{StrictHostCheck})) {
+ $inf->{General}->{StrictHostCheck} = "true";
+ }
+
if (!defined($inf->{slapd}->{inst_dir})) {
$inf->{slapd}->{inst_dir} = "$inf->{General}->{ServerRoot}/slapd-$servid";
}
commit 26613cf3d1dbca136a43e15ee5d6a20f3641b362
Author: Stanislav Zidek <szidek(a)redhat.com>
Date: Wed Oct 21 17:58:31 2015 -0700
Ticket #48289 - 389-ds-base: ldclt-bin killed by SIGSEGV
Description: If NULL source string was passed to parseFilter, it caused
NULL dereference.
https://fedorahosted.org/389/ticket/48289
Reviewed by nhosoi(a)redhat.com.
(cherry picked from commit 5b33c781d2568c930a0856f0a42c1e1d53e3358f)
(cherry picked from commit 8cd610a944daf72a41e5b35065f8b363f8154f28)
(cherry picked from commit 49d0ef667441e009af071fd0f4d48f31f3514063)
diff --git a/ldap/servers/slapd/tools/ldclt/ldclt.c b/ldap/servers/slapd/tools/ldclt/ldclt.c
index 2ccba82..2d668d1 100644
--- a/ldap/servers/slapd/tools/ldclt/ldclt.c
+++ b/ldap/servers/slapd/tools/ldclt/ldclt.c
@@ -1225,6 +1225,11 @@ parseFilter (
{
int i, j;
+ if (!src) {
+ printf ("Error: NULL source string is passed.\n");
+ return (-1);
+ }
+
for (i=0 ; (i<strlen(src)) && (src[i]!='X') ; i++);
*head = (char *)malloc(i+1);
if (*head == NULL)
ldap/admin/src/scripts/DSCreate.pm.in | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
New commits:
commit 5d0f57335c1bf97529849d5d47cad769083052d0
Author: William Brown <firstyear(a)redhat.com>
Date: Thu Nov 26 13:11:17 2015 +1000
Ticket 48332 - allow users to specify to relax the FQDN constraint
Bug Description: There are situations when the machine name for ds may not
match the dns name. In these cases we should allow installation without the
strict hostname checks we carry out.
Fix Description: Add a new option, General.StrictHostCheck which defaults
to true. If true, host name checking is carried out. If false, it is disabled
and any hostname in General.FullMachineName is considered valid.
https://fedorahosted.org/389/ticket/48332
Author: wibrown
Review by: rmeggins (Thanks!)
(cherry picked from commit 026956c7e3b4dc00b6738f9a195e6653fed03d79)
diff --git a/ldap/admin/src/scripts/DSCreate.pm.in b/ldap/admin/src/scripts/DSCreate.pm.in
index 7082fd9..0c4928a 100644
--- a/ldap/admin/src/scripts/DSCreate.pm.in
+++ b/ldap/admin/src/scripts/DSCreate.pm.in
@@ -126,9 +126,18 @@ sub sanityCheckParams {
debug(0, "WARNING: The root password is less than 8 characters long. You should choose a longer one.\n");
}
- if (@errs = checkHostname($inf->{General}->{FullMachineName}, 0)) {
- debug(1, @errs);
- return @errs;
+ $inf->{General}->{StrictHostCheck} = lc $inf->{General}->{StrictHostCheck};
+
+ if ("true" ne $inf->{General}->{StrictHostCheck} && "false" ne $inf->{General}->{StrictHostCheck}) {
+ debug(1, "StrictHostCheck is not a valid boolean");
+ return ('error_invalid_boolean', $inf->{General}->{StrictHostCheck});
+ }
+
+ if ($inf->{General}->{StrictHostCheck} eq "true" ) {
+ if (@errs = checkHostname($inf->{General}->{FullMachineName}, 0)) {
+ debug(1, @errs);
+ return @errs;
+ }
}
return ();
@@ -876,6 +885,10 @@ sub setDefaults {
"@datadir@",
$inf->{General}->{prefix});
+ if (!defined($inf->{General}->{StrictHostCheck})) {
+ $inf->{General}->{StrictHostCheck} = "true";
+ }
+
if (!defined($inf->{slapd}->{inst_dir})) {
$inf->{slapd}->{inst_dir} = "$inf->{General}->{ServerRoot}/slapd-$servid";
}
ldap/servers/plugins/cos/cos_cache.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
New commits:
commit d7c71db218f27cdbc2fcc39401a97b00e8d890a4
Author: William Brown <firstyear(a)redhat.com>
Date: Thu Dec 17 15:00:18 2015 +1000
Ticket 48387 - ASAN invalid read in cos_cache.c
Bug Description: ==7050== ERROR: AddressSanitizer?: global-buffer-overflow on
address 0x7f643b32c5ff at pc 0x7f643b3217aa bp 0x7f64331c5f60 sp 0x7f64331c5f50
READ of size 1 at 0x7f643b32c5ff thread T5
#0 0x7f643b3217a9 in cos_cache_backwards_stricmp_and_clip
ds/ldap/servers/plugins/cos/cos_cache.c:3428
Issue exists in the array offset check, which allows the value to go to -1
causing the invalid read.
Fix Description: Fix the check to only allow the offset to go to 0, not -1
https://fedorahosted.org/389/ticket/48387
Author: wibrown
Review by: nhosoi (Thank you!)
diff --git a/ldap/servers/plugins/cos/cos_cache.c b/ldap/servers/plugins/cos/cos_cache.c
index db90ffa..cb5cb69 100644
--- a/ldap/servers/plugins/cos/cos_cache.c
+++ b/ldap/servers/plugins/cos/cos_cache.c
@@ -3413,14 +3413,18 @@ static int cos_cache_backwards_stricmp_and_clip(char*s1,char*s2)
int s1len = 0;
int s2len = 0;
- LDAPDebug( LDAP_DEBUG_TRACE, "--> cos_cache_backwards_stricmp_and_clip\n",0,0,0);
-
s1len = strlen(s1);
s2len = strlen(s2);
+ LDAPDebug( LDAP_DEBUG_TRACE, "--> cos_cache_backwards_stricmp_and_clip s1 %d s2 %d\n",s1len,s2len,0);
+
if(s1len > s2len && s2len > 0)
{
- while(s1len > -1 && s2len > -1)
+ /* In some cases this can go below 0 causing invalid reads
+ * We make the check for > 0, because if we are at 1 -> 0 is next
+ * If the check is > -1, we can easily get to 0, then -1, creating invalid read.
+ */
+ while(s1len > 0 && s2len > 0)
{
s1len--;
s2len--;