]> git.ipfire.org Git - pakfire.git/log
pakfire.git
2 years agohub: Correctly read the CPU model
Michael Tremer [Fri, 28 Apr 2023 08:44:11 +0000 (08:44 +0000)] 
hub: Correctly read the CPU model

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agopwd: Remove static buffer for subid entry
Michael Tremer [Fri, 28 Apr 2023 09:40:26 +0000 (09:40 +0000)] 
pwd: Remove static buffer for subid entry

In the build service, it could happen that Pakfire runs concurrently
which might cause that the statically allocated memory might be
overwritten by another thread.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agohub: Automatically fetch a TGT when a keytab has been given
Michael Tremer [Thu, 27 Apr 2023 18:23:15 +0000 (18:23 +0000)] 
hub: Automatically fetch a TGT when a keytab has been given

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agohub: Don't use a default keytab
Michael Tremer [Thu, 27 Apr 2023 18:22:52 +0000 (18:22 +0000)] 
hub: Don't use a default keytab

This might overwrite when a user is logged in.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agohub: Attempt to reconnect on 502 Proxy Error
Michael Tremer [Thu, 27 Apr 2023 10:23:57 +0000 (10:23 +0000)] 
hub: Attempt to reconnect on 502 Proxy Error

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agohub: Refactor message handling
Michael Tremer [Wed, 26 Apr 2023 17:19:57 +0000 (17:19 +0000)] 
hub: Refactor message handling

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agodaemon: Build scaffolding to abort builds
Michael Tremer [Wed, 26 Apr 2023 17:14:14 +0000 (17:14 +0000)] 
daemon: Build scaffolding to abort builds

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agohub: Rename log message field
Michael Tremer [Wed, 26 Apr 2023 17:01:37 +0000 (17:01 +0000)] 
hub: Rename log message field

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agohub: Update message format for job messages
Michael Tremer [Wed, 26 Apr 2023 15:17:00 +0000 (15:17 +0000)] 
hub: Update message format for job messages

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agodaemon: Receive jobs over the new control connection
Michael Tremer [Wed, 26 Apr 2023 15:13:53 +0000 (15:13 +0000)] 
daemon: Receive jobs over the new control connection

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agodaemon: Use the new control connection for sending stats
Michael Tremer [Wed, 26 Apr 2023 13:43:14 +0000 (13:43 +0000)] 
daemon: Use the new control connection for sending stats

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agodaemon: Include timestamp in log messages
Michael Tremer [Tue, 25 Apr 2023 14:54:12 +0000 (14:54 +0000)] 
daemon: Include timestamp in log messages

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agohub: Refactor communication with the hub after merging pakfire-web and -hub
Michael Tremer [Tue, 25 Apr 2023 14:53:32 +0000 (14:53 +0000)] 
hub: Refactor communication with the hub after merging pakfire-web and -hub

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agohub: Move from pakfirehub.ipfire.org to pakfire.ipfire.org
Michael Tremer [Thu, 20 Apr 2023 19:40:09 +0000 (19:40 +0000)] 
hub: Move from pakfirehub.ipfire.org to pakfire.ipfire.org

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agofile: Check for invalid script interpreters
Michael Tremer [Fri, 14 Apr 2023 10:29:18 +0000 (10:29 +0000)] 
file: Check for invalid script interpreters

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years ago_pakfire: Define PY_SSIZE_T_CLEAN
Michael Tremer [Sat, 22 Apr 2023 09:35:56 +0000 (09:35 +0000)] 
_pakfire: Define PY_SSIZE_T_CLEAN

https://docs.python.org/3/c-api/intro.html

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agoRevert "downloader: Drop using deprecated CURLOPT_PROTOCOLS"
Michael Tremer [Thu, 13 Apr 2023 13:47:23 +0000 (13:47 +0000)] 
Revert "downloader: Drop using deprecated CURLOPT_PROTOCOLS"

