summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2010-03-09 15:58:40 -0600
committerRich Megginson <rmeggins@redhat.com>2010-03-11 10:10:48 -0700
commitbe17b937b06eeb0822189951a6f63cfb87749e32 (patch)
treeb14ac0ed2f732eb5bc124ca48ca6ad3caecf2cb7
parent7701c5626647ddfa44e4f4b11a11d3c384beffa7 (diff)
downloadds-be17b937b06eeb0822189951a6f63cfb87749e32.tar.gz
ds-be17b937b06eeb0822189951a6f63cfb87749e32.tar.xz
ds-be17b937b06eeb0822189951a6f63cfb87749e32.zip
Bug 570542 - Root password cannot contain matching curly braces
https://bugzilla.redhat.com/show_bug.cgi?id=570542 Resolves: bug 570542 Bug Description: Root password cannot contain matching curly braces Branch: HEAD Fix Description: The scripts have been modified to check for matching curly braces only at the beginning of the password. Matching curly braces anywhere else would be accepted as a valid password.
-rw-r--r--ldap/admin/src/scripts/DSCreate.pm.in2
-rw-r--r--ldap/admin/src/scripts/DSUtil.pm.in2
2 files changed, 2 insertions, 2 deletions
diff --git a/ldap/admin/src/scripts/DSCreate.pm.in b/ldap/admin/src/scripts/DSCreate.pm.in
index f8757ff0..06b2d1fd 100644
--- a/ldap/admin/src/scripts/DSCreate.pm.in
+++ b/ldap/admin/src/scripts/DSCreate.pm.in
@@ -124,7 +124,7 @@ sub sanityCheckParams {
return ('dialog_dsrootdn_error', $inf->{slapd}->{RootDN});
}
- if ($inf->{slapd}->{RootDNPwd} =~ /\{\w+\}.+/) {
+ if ($inf->{slapd}->{RootDNPwd} =~ /^\{\w+\}.+/) {
debug(1, "The root password is already hashed - no checking will be performed\n");
} elsif (length($inf->{slapd}->{RootDNPwd}) < 8) {
debug(0, "WARNING: The root password is less than 8 characters long. You should choose a longer one.\n");
diff --git a/ldap/admin/src/scripts/DSUtil.pm.in b/ldap/admin/src/scripts/DSUtil.pm.in
index a8f3a304..c292d4ea 100644
--- a/ldap/admin/src/scripts/DSUtil.pm.in
+++ b/ldap/admin/src/scripts/DSUtil.pm.in
@@ -728,7 +728,7 @@ sub getHashedPassword {
my $pwd = shift;
my $alg = shift;
- if ($pwd =~ /\{\w+\}.+/) {
+ if ($pwd =~ /^\{\w+\}.+/) {
return $pwd; # already hashed
}