Compare commits

...

3 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek 28365e88d0 analyze: fix 'cat-config systemd/zram-generator.conf'
Also makes this work for various systemd config files that support .d.
2020-08-05 20:23:52 +02:00
Axel Rasmussen a119185c02 selinux: improve comment about getcon_raw semantics
This code was changed in this pull request:
https://github.com/systemd/systemd/pull/16571

After some discussion and more investigation, we better understand
what's going on. So, update the comment, so things are more clear
to future readers.
2020-08-05 20:20:45 +02:00
Marc Kleine-Budde 3f449f2106 Update DISCOVERABLE_PARTITIONS.md
This patch fixes a typo in the link to the systemd-id128 documentation.
2020-08-05 19:55:26 +02:00
3 changed files with 11 additions and 2 deletions

View File

@ -64,7 +64,7 @@ Other GPT type IDs might be used on Linux, for example to mark software RAID or
LVM partitions. The definitions of those GPT types is outside of the scope of LVM partitions. The definitions of those GPT types is outside of the scope of
this specification. this specification.
[systemd-id128(1)](http://www.freedesktop.org/software/systemd/man/systemd-i128.html) [systemd-id128(1)](http://www.freedesktop.org/software/systemd/man/systemd-id128.html)
may be used to list those UUIDs. may be used to list those UUIDs.
## Partition Names ## Partition Names

View File

@ -50,7 +50,10 @@ int mac_selinux_setup(bool *loaded_policy) {
/* Already initialized by somebody else? */ /* Already initialized by somebody else? */
r = getcon_raw(&con); r = getcon_raw(&con);
/* getcon_raw can return 0, and still give us a NULL pointer. */ /* getcon_raw can return 0, and still give us a NULL pointer if
* /proc/self/attr/current is empty. SELinux guarantees this won't
* happen, but that file isn't specific to SELinux, and may be provided
* by some other arbitrary LSM with different semantics. */
if (r == 0 && con) { if (r == 0 && con) {
initialized = !streq(con, "kernel"); initialized = !streq(con, "kernel");
freecon(con); freecon(con);

View File

@ -234,6 +234,12 @@ static int guess_type(const char **name, char ***prefixes, bool *is_collection,
if (!n) if (!n)
return log_oom(); return log_oom();
/* All systemd-style config files should support the /usr-/etc-/run split and
* dropins. Let's add a blanket rule that allows us to support them without keeping
* an explicit list. */
if (path_startswith(n, "systemd") && endswith(n, ".conf"))
usr = true;
delete_trailing_chars(n, "/"); delete_trailing_chars(n, "/");
if (endswith(n, ".d")) if (endswith(n, ".d"))