Browse Source

Resolves: bug 371771
Bug Description: '.' (dot) in the server ID
Reviewed by: nkinder (Thanks!)
Fix Description: Remove . and , from the characters allowed in the server ID. Also use the more descriptive error message.
Platforms tested: RHEL5 x86_64
Flag Day: no
Doc impact: no
QA impact: should be covered by regular nightly and manual testing
New Tests integrated into TET: none

Rich Megginson 18 years ago
parent
commit
8045286272

+ 2 - 2
ldap/admin/src/scripts/DSDialogs.pm

@@ -99,9 +99,9 @@ my $dsserverid = new Dialog (
         my $res = $DialogManager::SAME;
         my $path = $self->{manager}->{setup}->{configdir} . "/slapd-" . $ans;
         if (!isValidServerID($ans)) {
-            $self->{manager}->alert("dialog_dsserverid_error", $ans);
+            $self->{manager}->alert("error_invalid_serverid", $ans);
         } elsif (-d $path) {
-            $self->{manager}->alert("dialog_dsserverid_inuse", $ans);
+            $self->{manager}->alert("error_server_already_exists", $path);
         } else {
             $res = $DialogManager::NEXT;
             $self->{manager}->{inf}->{slapd}->{ServerIdentifier} = $ans;

+ 1 - 1
ldap/admin/src/scripts/Util.pm.in

@@ -107,7 +107,7 @@ sub isValidDN {
 
 sub isValidServerID {
     my $servid = shift;
-    my $validchars = '#%,.:\w@_-';
+    my $validchars = '#%:\w@_-';
     return $servid =~ /^[$validchars]+$/o;
 }
 

+ 1 - 1
ldap/admin/src/scripts/setup-ds.res.in

@@ -108,7 +108,7 @@ invalid port number, or the port already being in use by another\
 program, or low port restriction.  Please choose another value for\
 ServerPort.  Error: $!\n
 error_invalid_serverid = The ServerIdentifier '%s' contains invalid characters.  It must\
-contain only alphanumeric characters and the following: #%,.:@_-\n
+contain only alphanumeric characters and the following: #%:@_-\n\n
 error_opening_scripttmpl = Could not open the script template file '%s'.  Error: %s\n
 error_creating_directory = Could not create directory '%s'.  Error: %s\n
 error_chowning_directory = Could not change ownership of directory '%s' to userid '%s': Error: %s\n