ids-functions.pl: Do not try to chown files while extracting them.

Message ID 20220303185559.3551-1-stefan.schantl@ipfire.org
State Accepted
Commit da3611b2767298e3f300b12b6ae03958a193c871
Headers
Series ids-functions.pl: Do not try to chown files while extracting them. |

Commit Message

Stefan Schantl March 3, 2022, 6:55 p.m. UTC
  We are almost running as an unprivileged user and therfore have not
the permissions to do this.

This will save us a lot of confusion error messages.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
---
 config/cfgroot/ids-functions.pl | 3 +++
 1 file changed, 3 insertions(+)
  

Patch

diff --git a/config/cfgroot/ids-functions.pl b/config/cfgroot/ids-functions.pl
index 74d55def6..23430f472 100644
--- a/config/cfgroot/ids-functions.pl
+++ b/config/cfgroot/ids-functions.pl
@@ -475,6 +475,9 @@  sub extractruleset ($) {
 	# Load perl module to deal with archives.
 	use Archive::Tar;
 
+	# Disable chown functionality when uncompressing files.
+	$Archive::Tar::CHOWN = "0";
+
 	# Load perl module to deal with files and path.
 	use File::Basename;