This reverts commit de08af0247aa2bf56251a168eca186c701dce6c2.

This is difficult to mirgate to since Debian Bullseye ships a version of
cURL which does not support CURLOPT_PROTOCOL_STR, yet. So since on
Bookworm there is only a deprecation warning, we will simply revert this
patch for now and deal with the warning.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agofile: Implement scaffolding for CF protection check
Michael Tremer [Thu, 13 Apr 2023 13:43:40 +0000 (13:43 +0000)] 
file: Implement scaffolding for CF protection check

See #13084

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agobuild: Don't try to bind-mount @local if it does not exist
Michael Tremer [Thu, 13 Apr 2023 11:26:06 +0000 (11:26 +0000)] 
build: Don't try to bind-mount @local if it does not exist

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agoarchive: Remove any nested functions from reading files
Michael Tremer [Wed, 12 Apr 2023 13:55:35 +0000 (13:55 +0000)] 
archive: Remove any nested functions from reading files

Nested functions require an executable stack which we want to avoid.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agodownloader: Drop using deprecated CURLOPT_PROTOCOLS
Michael Tremer [Tue, 11 Apr 2023 16:24:20 +0000 (16:24 +0000)] 
downloader: Drop using deprecated CURLOPT_PROTOCOLS

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agomacros: Fix coding style of sysusers macro
Michael Tremer [Tue, 11 Apr 2023 12:28:43 +0000 (12:28 +0000)] 
macros: Fix coding style of sysusers macro

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agomacros: Apply all local sysusers files by default
Michael Tremer [Tue, 11 Apr 2023 12:26:35 +0000 (12:26 +0000)] 
macros: Apply all local sysusers files by default

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agomacros: Add macro to apply sysusers based users/groups inside the jail
Stefan Schantl [Sat, 1 Apr 2023 08:20:34 +0000 (10:20 +0200)] 
macros: Add macro to apply sysusers based users/groups inside the jail

This macro can be called inside a build file and easily allows to apply
any kind of users/groups specified in a sysusers file.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agomacros: Add macro to automatically install any systemd sysusers files
Stefan Schantl [Sat, 1 Apr 2023 08:18:02 +0000 (10:18 +0200)] 
macros: Add macro to automatically install any systemd sysusers files

This macros works very similar than the tmpfiles one but handles
sysusers files.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agosystemd.macro: Avoid declaring the directory for tmpfiles twice
Stefan Schantl [Sat, 1 Apr 2023 08:10:17 +0000 (10:10 +0200)] 
systemd.macro: Avoid declaring the directory for tmpfiles twice

We allready have declared this directory in the arch macro file,
so there is no need in doing this again.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agomacros: Add macro to automatically install all systemd sysusers files
Stefan Schantl [Thu, 30 Mar 2023 12:52:29 +0000 (14:52 +0200)] 
macros: Add macro to automatically install all systemd sysusers files

This macros works very similar than the tmpfiles one but handles
sysusers files.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agomacros: Introduce sysusersdir
Stefan Schantl [Wed, 29 Mar 2023 11:41:42 +0000 (13:41 +0200)] 
macros: Introduce sysusersdir

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agomeson: Avoid calling meson without setup is deprecated
Stefan Schantl [Wed, 29 Mar 2023 11:40:16 +0000 (13:40 +0200)] 
meson: Avoid calling meson without setup is deprecated

Calling meson without setup as argument when configure
a project is deprecated since a while by the meson developers.

To avoid any problems in future adding this argument.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agoarchive: sysusers: Fix walking through archive for sysusers files
Stefan Schantl [Tue, 28 Mar 2023 17:10:57 +0000 (19:10 +0200)] 
archive: sysusers: Fix walking through archive for sysusers files

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agoHardening: Declare content of /usr/lib/grub as firmware files
Stefan Schantl [Tue, 28 Mar 2023 08:55:21 +0000 (10:55 +0200)] 
Hardening: Declare content of /usr/lib/grub as firmware files

