|
|
dc8c34 |
From 19cbec20e42dff5ec42ac32f0dc0108416796a9c Mon Sep 17 00:00:00 2001
|
|
|
dc8c34 |
From: Noriko Hosoi <nhosoi@redhat.com>
|
|
|
dc8c34 |
Date: Tue, 8 Dec 2015 12:30:15 -0800
|
|
|
dc8c34 |
Subject: [PATCH 368/368] Ticket #48305 - perl module conditional test is not
|
|
|
dc8c34 |
conditional when checking SELinux policies
|
|
|
dc8c34 |
|
|
|
dc8c34 |
Description: commit 9fefc13c02c9ae037fad053152193794706aaa31 introduced
|
|
|
dc8c34 |
a regression:
|
|
|
dc8c34 |
Bug 1287547 - 389-ds-base-1.3.4.5-1.fc23.x86_64 leaves empty /NUL around
|
|
|
dc8c34 |
after ipa-server-install
|
|
|
dc8c34 |
|
|
|
dc8c34 |
To check the existence of a character special file "/dev/null", "-c" is
|
|
|
dc8c34 |
supposed to be used instead of "-f".
|
|
|
dc8c34 |
|
|
|
dc8c34 |
Reviewed by mreynolds@redhat.com (Thank you, Mark!!)
|
|
|
dc8c34 |
|
|
|
dc8c34 |
https://fedorahosted.org/389/ticket/48305
|
|
|
dc8c34 |
(cherry picked from commit c4233ec14a82d1d4c0c71915be40913259d417fa)
|
|
|
dc8c34 |
(cherry picked from commit 48308f34269ed37712f21b59665f5df5e42b9fd9)
|
|
|
dc8c34 |
(cherry picked from commit aab7eda643fe4adae7c180e8cf750c06c696f8b6)
|
|
|
dc8c34 |
(cherry picked from commit aa596775228be085f92e69a8d928f5692b47857f)
|
|
|
dc8c34 |
---
|
|
|
dc8c34 |
ldap/admin/src/scripts/DSCreate.pm.in | 6 +++---
|
|
|
dc8c34 |
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
dc8c34 |
|
|
|
dc8c34 |
diff --git a/ldap/admin/src/scripts/DSCreate.pm.in b/ldap/admin/src/scripts/DSCreate.pm.in
|
|
|
dc8c34 |
index 76d2e88..b7f9498 100644
|
|
|
dc8c34 |
--- a/ldap/admin/src/scripts/DSCreate.pm.in
|
|
|
dc8c34 |
+++ b/ldap/admin/src/scripts/DSCreate.pm.in
|
|
|
dc8c34 |
@@ -285,7 +285,7 @@ sub createInstanceScripts {
|
|
|
dc8c34 |
my $skip = shift;
|
|
|
dc8c34 |
my $perlexec = "@perlexec@" || "/usr/bin/env perl";
|
|
|
dc8c34 |
my $myperl = "!$perlexec";
|
|
|
dc8c34 |
- my $mydevnull = (-f "/dev/null" ? " /dev/null " : " NUL ");
|
|
|
dc8c34 |
+ my $mydevnull = (-c "/dev/null" ? " /dev/null " : " NUL ");
|
|
|
dc8c34 |
|
|
|
dc8c34 |
# determine initconfig_dir
|
|
|
dc8c34 |
my $initconfig_dir = $inf->{slapd}->{initconfig_dir} || get_initconfigdir();
|
|
|
dc8c34 |
@@ -969,7 +969,7 @@ sub setDefaults {
|
|
|
dc8c34 |
|
|
|
dc8c34 |
sub updateSelinuxPolicy {
|
|
|
dc8c34 |
my $inf = shift;
|
|
|
dc8c34 |
- my $mydevnull = (-f "/dev/null" ? " /dev/null " : " NUL ");
|
|
|
dc8c34 |
+ my $mydevnull = (-c "/dev/null" ? " /dev/null " : " NUL ");
|
|
|
dc8c34 |
|
|
|
dc8c34 |
# if selinux is not available, do nothing
|
|
|
dc8c34 |
if ("@with_selinux@" and
|
|
|
dc8c34 |
@@ -1377,7 +1377,7 @@ sub removeDSInstance {
|
|
|
dc8c34 |
}
|
|
|
dc8c34 |
|
|
|
dc8c34 |
# remove the selinux label from the ports if needed
|
|
|
dc8c34 |
- my $mydevnull = (-f "/dev/null" ? " /dev/null " : " NUL ");
|
|
|
dc8c34 |
+ my $mydevnull = (-c "/dev/null" ? " /dev/null " : " NUL ");
|
|
|
dc8c34 |
if ("@with_selinux@" and
|
|
|
dc8c34 |
-f "@sbindir@/sestatus" and !system ("@sbindir@/sestatus | egrep -i \"selinux status:\\s*enabled\" > $mydevnull 2>&1")) {
|
|
|
dc8c34 |
foreach my $port (@{$entry->{"nsslapd-port"}})
|
|
|
dc8c34 |
--
|
|
|
dc8c34 |
2.4.3
|
|
|
dc8c34 |
|