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