This folder contains the neccessary files, which are written to
the MBR, dealing with EFI, or loading additional required grub
modules unless the whole grub menu can be displayed or a selected
OS will start up.

Some of these files are 32bit ELF files or do not have SSP etc.

So I would suggest to mark them as firmware files and therefore
skip some of the hardening tests.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agoparser: Perform a side-lookup for packages in build namespace
Michael Tremer [Fri, 24 Mar 2023 17:27:10 +0000 (17:27 +0000)] 
parser: Perform a side-lookup for packages in build namespace

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agomacros: Simplify customisation of configure/make/make install
Michael Tremer [Fri, 24 Mar 2023 17:09:24 +0000 (17:09 +0000)] 
macros: Simplify customisation of configure/make/make install

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agomacros: Move cmake/meson/ninja/perl stuff into the build namespace
Michael Tremer [Fri, 24 Mar 2023 16:56:32 +0000 (16:56 +0000)] 
macros: Move cmake/meson/ninja/perl stuff into the build namespace

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agomacros: Drop anything related to Python 2
Michael Tremer [Fri, 24 Mar 2023 16:56:13 +0000 (16:56 +0000)] 
macros: Drop anything related to Python 2

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agoFHS: Tolerate runtime linkers in /usr/lib
Michael Tremer [Fri, 24 Mar 2023 16:52:53 +0000 (16:52 +0000)] 
FHS: Tolerate runtime linkers in /usr/lib

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agoarchive: read: Correctly fail if we cannot find a file
Michael Tremer [Fri, 24 Mar 2023 16:17:22 +0000 (16:17 +0000)] 
archive: read: Correctly fail if we cannot find a file

The routine did not properly clear up the cookie after it could not find
a file in the archive.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agotests: archive: Free file handle at the end
Michael Tremer [Fri, 24 Mar 2023 16:17:12 +0000 (16:17 +0000)] 
tests: archive: Free file handle at the end

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agofile: Make the _cleanup function configurable to tidy up as well
Michael Tremer [Fri, 24 Mar 2023 16:09:32 +0000 (16:09 +0000)] 
file: Make the _cleanup function configurable to tidy up as well

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agotests: Make the testsuite compile again
Michael Tremer [Fri, 24 Mar 2023 16:09:08 +0000 (16:09 +0000)] 
tests: Make the testsuite compile again

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agotransaction: Show which step, action and package failed
Michael Tremer [Fri, 24 Mar 2023 15:58:08 +0000 (15:58 +0000)] 
transaction: Show which step, action and package failed

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agofile: Be smarter when removing files
Michael Tremer [Fri, 24 Mar 2023 15:56:41 +0000 (15:56 +0000)] 
file: Be smarter when removing files

Before, when we tried to remove a file from the filesystem, we tried to
call unlink() and if that failed, we tried rmdir() instead.

This patch changes that we will call rmdir() in the first place for
directories and unlink() for everything else so that we can catch error
codes more granulary.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agotransaction: Use cleanup function to remove all files from a filelist
Michael Tremer [Fri, 24 Mar 2023 15:56:07 +0000 (15:56 +0000)] 
transaction: Use cleanup function to remove all files from a filelist

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agofile: Whitelist libgcc_so.* and libmvec.so.* from SSP check
Michael Tremer [Fri, 24 Mar 2023 09:41:16 +0000 (09:41 +0000)] 
file: Whitelist libgcc_so.* and libmvec.so.* from SSP check

libgcc_s.so cannot be built with SSP, at least it will create some
problems linking start files later on.

libmvec should generally not be on here, but all the assembly magic
seems to confuse something so that it won't be linked okay.

