1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit e9ae515f6f6abfbd6a5c1220ca54fb51657246b9
Author: Viktor Ashirov <vashirov@redhat.com>
Date: Wed Aug 24 20:25:16 2016 +0200
Ticket 48953 - Skip labelling and unlabelling ports during the test
Description:
In CI creating and removing instances takes most of the
time, because of labelling/unlabelling ports via semanage.
Fix description:
Skip labelling and unlabelling if special environment
variables are present: DS_SKIP_LABEL and DS_SKIP_UNLABEL
respectively.
https://fedorahosted.org/389/ticket/48953
Reviewed by: nhosoi@redhat.com (Thanks!)
diff --git a/ldap/admin/src/scripts/DSCreate.pm.in b/ldap/admin/src/scripts/DSCreate.pm.in
index bf5fc5c..7e98803 100644
--- a/ldap/admin/src/scripts/DSCreate.pm.in
+++ b/ldap/admin/src/scripts/DSCreate.pm.in
@@ -1039,7 +1039,7 @@ sub updateSelinuxPolicy {
# label the selected port as ldap_port_t
# We should be doing this for secure port too .....
- if ($inf->{slapd}->{ServerPort} != 0) {
+ if ($inf->{slapd}->{ServerPort} != 0 and not $ENV{DS_SKIP_LABEL}) {
my $port_query_cmd = ("$inf->{slapd}->{sbindir}/ds_selinux_port_query $inf->{slapd}->{ServerPort} ldap_port_t 2> $mydevnull");
my $need_label = 0;
my $result = system($port_query_cmd);
@@ -1462,7 +1462,7 @@ sub removeDSInstance {
# remove the selinux label from the ports if needed
my $mydevnull = (-c "/dev/null" ? " /dev/null " : " NUL ");
- if ((getLogin() eq 'root') and "@with_selinux@" and system("@sbindir@/ds_selinux_enabled") == 256 ) {
+ if ((getLogin() eq 'root') and "@with_selinux@" and system("@sbindir@/ds_selinux_enabled") == 256 and not $ENV{DS_SKIP_UNLABEL}) {
foreach my $port (@{$entry->{"nsslapd-port"}})
{
--
389-commits mailing list
389-commits@lists.fedoraproject.org
https://lists.fedoraproject.org/admin/lists/389-commits@lists.fedoraproject.org
No comments:
Post a Comment