#48934 remove-ds.pl deletes an instance even if wrong prefix was specified
Closed: wontfix None Opened 5 years ago by nhosoi.

Description of problem:
It is possible to delete the instance 'slapd-standalone' with remove-ds.pl
tool, while specifying wrong prefix 'anyprefix-standalone'.

How reproducible:
Always

Steps to Reproduce:
1. Install an instance with a name 'standalone'
2. Run remove-ds.pl tool to remove it, but specify a wrong prefix instead of
'slapd'
$ remove-ds.pl -i 'anyprefix-standalone'

Actual results:
Instance anyprefix-standalone removed.

Expected results:
The following errors occurred during removal:
Error: could not find directory server configuration directory
'anyprefix-standalone'.  Error: No such file or directory
Error: could not remove directory server standalone

Additional info:
/usr/sbin/remove-ds.pl contains the next line (50):
my ($slapd, $inst) = split(/-/, $instname, 2);

So it doesn't check that before '-' is 'slapd' prefix and then it just splits
that part.

Reviewed by Mark (Thank you!!)

Pushed to master:
0e4a9a6..17dc978 master -> master
commit 2b34192

Metadata Update from @nhosoi:
- Issue assigned to nhosoi
- Issue set to the milestone: 1.3.5.12

4 years ago

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/389ds/389-ds-base/issues/1993

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata Update from @spichugi:
- Issue close_status updated to: wontfix (was: Fixed)

a year ago

Login to comment on this ticket.

Metadata