Fixes: #13069
Fixes: #13070
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years ago_pakfire: Make File objects immutable
Michael Tremer [Wed, 22 Mar 2023 10:40:26 +0000 (10:40 +0000)] 
_pakfire: Make File objects immutable

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years ago_pakfire: Fix potential SEGV when accesing File attributes
Michael Tremer [Wed, 22 Mar 2023 10:35:51 +0000 (10:35 +0000)] 
_pakfire: Fix potential SEGV when accesing File attributes

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years ago_pakfire: Fix repr() output for File objects
Michael Tremer [Wed, 22 Mar 2023 10:33:51 +0000 (10:33 +0000)] 
_pakfire: Fix repr() output for File objects

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agoFHS: Allow /usr/src/kernel
Stefan Schantl [Tue, 21 Mar 2023 10:16:45 +0000 (11:16 +0100)] 
FHS: Allow /usr/src/kernel

This directory and it's subdirectories will contain the source code
and helper scripts/binaries of the current compiled kernel.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agopakfire_format_time(): Fix typo
Stefan Schantl [Tue, 21 Mar 2023 10:14:13 +0000 (11:14 +0100)] 
pakfire_format_time(): Fix typo

Fix a small typo when displaying the build time
which is longer than 1 hour.

In such a case the following message got displayed:

Build successfully completed in 01m07m02s

Which should be 01h07m02s

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agoFHS: Allow /var/mail owned by root:mail
Stefan Schantl [Mon, 20 Mar 2023 17:47:25 +0000 (18:47 +0100)] 
FHS: Allow /var/mail owned by root:mail

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agoarchive: Return a file descriptor for any archive files
Michael Tremer [Tue, 21 Mar 2023 08:14:12 +0000 (08:14 +0000)] 
archive: Return a file descriptor for any archive files

This is a lot more handy for us later on when we are dealing with any of
the payload which might potentially larger as it can now be read bit by
bit.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agoFHS: Drop /usr/bin/su from list of allowed SUID binaries
Stefan Schantl [Mon, 20 Mar 2023 11:38:49 +0000 (12:38 +0100)] 
FHS: Drop /usr/bin/su from list of allowed SUID binaries

