]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
backup: Set owner of {ex,in}clude{,.user} files to "root"
authorPeter Müller <peter.mueller@ipfire.org>
Mon, 26 Sep 2022 18:50:08 +0000 (18:50 +0000)
committerPeter Müller <peter.mueller@ipfire.org>
Tue, 27 Sep 2022 10:53:29 +0000 (10:53 +0000)
Since these files are static, there is no legitimate reason why they
should be owned (hence writable) by "nobody". Also, according to
configroot's LFS file, this is the intended behaviour for the *.user
files, which is then overwritten by the backup LFS file. Therefore, set
the file mode of these statically - configroot does not feature other
files in /var/ipfire/backup/ anyway.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
lfs/backup
lfs/configroot

index 6f686bf22faf6ce19a0dd497c68d3e1f6406e623..cf1e58c7e37924bd992d25ad845de5b5fe74bb91 100644 (file)
@@ -1,7 +1,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2007-2021  IPFire Team  <info@ipfire.org>                     #
+# Copyright (C) 2007-2022  IPFire Team  <info@ipfire.org>                     #
 #                                                                             #
 # This program is free software: you can redistribute it and/or modify        #
 # it under the terms of the GNU General Public License as published by        #
@@ -61,10 +61,10 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
        -mkdir -p /var/ipfire/backup/bin
        install -v -m 755 -o root $(DIR_SRC)/config/backup/backup.pl /var/ipfire/backup/bin
-       install -v -m 644 $(DIR_SRC)/config/backup/include /var/ipfire/backup/
-       install -v -m 644 $(DIR_SRC)/config/backup/exclude /var/ipfire/backup/
        chown nobody:nobody -R /var/ipfire/backup/
        chown root:root -R /var/ipfire/backup/bin/
+       install -v -m 644 $(DIR_SRC)/config/backup/include /var/ipfire/backup/
+       install -v -m 644 $(DIR_SRC)/config/backup/exclude /var/ipfire/backup/
        -mkdir -p /var/ipfire/backup/addons
        -mkdir -p /var/ipfire/backup/addons/includes
        -mkdir -p /var/ipfire/backup/addons/backup
index 31b9a946389409fae349a79886eb05c19a29b760..f09307274ae4bb85d9b9c9fc14a69b2f79330461 100644 (file)
@@ -169,7 +169,7 @@ $(TARGET) :
        # Configroot permissions
        chown -R nobody:nobody $(CONFIG_ROOT)
        chown      root:root   $(CONFIG_ROOT)
-       for i in backup/ *.pl addon-lang/ langs/ ; do \
+       for i in backup/exclude.user backup/include.user *.pl addon-lang/ langs/ ; do \
             chown -R root:root $(CONFIG_ROOT)/$$i; \
        done
        chown -Rv root:root $(CONFIG_ROOT)/*/bin