Bug 969674 - remove-ds.pl is locale sensitive
Summary: remove-ds.pl is locale sensitive
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: 389-ds-base
Version: el6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Rich Megginson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-01 18:43 UTC by Michael S.
Modified: 2020-09-13 20:37 UTC (History)
5 users (show)

Fixed In Version: 389-ds-base-1.3.1.0-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-04-29 19:25:10 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github 389ds 389-ds-base issues 751 0 None None None 2020-09-13 20:37:44 UTC

Description Michael S. 2013-06-01 18:43:36 UTC
Version-Release number of selected component (if applicable):

389-ds-base-1.2.11.15-14.el6_4.x86_64


How reproducible:

each time

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

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 19:48:23 UTC
Upstream ticket:
https://fedorahosted.org/389/ticket/47414

Comment 2 Noriko Hosoi 2014-02-17 20:00:32 UTC
Duplicate of ​https://fedorahosted.org/389/ticket/563

Fixed in 389-ds-base-1.3.1.0-1


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