summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/patch_capabilities.pl5
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/patch_capabilities.pl b/bin/patch_capabilities.pl
index d3013f6..4390957 100755
--- a/bin/patch_capabilities.pl
+++ b/bin/patch_capabilities.pl
@@ -65,6 +65,9 @@ sub trim($) {
return $string;
}
+my $nullDevice = "/dev/null";
+$nullDevice = "NUL" if ($^O =~ /MSWin/);
+
my @capabilitiesToAllow = ("LocalServices", "NetworkServices", "ReadUserData", "UserEnvironment", "WriteUserData");
my @capabilitiesSpecified = ();
@@ -246,7 +249,7 @@ if (@ARGV)
# Actually execute the elftran command to set the capabilities.
print ("Executing ".$commandToExecute."\n");
- system ($commandToExecute." > NUL");
+ system ($commandToExecute." > $nullDevice");
## Create another command line to check that the set capabilities are correct.
#$commandToExecute = "elftran -dump s ".$binaryPath;