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)