Luca Boccassi
e2f8c1124d
Merge pull request #21277 from yuwata/permanent-hw-addr
...
network, udev: several improvement of permanent hardware address handling
2021-11-15 10:57:30 +00:00
Luca Boccassi
b798490f77
test-strxcpyx: check result of snprintf
2021-11-14 01:28:42 +00:00
Luca Boccassi
0a040e6419
sd-event: one more assert when turning off an event source
...
CID#1465866
2021-11-13 19:12:11 +00:00
Luca Boccassi
25bb459e39
journal-remote: more handling of sd_event_source_set_enabled failures
...
But avoid clobbering the return value if it works
CID#1465793
CID#1465794
2021-11-13 19:11:55 +00:00
Luca Boccassi
76a7c636a9
Merge pull request #21341 from yuwata/network-route-flags
...
network: manage route and nexthop flags
2021-11-13 18:43:50 +00:00
Luca Boccassi
c3c50474d2
tree-wide: don't ignore return code from sd_event_source_set_enabled()
...
CID#1465793
CID#1465794
CID#1465795
2021-11-12 22:13:24 +01:00
Luca Boccassi
977e68c71b
Merge pull request #21285 from poettering/boot-os-rel-fix
...
sd-boot/bootspec: os-release parsing fixes
2021-11-11 20:23:17 +00:00
Luca Boccassi
1977d1477f
Merge pull request #21241 from wat-ze-hex/2021-11-04-fix-bpf-foreign-realization
...
core, bpf: fix bpf-foreign cgroup controller realization
2021-11-11 18:49:50 +00:00
Luca Boccassi
bb23992740
Merge pull request #21301 from yuwata/network-neighbor-use-hw-addr-data
...
network: neighbor: use "struct hw_addr_data"
2021-11-11 10:32:11 +00:00
Luca Boccassi
a704137c20
Merge pull request #21273 from yuwata/hostname-device-tree
...
hostnamed: use /proc/device-tree to get chassis type
2021-11-10 23:15:20 +00:00
Luca Boccassi
227e2fc1a7
Merge pull request #21290 from poettering/arch-me-harder
...
some docs/tweaks regarding porting to new archs
2021-11-10 18:37:01 +00:00
Luca Boccassi
fe63d890fd
Merge pull request #21293 from mrc0mmand/ci-cancel-old-jobs
...
ci: cancel previous jobs on ref update
2021-11-10 18:15:21 +00:00
Luca Boccassi
5df64f148d
Merge pull request #21237 from bluca/analyze_skip
...
analyze: allow a custom policy to skip a check
2021-11-06 11:19:40 +00:00
Luca Boccassi
82100ef486
analyze: allow a custom policy to skip a check with weight=0
...
In some cases an offline analysis should ignore some fields, for example
a portable service in an image will never list RootImage/RootDirectory, as
they are added at runtime, and thus can be skipped.
2021-11-05 22:37:34 +00:00
Luca Boccassi
03e93377dc
analyze: explain how the weight/range policy fields are used
2021-11-05 21:09:43 +00:00
Luca Boccassi
8389fd19d2
Merge pull request #20138 from keszybz/coding-style-variable-decls
...
A coding style tweak and checking of sd_notify() calls and voidification of pager_open()
2021-11-05 13:57:30 +00:00
Luca Boccassi
fac2c3e97d
basic/mountpoint-util: detect erofs as a read-only FS
2021-11-05 14:02:04 +01:00
Luca Boccassi
d54017e8f7
analyze: fix typos in test policy
2021-11-04 19:22:28 +00:00
Luca Boccassi
7544461cd0
Merge pull request #21229 from keszybz/improve-m-hint
...
Improve hint to use -M in various tools
2021-11-04 18:40:26 +00:00
Luca Boccassi
ac33cf9282
Merge pull request #21167 from poettering/various-doc-tweaks
...
Four documentation tweaks
2021-10-28 11:12:09 +01:00
Luca Boccassi
211a3d87fb
core: add [State|Runtime|Cache|Logs]Directory symlink as second parameter
...
When combined with a tmpfs on /run or /var/lib, allows to create
arbitrary and ephemeral symlinks for StateDirectory or RuntimeDirectory.
This is especially useful when sharing these directories between
different services, to make the same state/runtime directory 'backend'
appear as different names to each service, so that they can be added/removed
to a sharing agreement transparently, without code changes.
An example (simplified, but real) use case:
foo.service:
StateDirectory=foo
bar.service:
StateDirectory=bar
foo.service.d/shared.conf:
StateDirectory=
StateDirectory=shared:foo
bar.service.d/shared.conf:
StateDirectory=
StateDirectory=shared:bar
foo and bar use respectively /var/lib/foo and /var/lib/bar. Then
the orchestration layer decides to stop this sharing, the drop-in
can be removed. The services won't need any update and will keep
working and being able to store state, transparently.
To keep backward compatibility, new DBUS messages are added.
2021-10-28 10:47:46 +01:00
Luca Boccassi
df61e79a5d
core: make DynamicUser=1 and StateDirectory= work with TemporaryFileSystem=/var/lib
...
The /var/lib/private/foo -> /var/lib/foo symlink for StateDirectory and
DynamicUser is set up on the host filesystem, before the mount namespacing
is brought up. If an empty /var/lib is used, to ensure the service does not
see other services data, the symlink is then not available despite
/var/lib/private being set up as expected.
Make a list of symlinks that need to be set up, and create them after all
the namespaced filesystems have been created, but before any eventual
read-only switch is flipped.
2021-10-27 22:45:26 +01:00
Luca Boccassi
69e0830994
run: do not validate exe early if MountImages/ExtensionImages are used
...
Same as with RootImage&friends, the executable might be in the
image, so it's not visible in the host before the unit is set up.
2021-10-28 03:56:24 +09:00
Luca Boccassi
8ec6108c0b
systemctl: small fixes for MountImages pretty printing
2021-10-27 12:23:55 +01:00
Luca Boccassi
60c16c5cf3
systemctl: pretty-print ExtensionImages property
...
Complex type, so without explicit support 'systemctl show' just prints [unprintable]
2021-10-27 12:23:55 +01:00
Luca Boccassi
f3f1172cf6
docs/COREDUMP_PACKAGE_METADATA: ELF section should be allocated and 0-padded
2021-10-27 12:29:31 +02:00
Luca Boccassi
98acae1f21
docs/COREDUMP_PACKAGE_METADATA: ELF section should be read-only and 4-bytes-aligned
2021-10-26 12:49:39 +01:00
Luca Boccassi
2f13844e73
docs/COREDUMP_PACKAGE_METADATA: add architecture field
2021-10-25 23:09:43 +01:00
Luca Boccassi
6dbfbc4667
TODO: add note about chase_symlink flag
2021-10-24 17:00:49 +01:00
Luca Boccassi
0ad536c16a
CI: disable code coverage in GH Action
...
It is now ran on the nightly CentOS build, so that it can cover
integration tests too, and not just unit tests. It's nightly as
it considerably increases the integration test runtime, so it's
not appropriate for all PRs.
2021-10-21 00:10:52 +01:00
Luca Boccassi
b78524f48d
Merge pull request #21055 from yuwata/network-dhcp6-pd-route-lifetime-metric
...
network: dhcp6pd: set lifetime and route metric
2021-10-20 14:38:03 +01:00
Luca Boccassi
e740cdb6f1
Merge pull request #21026 from keszybz/licensing-info-for-generated-files
...
Licensing info for generated files
2021-10-18 13:08:36 +01:00
Luca Boccassi
0bc0726ead
Merge pull request #21002 from poettering/watchdog-off
...
minor tweaks to watchdog configuration logic
2021-10-13 20:03:06 +01:00
Luca Boccassi
ea7ded75f3
docs: add guidelines w.r.t. compatibility to docs/CONTRIBUTING.md
2021-10-12 11:09:58 +01:00
Luca Boccassi
9eb3e30a76
LICENSES/README.md: remove reference to non-existing files
...
All example code was relicensed
2021-10-12 10:53:12 +01:00
Luca Boccassi
87bd39508b
LICENSES/README.md: fix typo
2021-10-11 14:06:51 +01:00
Luca Boccassi
ccf609c88c
Merge pull request #20915 from bluca/libsystemd_openssl
...
libsystemd/sd-id128: use only internal hmac, remove khash/OpenSSL support
2021-10-09 18:37:59 +01:00
Luca Boccassi
1fc8d0c9dd
basic: remove khash helpers
...
No longer used anywhere. So long, and thanks for all the hashes!
2021-10-08 13:11:00 +01:00
Luca Boccassi
ec4afb4606
libsystemd/sd-id128: use only internal hmac, remove khash/OpenSSL support
...
Using OpenSSL brings in an additional dependency for all users of
libsystemd.so even though it's just one API that makes use of it.
The khash implementation is awkward as it requires context switches and
computation inside the kernel, thus leaving the process.
Remove both from libsystemd.so, and use exclusively the internal hmac fallback.
While this is not optimized, the sd-id128 API is not used in
performance-critical contexts where hardware acceleration would make a
noticeable difference.
2021-10-08 13:11:00 +01:00
Luca Boccassi
8d39bff4e3
basic: add hmac_sha256 implementation
...
Based on the FIPS 198 specification. Not optimized and probably
completely unsafe, to be used only for non-strong-cryptographic
purposes when OpenSSL cannot be used.
2021-10-08 13:11:00 +01:00
Luca Boccassi
6eb736727a
boot/sha256: sd-ify and move to src/fundamental
2021-10-08 13:11:00 +01:00
Luca Boccassi
5d8a725b08
fundamental: define size_t and memcpy for sd-boot
2021-10-08 13:07:00 +01:00
Luca Boccassi
2eacd9a7b6
network: assert on dereferenced pointer
...
CID#1462762
2021-10-07 22:12:19 +02:00
Luca Boccassi
c9d1c37c93
test: make OpenSSL checks optional in TEST-50-DISSECT
...
If the packages are built without libssl simply skip the signature
checks.
Oct 06 21:21:32 H systemd[1]: systemd 249.1249.gcc4df1f787.0 running in system mode (+PAM +AUDIT +SELINUX +APPARMOR +IMA +SMACK +SECCOMP +GCRYPT +GNUTLS -OPENSSL
...
Oct 06 21:22:21 H systemd[459]: Activation of signed Verity volume worked neither via the kernel nor in userspace, can't activate.
Follow-up for #20691
2021-10-07 08:41:33 +02:00
Luca Boccassi
0cf250022c
Merge pull request #20926 from yuwata/udev-net-wol-sopass
...
udev/net: introduce WakeOnLanPassword=
2021-10-06 23:36:05 +01:00
Luca Boccassi
e66ee1d7e6
Merge pull request #20893 from poettering/per-user-oom-score
...
default to higher oom scores for user sessions
2021-10-05 09:54:24 +01:00
Luca Boccassi
c82dc15b9f
test: create and merge code coverage reports in integration tests
...
If -Db_coverage=true is used at build time, then ARTIFACT_DIRECTORY/TEST-XX-FOO.coverage-info
files are created with code coverage data, and run-integration-test.sh also
merges them into ARTIFACT_DIRECTORY/merged.coverage-info since the coveralls.io
helpers accept only a single file.
2021-10-04 16:40:49 +01:00
Luca Boccassi
c40671ba16
Merge pull request #20886 from bluca/license
...
SPDX: add README and license texts
2021-10-01 22:57:11 +01:00
Luca Boccassi
9c6e32a294
Add all other applicable licenses under LICENSES/
...
License texts copied from:
https://github.com/spdx/license-list-data/blob/master/text/
2021-10-01 17:27:34 +01:00
Luca Boccassi
7fe57498de
add LICENSES/README.md explaining the license situation
2021-10-01 17:27:34 +01:00
Luca Boccassi
f4d74c6105
man: add licenses to all files that lack one
...
Documentation is licensed under LGPL-2.1-or-later.
Scripts are MIT to facilitate reuse.
Examples are relicensed to CC0-1.0 to maximise copy-and-paste
for users, with permission from authors.
2021-10-01 17:27:34 +01:00
Luca Boccassi
948def4af6
tree-wide: fix SPDX short identifier for LGPL-2.1-or-later
...
https://spdx.dev/ids/#:~:text=Allowing%20later%20versions%20of%20a%20license
https://spdx.org/licenses/LGPL-2.1-or-later.html
2021-10-01 17:27:34 +01:00
Luca Boccassi
ab885bedbf
Merge pull request #20907 from keszybz/licensing-cleanup
...
Licensing cleanup
2021-10-01 17:26:08 +01:00
Luca Boccassi
2e016f3a0b
Merge pull request #20884 from mrc0mmand/to-shellcheck-or-not-to-shellcheck
...
tree-wide: the last batch of shellcheck shenanigans
2021-09-30 20:53:00 +01:00
Luca Boccassi
5386e247f8
Merge pull request #20883 from bluca/bpf_header_license
...
headers: update bpf_insn.h to dual license
2021-09-29 18:05:28 +01:00
Luca Boccassi
f59a1ab4b0
docs: mention that contributed code must be compatible with GPL-2.0-or-later explicitly
2021-09-29 17:42:51 +01:00
Luca Boccassi
13b7d99dad
headers: update bpf_insn.h to dual license
...
This header is copied from the kernel. It was relicensed from GPL-2.0-only
to GPL-2.0-only OR BSD-2-Clause, so update our SPDX tag accordingly.
For more details and ACKS from all copyright holders authorizing the
license change see:
https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git/commit/?id=d75fe9cb1dd062684c9fb8a4581738170365dc06
2021-09-29 17:40:55 +01:00
Luca Boccassi
c1036042f5
CI: run GCC unit test job on push to main
...
Allows to get coverage data on coveralls.io
2021-09-29 14:10:42 +03:00
Luca Boccassi
3542da2442
parse-util: prefix load average macros with LOAD_AVG_
...
Follow-up for #20839
2021-09-27 20:34:41 +02:00
Luca Boccassi
3bf94dac91
CI: do manpages build only on the clang unit test run
...
It's slow and unaffected by compiler/flags, so no point in repeating it
2021-09-27 12:24:48 +01:00
Luca Boccassi
1f1d48f96e
CI: add code coverage reports via lcov and coveralls.io
2021-09-27 12:22:22 +01:00
Luca Boccassi
8b036b223a
CI: run unit tests in a network namespace
...
It seems some of the tests break network connectivity on the host,
as the code coverage upload fails to establish a connection.
Run them in a network namespace with 'unshare -n'.
2021-09-27 12:22:22 +01:00
Luca Boccassi
059c0578d7
test: double test-hashmap timeout
...
When coverage flags are used, sometimes it goes just over 90s on a
slow CI machine
2021-09-27 12:22:22 +01:00
Luca Boccassi
f0e2cfc6dc
basic: delete loadavg.h copy
...
loadavg.h is an internal header of the Linux source repository, and as
such it is licensed as GPLv2-only, without syscall exception.
We use it only for 4 macros, which are simply doing some math calculations
that cannot thus be subject to copyright.
Reimplement the same calculations in another internal header and delete
loadavg.h from our tree.
2021-09-25 07:10:44 +09:00
Luca Boccassi
2982084827
Merge pull request #20736 from keszybz/ioprio-simplification
...
Use a simple kernel-compatible header for ioprio
2021-09-22 15:46:50 +01:00
Luca Boccassi
3a18c0e5f2
Merge pull request #20806 from fbuihuu/test-make-debug-tools-optional
...
test: make the installation of the debug tools optional in the image
2021-09-22 12:01:59 +01:00
Luca Boccassi
721d13b19f
Merge pull request #20756 from benzea/benzea/usb-persist
...
hwdb: Permit unsetting power/persist for USB devices
2021-09-22 10:50:07 +01:00
Luca Boccassi
71a80dcc0b
Merge pull request #20690 from DaanDeMeyer/oomd-user-services
...
oom: Support for user services
2021-09-21 15:39:48 +01:00
Luca Boccassi
409f4cf1f2
portable: copy SELinux label when extracting units from images
...
Units are copied out via sendmsg datafd from images, but that means
the SELinux labels get lost in transit. Extract them and copy them over.
Given recvmsg cannot use multiple IOV transparently when the sizes are
variable, use a '\0' as a separator between the filename and the label.
2021-09-20 14:23:55 +01:00
Luca Boccassi
447d46879c
portable: use send_one_fd_iov/receive_one_fd_iov instead of custom helpers
...
Will be useful for the next commit switching to multiple IOVs
2021-09-20 14:23:55 +01:00
Luca Boccassi
6f7ccbcc74
selinux: add mac_selinux_create_file_prepare_label helper
...
Allow to use setfscreatecon with a custom label rather than the default
2021-09-20 14:23:55 +01:00
Luca Boccassi
f621b8d773
socket-util: const-ify iov parameter in send_one_fd_iov_sa
2021-09-20 12:30:02 +01:00
Luca Boccassi
4ee41ed515
Merge pull request #20780 from mrc0mmand/test-storage-btrfs
...
test: btrfs-related udev tests
2021-09-19 19:04:45 +01:00
Luca Boccassi
1dcd91ad11
Merge pull request #20758 from yuwata/test-17-udev-cleanups
...
test: several cleanups for TEST-17-UDEV
2021-09-16 09:45:10 +01:00
Luca Boccassi
a51f6dba60
Merge pull request #20751 from poettering/watchdog-tweaklet
...
two minor watchdog tweaklets
2021-09-15 21:48:39 +01:00
Luca Boccassi
8f8e9ad7cb
Merge pull request #20650 from fbuihuu/watchdog-rework
...
Watchdog rework
2021-09-15 14:44:49 +01:00
Luca Boccassi
e236711fd7
test: document autopkgtest CI infrastructure
2021-09-15 14:58:38 +02:00
Luca Boccassi
76ab98fa2b
docs: generic info about adding directives in ARCHITECTURE.md
2021-09-14 13:55:05 +01:00
Luca Boccassi
503994bada
Merge pull request #20701 from yuwata/network-address-cleanups
...
network: several address_update() related cleanups
2021-09-13 11:12:43 +01:00
Luca Boccassi
54966b7cee
Merge pull request #20705 from yuwata/test-oomd-util
...
test: skip oomd test on a unified container on a hybrid host
2021-09-12 12:56:46 +01:00
Luca Boccassi
c54e851acb
Merge pull request #20699 from yuwata/network-drop-foreign
...
network: do not drop foreign configs when carrier of unmanaged interface is lost
2021-09-10 21:10:58 +01:00
Luca Boccassi
992fccd411
Merge pull request #20702 from yuwata/network-trivial-cleanups
...
network: several trivial cleanups
2021-09-10 21:10:40 +01:00
Luca Boccassi
3f1487f5a0
analyze: ignore dependencies with security --offline
...
We don't care about validating dependencies here, the security verb is
only checking the unit(s) under test.
2021-09-08 19:46:57 +01:00
Luca Boccassi
afd4814651
Merge pull request #20667 from keszybz/portable-docs
...
Tweaks to documentation about portable services
2021-09-08 13:41:44 +01:00
Luca Boccassi
7728f6aa81
test: rename TEST-63-ANALYZE to solve conflict
...
Two PRs adding TEST-63-* were merged more or less at the
same time, and we missed the conflict.
2021-09-08 10:12:03 +09:00
Luca Boccassi
9ff61565be
portabled: refactor extraction/validation into a common helper
2021-09-06 13:20:01 +01:00
Luca Boccassi
239ac0c7f7
portabled: validate SYSEXT_LEVEL when attaching
...
When attaching a portable service with extensions, immediately validate
that the os-release and extension-release metadata values match, rather
than letting it fail when the units are started
2021-09-06 12:14:50 +01:00
Luca Boccassi
7bf5ec4538
portabled: error out if there are no units only after parsing all images
...
It's ok if the OS image doesn't have matching units, if we find them
in the extensions. Tidies up the parsing logic a bit.
2021-09-06 12:13:53 +01:00
Luca Boccassi
9ccb531a5f
dissect-image: add extension-specific validation flag
...
Allows callers to specify which image type they are looking for
2021-09-06 12:13:53 +01:00
Luca Boccassi
5bf20f3a0d
Merge pull request #20626 from yuwata/network-keep-master
...
network: introduce KeepMaster= setting
2021-09-04 15:08:56 +01:00
Luca Boccassi
cc3001693d
Merge pull request #20525 from maanyagoenka/custom-security
...
systemd-analyze: add option to enable users to custom define security requirements in the form of a .json file
2021-08-31 21:15:41 +01:00
Luca Boccassi
1f08acf406
Merge pull request #20257 from bluca/seqno
...
Use new diskseq block device property
2021-08-31 09:06:33 +01:00
Luca Boccassi
63814220a0
Merge pull request #20530 from keszybz/typos-and-meson
...
Typos and meson
2021-08-24 21:54:22 +01:00
Luca Boccassi
121ed16caf
tree-wide: voidify unchecked snprintf calls
...
According to Coverity, 194 ouf of 227 times we check for snprintf return code.
Voidify the rest.
CID#1461512
CID#1461513
CID#1461514
CID#1461515
CID#1461516
CID#1461518
CID#1461519
CID#1461520
CID#1461522
2021-08-20 18:29:40 +01:00
Luca Boccassi
272fff7d84
format-util/sd-bus: do not ignore snprintf result
2021-08-20 18:29:30 +01:00
Luca Boccassi
e4193309c4
hwdb-usb-device: use xsprintf
2021-08-20 18:29:30 +01:00
Luca Boccassi
a622c58993
Merge pull request #20486 from DaanDeMeyer/sd-bus-eproto
...
sd-bus: Return detailed (sd-buscntr) error from bus_container_connect_socket().
2021-08-19 23:32:34 +01:00
Luca Boccassi
468d9bc901
Merge pull request #20436 from fbuihuu/add-no-build-support-on-opensuse
...
Add no build support on opensuse
2021-08-19 21:11:31 +01:00
Luca Boccassi
61a6aa21a5
Merge pull request #20471 from poettering/format-str-proc-fd
...
add FORMAT_PROC_FD_PATH() macro for generating /proc/self/fd/ paths on-the-fly
2021-08-19 14:05:22 +01:00
Luca Boccassi
5d55791e3f
docs: document layered images in PORTABLE_SERVICES.md
2021-08-17 13:15:13 +01:00