1
0
Эх сурвалжийг харах

Ticket #48934 - remove-ds.pl deletes an instance even if wrong prefix was specified

Description: remove-ds.pl skipped to check "slapd" part of "slapd-instance".
This patch adds the check and if it is not "slapd", it quits with the error
message.  For example:
Error: Invalid instance name "bogus-test"

https://fedorahosted.org/389/ticket/48934

Reviewed by [email protected] (Thanks, Mark!!)
Noriko Hosoi 9 жил өмнө
parent
commit
2b341922a4

+ 4 - 0
ldap/admin/src/scripts/remove-ds.pl.in

@@ -52,6 +52,10 @@ unless ($inst) {
     print STDERR "Full instance name must be specified (e.g. - slapd-example)\n";
     exit 1;
 }
+unless ($slapd eq "slapd") {
+    print STDERR "Error: Invalid instance name \"$instname\"\n";
+    exit 1;
+}
 
 my @errs = removeDSInstance($inst, $force, $all, $initconfig_dir);
 if (@errs) {