In the Makefile (util-linx.nm) we specify some capabilities to avoid setting
the suid bit.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agoarchive: Silently ignore if systemd-sysusers could not be executed
Michael Tremer [Sun, 19 Mar 2023 20:13:27 +0000 (20:13 +0000)] 
archive: Silently ignore if systemd-sysusers could not be executed

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agojail: Move flags to individual exec commands
Michael Tremer [Sun, 19 Mar 2023 20:13:12 +0000 (20:13 +0000)] 
jail: Move flags to individual exec commands

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agostrip: Apply hack to preserve capabilities
Michael Tremer [Sun, 19 Mar 2023 19:53:44 +0000 (19:53 +0000)] 
strip: Apply hack to preserve capabilities

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agoparser: Free regular expressions
Michael Tremer [Sun, 19 Mar 2023 19:49:08 +0000 (19:49 +0000)] 
parser: Free regular expressions

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agoFHS: Allow gpasswd, ksu and pkexec to have the setuid bit set
Michael Tremer [Sun, 19 Mar 2023 19:41:02 +0000 (19:41 +0000)] 
FHS: Allow gpasswd, ksu and pkexec to have the setuid bit set

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agoFHS: Fix setuid check
Michael Tremer [Sun, 19 Mar 2023 19:37:59 +0000 (19:37 +0000)] 
FHS: Fix setuid check

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agoFHS: Silence a warning as it gets in the way of the progress bar
Michael Tremer [Sun, 19 Mar 2023 19:25:57 +0000 (19:25 +0000)] 
FHS: Silence a warning as it gets in the way of the progress bar

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agoFHS: Allow installing kernel source in /usr/src
Michael Tremer [Sun, 19 Mar 2023 19:18:50 +0000 (19:18 +0000)] 
FHS: Allow installing kernel source in /usr/src

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agofile: Check for capabilities being applied to non-executable files
Michael Tremer [Sun, 19 Mar 2023 19:16:38 +0000 (19:16 +0000)] 
file: Check for capabilities being applied to non-executable files

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agotransaction: Automatically create system users
Michael Tremer [Sun, 19 Mar 2023 19:04:05 +0000 (19:04 +0000)] 
transaction: Automatically create system users

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agotests: Check if relative/absolute paths confuse pakfire_path_match
Michael Tremer [Sun, 19 Mar 2023 19:03:30 +0000 (19:03 +0000)] 
tests: Check if relative/absolute paths confuse pakfire_path_match

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agojail: Log the path of the command we tried to execute
Michael Tremer [Sun, 19 Mar 2023 19:03:05 +0000 (19:03 +0000)] 
jail: Log the path of the command we tried to execute

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agosystemd: Automatically apply tmpfiles
Michael Tremer [Sun, 19 Mar 2023 12:57:35 +0000 (12:57 +0000)] 
systemd: Automatically apply tmpfiles

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agopackages: Fail match if we could not parse the dependency
Michael Tremer [Sun, 19 Mar 2023 12:47:00 +0000 (12:47 +0000)] 
packages: Fail match if we could not parse the dependency

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agofile: Export capabilities in Python
Michael Tremer [Sun, 19 Mar 2023 18:39:03 +0000 (18:39 +0000)] 
file: Export capabilities in Python

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agofile: Write capabilities
Michael Tremer [Sun, 19 Mar 2023 18:38:46 +0000 (18:38 +0000)] 
file: Write capabilities

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agofile: Read capabilities
Michael Tremer [Sat, 18 Mar 2023 17:11:45 +0000 (17:11 +0000)] 
file: Read capabilities

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agoFHS: Drop limitation for only non-executable files in /usr/share
Michael Tremer [Sat, 18 Mar 2023 14:48:55 +0000 (14:48 +0000)] 
FHS: Drop limitation for only non-executable files in /usr/share

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agoFHS: Allow dotfiles in /root
Michael Tremer [Sat, 18 Mar 2023 14:48:23 +0000 (14:48 +0000)] 
FHS: Allow dotfiles in /root

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agoFHS: Allow some setuid binaries
Michael Tremer [Sat, 18 Mar 2023 14:47:18 +0000 (14:47 +0000)] 
FHS: Allow some setuid binaries

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agojail: Allow setting file capabilities in the jail
Michael Tremer [Sat, 18 Mar 2023 12:50:08 +0000 (12:50 +0000)] 
jail: Allow setting file capabilities in the jail

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agomacros: Define docdir
Stefan Schantl [Sat, 18 Mar 2023 11:32:49 +0000 (12:32 +0100)] 
macros: Define docdir

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agoDrop old hardening check script
Michael Tremer [Sat, 18 Mar 2023 12:20:44 +0000 (12:20 +0000)] 
Drop old hardening check script

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agofile: Tidy up the RPATH checking code
Michael Tremer [Sat, 18 Mar 2023 12:18:59 +0000 (12:18 +0000)] 
file: Tidy up the RPATH checking code

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agofile: Extend RELRO check to check for BIND_NOW
Michael Tremer [Sat, 18 Mar 2023 12:14:42 +0000 (12:14 +0000)] 
file: Extend RELRO check to check for BIND_NOW

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agofile: Pass Dyn tag to the callback function
Michael Tremer [Sat, 18 Mar 2023 12:13:42 +0000 (12:13 +0000)] 
file: Pass Dyn tag to the callback function

