Bug 969674 - remove-ds.pl is locale sensitive
remove-ds.pl is locale sensitive
Product: Fedora EPEL
Classification: Fedora
Component: 389-ds-base (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Rich Megginson
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-06-01 14:43 EDT by Michael Scherer
Modified: 2015-04-29 15:25 EDT (History)
5 users (show)

See Also:
Fixed In Version: 389-ds-base-
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-04-29 15:25:10 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Michael Scherer 2013-06-01 14:43:36 EDT
Version-Release number of selected component (if applicable):


How reproducible:

each time

Steps to Reproduce:
1.try to remove a instance with remove-ds.pl with a locale different from en-US

Actual results:

# remove-ds.pl -i slapd-elspeth
The following errors occurred during removal:
Error: could not remove selinux label from port '389'.  Error: /usr/sbin/semanage: Le port tcp/389 est défini dans la stratégie, il ne peut être supprimé

Expected results:

no error message.

Additional info:

the problem is because I run my system with LANG=fr_FR.utf8, so semange error message are translated, and so the error message is not correctly matched on removeDSInstance, in this part of the code.

      foreach my $secureport (@{$entry->{"nsslapd-secureport"}})
            my $semanage_err = `semanage port -d -t ldap_port_t -p tcp $secureport 2>&1`;
            if ($? != 0)  {
                if (($semanage_err !~ /defined in policy, cannot be deleted/) && ($semanage_err !~ /is not defined/)) {
                    push @errs, [ 'error_removing_port_label', $secureport, $semanage_err];
                    debug(1, "Warning: Port $secureport not removed from selinux policy correctly.  Error: $semanage_err\n");
Comment 1 Rich Megginson 2013-06-27 15:48:23 EDT
Upstream ticket:
Comment 2 Noriko Hosoi 2014-02-17 15:00:32 EST
Duplicate of ​https://fedorahosted.org/389/ticket/563

Fixed in 389-ds-base-

Note You need to log in before you can comment on or make changes to this bug.