Some values are not considered to be strings.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agoDrop old RPATH check script
Michael Tremer [Sat, 18 Mar 2023 11:24:07 +0000 (11:24 +0000)] 
Drop old RPATH check script

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agofile: Implement RPATH/RUNPATH check
Michael Tremer [Sat, 18 Mar 2023 11:23:32 +0000 (11:23 +0000)] 
file: Implement RPATH/RUNPATH check

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agofile: Make fetch more information from ELF sections easier
Michael Tremer [Sat, 18 Mar 2023 11:23:12 +0000 (11:23 +0000)] 
file: Make fetch more information from ELF sections easier

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agofile: Unify fetching ELF sections
Michael Tremer [Fri, 17 Mar 2023 15:45:18 +0000 (15:45 +0000)] 
file: Unify fetching ELF sections

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agofile: Rename NO-* flags to MISSING-*
Michael Tremer [Fri, 17 Mar 2023 15:30:01 +0000 (15:30 +0000)] 
file: Rename NO-* flags to MISSING-*

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agobuild: Do not perform BUILDROOT check on Python bytecode files
Michael Tremer [Fri, 17 Mar 2023 15:00:51 +0000 (15:00 +0000)] 
build: Do not perform BUILDROOT check on Python bytecode files

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agofilelist: Add option to show a progressbar
Michael Tremer [Fri, 17 Mar 2023 14:56:28 +0000 (14:56 +0000)] 
filelist: Add option to show a progressbar

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agofilelist: Add flags argument to walk function
Michael Tremer [Fri, 17 Mar 2023 14:33:30 +0000 (14:33 +0000)] 
filelist: Add flags argument to walk function

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agoFHS: Perform world writable check only for regular files
Michael Tremer [Fri, 17 Mar 2023 14:29:12 +0000 (14:29 +0000)] 
FHS: Perform world writable check only for regular files

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agomacros: Define tmpfilesdir
Michael Tremer [Fri, 17 Mar 2023 14:09:11 +0000 (14:09 +0000)] 
macros: Define tmpfilesdir

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agoFHS: Add /root
Michael Tremer [Fri, 17 Mar 2023 14:02:50 +0000 (14:02 +0000)] 
FHS: Add /root

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agofile: Set r if file could not be opened
Michael Tremer [Fri, 17 Mar 2023 14:00:08 +0000 (14:00 +0000)] 
file: Set r if file could not be opened

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agofiles: Skip payload check for empty files
Michael Tremer [Fri, 17 Mar 2023 13:59:39 +0000 (13:59 +0000)] 
files: Skip payload check for empty files

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agofile: Do not check for ELF status again when dumping issues
Michael Tremer [Fri, 17 Mar 2023 13:57:33 +0000 (13:57 +0000)] 
file: Do not check for ELF status again when dumping issues

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agobuild: Move strip check into file check
Michael Tremer [Fri, 17 Mar 2023 13:56:40 +0000 (13:56 +0000)] 
build: Move strip check into file check

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agobuild: Rename hardening check to just check
Michael Tremer [Fri, 17 Mar 2023 13:46:50 +0000 (13:46 +0000)] 
build: Rename hardening check to just check

That way, we can include some checks that are not too closely related to
any hardening issues.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agobuild: Move FHS check into hardening checks
Michael Tremer [Fri, 17 Mar 2023 13:41:55 +0000 (13:41 +0000)] 
build: Move FHS check into hardening checks

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agoFHS: Check for world-writable files
Michael Tremer [Fri, 17 Mar 2023 13:29:52 +0000 (13:29 +0000)] 
FHS: Check for world-writable files

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agoutil: Fix path pattern matching with characters after stars
Michael Tremer [Fri, 17 Mar 2023 13:24:47 +0000 (13:24 +0000)] 
util: Fix path pattern matching with characters after stars

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agofile: Remove forgotten debug statements
Michael Tremer [Fri, 17 Mar 2023 13:14:39 +0000 (13:14 +0000)] 
file: Remove forgotten debug statements

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agobuild: Perform BUILDROOT check in C
Michael Tremer [Fri, 17 Mar 2023 13:05:21 +0000 (13:05 +0000)] 
build: Perform BUILDROOT check in C

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 years agoFHS: Check for correct location and permission of shared objects
Michael Tremer [Fri, 17 Mar 2023 12:17:31 +0000 (12:17 +0000)] 
FHS: Check for correct location and permission of shared objects

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>