]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
5 years agouserwork: fix signal worker sends to manager requesting more workers 15268/head
Lennart Poettering [Mon, 30 Mar 2020 13:42:02 +0000 (15:42 +0200)] 
userwork: fix signal worker sends to manager requesting more workers

That's what you get for changing these signals around, after checking
everything works, not before.

Bad, Lennart, bad!

Fixes: #15085
5 years agoci: turn off FuzzBuzz
Evgeny Vereshchagin [Mon, 30 Mar 2020 06:42:19 +0000 (06:42 +0000)] 
ci: turn off FuzzBuzz

I don't think anyone uses it.

5 years agotravis: install ninja with pip
Evgeny Vereshchagin [Sun, 29 Mar 2020 23:32:00 +0000 (23:32 +0000)] 
travis: install ninja with pip

https://mesonbuild.com/Release-notes-for-0-54-0.html#ninja-version-requirement-bumped-to-17
https://github.com/mesonbuild/meson/issues/6867

5 years agoMerge pull request #15217 from keszybz/beef-up-sd-path
Zbigniew Jędrzejewski-Szmek [Sun, 29 Mar 2020 20:57:53 +0000 (22:57 +0200)] 
Merge pull request #15217 from keszybz/beef-up-sd-path

Export sd-path functions and beef up systemd-path to show more items

5 years agosd-bus: Fix pointer alignment
Daan De Meyer [Sun, 29 Mar 2020 19:42:50 +0000 (21:42 +0200)] 
sd-bus: Fix pointer alignment

5 years agosd-bus: Add sd_bus_slot_get_current_* docs
Daan De Meyer [Sat, 28 Mar 2020 22:19:58 +0000 (23:19 +0100)] 
sd-bus: Add sd_bus_slot_get_current_* docs

5 years agoREADME.md: add repology badge
Topi Miettinen [Sat, 28 Mar 2020 11:29:35 +0000 (13:29 +0200)] 
README.md: add repology badge

Show downstream usage for various versions of systemd.

5 years agobasic: Fix capability_ambient_set_apply for kernels < 4.3
Kevin Kuehler [Fri, 27 Mar 2020 22:57:02 +0000 (15:57 -0700)] 
basic: Fix capability_ambient_set_apply for kernels < 4.3

https://github.com/systemd/systemd/pull/14133 made
capability_ambient_set_apply() acquire capabilities that were explicitly
asked for and drop all others. This change means the function is called
even with an empty capability set, opening up a code path for users
without ambient capabilities to call this function. This function will
error with EINVAL out on kernels < 4.3 because PR_CAP_AMBIENT is not
understood. This turns capability_ambient_set_apply() into a noop for
kernels < 4.3

Fixes https://github.com/systemd/systemd/issues/15225

5 years agoMerge pull request #15233 from msekletar/device-dbus
Zbigniew Jędrzejewski-Szmek [Sun, 29 Mar 2020 18:52:31 +0000 (20:52 +0200)] 
Merge pull request #15233 from msekletar/device-dbus

device: make sure we don't generate bogus PropertiesChanged signals

5 years agodevice: don't emit PropetiesChanged needlessly 15233/head
Michal Sekletár [Thu, 26 Mar 2020 12:35:11 +0000 (13:35 +0100)] 
device: don't emit PropetiesChanged needlessly

Functions called from device_setup_unit() already make sure that unit is
enqueued in case it is a new unit or properties exported on the bus have
changed.

This should prevent unnecessary DBus wakeups and associated DBus traffic
when device_setup_unit() was called while reparsing /proc/self/mountinfo
due to the mountinfo notifications. Note that we parse
/proc/self/mountinfo quite often on the busy systems (e.g. k8s container
hosts) but majority of the time mounts didn't change, only some mount
got added. Thus we don't need to generate PropertiesChanged for devices
associated with the mounts that didn't change.

Thanks to Renaud Métrich <rmetrich@redhat.com> for debugging the
problem and providing draft version of the patch.

5 years agodevice: make sure we emit PropertiesChanged signal once we set sysfs
Michal Sekletár [Thu, 26 Mar 2020 12:34:20 +0000 (13:34 +0100)] 
device: make sure we emit PropertiesChanged signal once we set sysfs

5 years agoAdd a device to 60-sensor.hwdb
24bisquitz [Sat, 28 Mar 2020 00:29:34 +0000 (01:29 +0100)] 
Add a device to 60-sensor.hwdb

Adding support for a Dell Venue 8 Pro tablet. Rotation was off by 90° to the left initially, the proposed change fixes the issue on my device.

5 years agosd-journal: remove the dead code and actually fix #14695
Michal Sekletár [Fri, 27 Mar 2020 16:01:59 +0000 (17:01 +0100)] 
sd-journal: remove the dead code and actually fix #14695

journal_file_fstat() returns an error if we call it on already unlinked
journal file and hence we never reach remove_file_real() which is the
entire point.

I must have made some mistake while testing the fix that got me thinking
the issue is gone while opposite was true.

Fixes #14695

5 years agoMerge pull request #15237 from cgzones/improve
Zbigniew Jędrzejewski-Szmek [Sat, 28 Mar 2020 08:38:16 +0000 (09:38 +0100)] 
Merge pull request #15237 from cgzones/improve

SELinux cache updates

5 years agoMerge pull request #15195 from ssahani/dhcp-option-pop-server
Zbigniew Jędrzejewski-Szmek [Sat, 28 Mar 2020 08:36:10 +0000 (09:36 +0100)] 
Merge pull request #15195 from ssahani/dhcp-option-pop-server

DHCP: Add support to emit and retrieve POP3 server

5 years agonetworkctl: Add support to display DHCP pop3 servers 15195/head
Susant Sahani [Tue, 24 Mar 2020 17:08:07 +0000 (18:08 +0100)] 
networkctl: Add support to display DHCP pop3 servers

5 years agosd-network: Add support to emit and receive pop3 server information
Susant Sahani [Mon, 23 Mar 2020 03:16:47 +0000 (04:16 +0100)] 
sd-network: Add support to emit and receive pop3 server information

5 years agoDHCP: Add support to emit and retrieve POP3 server
Susant Sahani [Fri, 27 Mar 2020 20:12:07 +0000 (21:12 +0100)] 
DHCP: Add support to emit and retrieve POP3 server

5 years agolibsystemd-network: DHCP add support to emit and retrive DHCP POP3 server
Susant Sahani [Mon, 23 Mar 2020 03:13:50 +0000 (04:13 +0100)] 
libsystemd-network: DHCP add support to emit and retrive DHCP POP3 server

5 years agodocs: Add some notes about managing graphical user sessions
Benjamin Berg [Mon, 10 Feb 2020 14:53:55 +0000 (15:53 +0100)] 
docs: Add some notes about managing graphical user sessions

This is work in progress and not finished yet. However, I hope to have
captured some of the key points that came up in previous discussions
with appropriate notes about things that still need to be defined.

I may revisit it later. Also, feel free to completely rewrite if the
format is not quite right.

5 years agoselinux: print enforcing state in access check debug message 15237/head
Christian Göttsche [Thu, 26 Mar 2020 19:15:17 +0000 (20:15 +0100)] 
selinux: print enforcing state in access check debug message

5 years agoselinux: add debug logging to cache functions
Christian Göttsche [Thu, 26 Mar 2020 19:15:13 +0000 (20:15 +0100)] 
selinux: add debug logging to cache functions

5 years agoselinux: add unlikely compiler hints for cache functions
Christian Göttsche [Thu, 26 Mar 2020 19:15:08 +0000 (20:15 +0100)] 
selinux: add unlikely compiler hints for cache functions

5 years agosd-path: handle case of missing runtime dir in test 15217/head
Zbigniew Jędrzejewski-Szmek [Thu, 26 Mar 2020 16:40:33 +0000 (17:40 +0100)] 
sd-path: handle case of missing runtime dir in test

Also document it in the man page.

5 years agopath: log at debug level when we can't query a variable
Zbigniew Jędrzejewski-Szmek [Thu, 26 Mar 2020 16:33:43 +0000 (17:33 +0100)] 
path: log at debug level when we can't query a variable

5 years agoman: fix typo
Zbigniew Jędrzejewski-Szmek [Thu, 26 Mar 2020 15:48:16 +0000 (16:48 +0100)] 
man: fix typo

5 years agosd-path: export "systemd-network-path"
Zbigniew Jędrzejewski-Szmek [Tue, 24 Mar 2020 16:12:45 +0000 (17:12 +0100)] 
sd-path: export "systemd-network-path"

Inspired by https://lists.freedesktop.org/archives/systemd-devel/2020-March/044169.html.

5 years agonetwork: move NETWORK_DIRS to path-lookup.h
Zbigniew Jędrzejewski-Szmek [Tue, 24 Mar 2020 16:02:11 +0000 (17:02 +0100)] 
network: move NETWORK_DIRS to path-lookup.h

In preparation for future changes...

5 years agoRename _PATH variables to _DIR when they refer to a directory
Zbigniew Jędrzejewski-Szmek [Tue, 24 Mar 2020 15:28:26 +0000 (16:28 +0100)] 
Rename _PATH variables to _DIR when they refer to a directory

We were very inconsistent in this, but in general _PATH signifies
a search path (separated with :), and _DIR signifies a single directory.

5 years agopath: show various systemd directories and search paths too
Zbigniew Jędrzejewski-Szmek [Tue, 24 Mar 2020 15:04:50 +0000 (16:04 +0100)] 
path: show various systemd directories and search paths too

So far we had various ad hoc APIs to query search paths:
systemd-analyze unit-paths, lookup_paths_log(), the pkgconfig file,
debug logs emitted by systemd-analyze cat-config.
But answering a simple question "what is the search path for tmpfiles,
sysusers, .network files, ..." is surprisingly hard.

I think we should have an api that makes it easy to query this. Pkgconfig is
not bad, but it is primarily a development tool, so it's not available in many
context. Also it can't provide support for paths which are influenced by
environment variables, and I'd like to be able to answer the question "what is
the search path for ..., assuming that VAR_FOO=... is set?".

Extending sd-path to support more of our internal paths seems to be most
flexible solution. We already have systemd-path which provides a nice
way to query, and we can add stuff like optional descriptions later on.
We we essentially get a nice programmatic and commmandline apis for the price
of one.

5 years agosd-path: simplify implementation of sd_path_lookup*()
Zbigniew Jędrzejewski-Szmek [Tue, 24 Mar 2020 14:18:20 +0000 (15:18 +0100)] 
sd-path: simplify implementation of sd_path_lookup*()

The two functions were duplicating a lot of functionality and more
importantly, they both had explicit lists of types which are search
paths. I want to add more types, and I don't want to have to remember
to add them to both lists.

5 years agoMove path-lookup.c to src/basic
Zbigniew Jędrzejewski-Szmek [Tue, 24 Mar 2020 11:21:41 +0000 (12:21 +0100)] 
Move path-lookup.c to src/basic

I want to use it from sd-path later on so it needs to be moved out of
src/shared (libsystemd is not allowed to use code from src/shared).

5 years agoSplit out generator directory setup to a src/core/generator-setup.c
Zbigniew Jędrzejewski-Szmek [Tue, 24 Mar 2020 11:17:43 +0000 (12:17 +0100)] 
Split out generator directory setup to a src/core/generator-setup.c

Those functions have only one non-test user, so we can move them to src/core/.

5 years agosd-path,strv: add simple helper to wrap oom handling around strv_split_nulstr()
Zbigniew Jędrzejewski-Szmek [Tue, 24 Mar 2020 10:28:25 +0000 (11:28 +0100)] 
sd-path,strv: add simple helper to wrap oom handling around strv_split_nulstr()

5 years agoman: add sd_path_lookup(3)
Zbigniew Jędrzejewski-Szmek [Mon, 23 Mar 2020 19:36:41 +0000 (20:36 +0100)] 
man: add sd_path_lookup(3)

5 years agolibsystemd: install sd-path.h and export sd_path_lookup{,_strv}
Zbigniew Jędrzejewski-Szmek [Mon, 23 Mar 2020 19:37:47 +0000 (20:37 +0100)] 
libsystemd: install sd-path.h and export sd_path_lookup{,_strv}

Those are not terribly imporant functions, but we have them, and there's
no reason not to export them.

5 years agomeson: run a no-op build to generate man rules
Zbigniew Jędrzejewski-Szmek [Mon, 23 Mar 2020 19:39:23 +0000 (20:39 +0100)] 
meson: run a no-op build to generate man rules

When a new page is added using man/update-man-rules, ninja doesn't know
about the new target until a build is initiated, so build/man/man and
build/man/html would fail. Force a trivial build to regenerate the rules
before calling 'ninja -t'.

5 years agosd-path: rename the two functions
Zbigniew Jędrzejewski-Szmek [Mon, 23 Mar 2020 18:50:59 +0000 (19:50 +0100)] 
sd-path: rename the two functions

I think the two names were both pretty bad. They did not give a proper hint
what the difference between the two functions is, and sd_path_home sounds like
it is somehow related to /home or home directories or whatever, when in fact
both functions return the same set of paths as either a colon-delimited string
or a strv. "_strv" suffix is used by various functions in sd-bus, so let's
reuse that.

Those functions are not public yet, so let's rename.

5 years agotest-sd-path: basic test for the sd-path API
Zbigniew Jędrzejewski-Szmek [Mon, 23 Mar 2020 18:12:55 +0000 (19:12 +0100)] 
test-sd-path: basic test for the sd-path API

5 years ago{systemd,udev}.pc: add names with underscores, deprecate the old ones
Zbigniew Jędrzejewski-Szmek [Mon, 23 Mar 2020 17:39:07 +0000 (18:39 +0100)] 
{systemd,udev}.pc: add names with underscores, deprecate the old ones

The names with multiple lowercase words run together are hard to read.  We
started that way with very short names like rootprefix, but then same pattern
was applied to longer and longer names. Looking at the body of .pc files
available on my machine, many packages use underscores; let's do the same. Old
names are kept for compatiblity, so this is backwards compatible.

5 years agopath: align columns
Zbigniew Jędrzejewski-Szmek [Mon, 23 Mar 2020 14:09:05 +0000 (15:09 +0100)] 
path: align columns

Without that it's really hard to see what items are in the table...

5 years agohwdb: add Star Lite Mk II and Star LabTop Mk III (#14621)
Sean-StarLabs [Fri, 27 Mar 2020 19:07:58 +0000 (19:07 +0000)] 
hwdb: add Star Lite Mk II and Star LabTop Mk III (#14621)

5 years agoAdd Lenovo IdeaPad Miix 300 ACCEL_MOUNT_MATRIX
Tom [Sat, 21 Mar 2020 12:08:06 +0000 (13:08 +0100)] 
Add Lenovo IdeaPad Miix 300 ACCEL_MOUNT_MATRIX

5 years agouser-util: Allow names starting with a digit
Balint Reczey [Wed, 18 Mar 2020 17:29:02 +0000 (18:29 +0100)] 
user-util: Allow names starting with a digit

In 1a29610f5fa1bcb2eeb37d2c6b79d8d1a6dbb865 the change inadvertedly
disabled names with digit as the first character. This follow-up change
allows a digit as the first character in compat mode.

Fixes: #15141
5 years agocore/unit: print info when unit_add_name failed
Wen Yang [Wed, 25 Mar 2020 09:08:50 +0000 (17:08 +0800)] 
core/unit: print info when unit_add_name failed

When there are hundreds of mounts on the server, it will take a long
time to analyze the failure of a certain mount unit. So it is useful
to print the reason why unit_add_name() failed.

5 years agoRemove stale doc about PrivateNetwork and type
Zhu Li [Wed, 25 Mar 2020 16:11:52 +0000 (11:11 -0500)] 
Remove stale doc about PrivateNetwork and type

5 years agosystemd-network-generator.service: network-pre.target is a passive target unit
Franck Bui [Fri, 27 Mar 2020 08:22:39 +0000 (09:22 +0100)] 
systemd-network-generator.service: network-pre.target is a passive target unit

5 years agoAdd `shell` to machinectl ZSH completion
Pieter Lexis [Fri, 27 Mar 2020 10:26:14 +0000 (11:26 +0100)] 
Add `shell` to machinectl ZSH completion

5 years agoMerge pull request #15186 from DaanDeMeyer/clangd-fix-wstring-plus-int
Anita Zhang [Thu, 26 Mar 2020 23:45:01 +0000 (16:45 -0700)] 
Merge pull request #15186 from DaanDeMeyer/clangd-fix-wstring-plus-int

Silence Wstring-plus-int warning when using clangd with GCC.

5 years agoMerge pull request #15236 from ssahani/br-follow-up
Anita Zhang [Thu, 26 Mar 2020 23:27:33 +0000 (16:27 -0700)] 
Merge pull request #15236 from ssahani/br-follow-up

shared- bride util allign bridge_state_table

5 years agoshared- bride util allign bridge_state_table 15236/head
Susant Sahani [Thu, 26 Mar 2020 18:43:58 +0000 (19:43 +0100)] 
shared- bride util allign bridge_state_table

5 years agopo: update Ukrainian translation (#15228)
Yuri Chornoivan [Thu, 26 Mar 2020 17:45:41 +0000 (19:45 +0200)] 
po: update Ukrainian translation (#15228)

5 years agoMerge pull request #15224 from ssahani/geneve
Zbigniew Jędrzejewski-Szmek [Thu, 26 Mar 2020 17:30:37 +0000 (18:30 +0100)] 
Merge pull request #15224 from ssahani/geneve

networkctl: Display more geneve properties

5 years agopath-lookup: Use default value for XDG_CONFIG_DIRS if environment is not set
David Edmundson [Wed, 25 Mar 2020 22:49:35 +0000 (22:49 +0000)] 
path-lookup: Use default value for XDG_CONFIG_DIRS if environment is not set

If XDG_CONFIG_DIRS is unset, the specification says we should assume
/etc/xdg.

5 years agoMerge pull request #15214 from ssahani/networkctl-br1
Zbigniew Jędrzejewski-Szmek [Thu, 26 Mar 2020 16:51:29 +0000 (17:51 +0100)] 
Merge pull request #15214 from ssahani/networkctl-br1

network: Introduce bridge util

5 years agoMerge pull request #15170 from keszybz/sd-bus-resolve-magic
Zbigniew Jędrzejewski-Szmek [Thu, 26 Mar 2020 16:08:09 +0000 (17:08 +0100)] 
Merge pull request #15170 from keszybz/sd-bus-resolve-magic

sd-bus: resolve SD_BUS_DEFAULT_* in more places

5 years agoMerge pull request #15209 from anitazha/moar-cgroup-utils
Zbigniew Jędrzejewski-Szmek [Thu, 26 Mar 2020 15:54:08 +0000 (16:54 +0100)] 
Merge pull request #15209 from anitazha/moar-cgroup-utils

cgroup-utils: convenience helpers

5 years agoMerge pull request #15191 from GiedriusS/feature/list-unit-files-return-1
Anita Zhang [Wed, 25 Mar 2020 23:50:30 +0000 (16:50 -0700)] 
Merge pull request #15191 from GiedriusS/feature/list-unit-files-return-1

systemctl: exit with 1 if no unit files found

5 years agosystemctl: exit with 1 if no unit files found 15191/head
Giedrius Statkevičius [Sun, 22 Mar 2020 13:49:55 +0000 (15:49 +0200)] 
systemctl: exit with 1 if no unit files found

Add a simple check on the number of unit files that were found: return
`-ENOENT` when none is found from the function and thus `systemctl`
consequently exits with `1` (`EXIT_FAILURE`) if none were found.

Verification:
```bash
root@image:~# systemctl list-unit-files dbus-nonexistant.service; echo
$?
UNIT FILE STATE VENDOR PRESET

0 unit files listed.
1
root@image:~# systemctl list-unit-files dbus.service; echo $?
UNIT FILE    STATE  VENDOR PRESET
dbus.service static enabled

1 unit files listed.
0
```

Fixes #15082.

5 years agonetworkctl: Display more geneve preperties 15224/head
Susant Sahani [Wed, 25 Mar 2020 13:52:52 +0000 (14:52 +0100)] 
networkctl: Display more geneve preperties

5 years agonetwork: Introduce geneve util
Susant Sahani [Wed, 25 Mar 2020 13:52:31 +0000 (14:52 +0100)] 
network: Introduce geneve util

5 years agocgroup-util: cg_get_xattr_malloc helper 15209/head
Anita Zhang [Wed, 18 Mar 2020 00:47:19 +0000 (17:47 -0700)] 
cgroup-util: cg_get_xattr_malloc helper

`cg_get_xattr_malloc` to read a cgroup xattr value and allocate space
to hold said value (simple helper combining existing functions).

5 years agocgroup-util: helper to cg_get_attribute and convert to uint64_t
Anita Zhang [Sun, 8 Mar 2020 01:14:35 +0000 (17:14 -0800)] 
cgroup-util: helper to cg_get_attribute and convert to uint64_t

A common pattern in the codebase is reading a cgroup memory value
and converting it to a uint64_t. Let's make it a helper and refactor a
few places to use it so it's more concise.

5 years agonetwork: attach sd-event in link_load() when creating link dhcp_client or ipv4ll
Dan Streetman [Mon, 23 Mar 2020 21:34:17 +0000 (17:34 -0400)] 
network: attach sd-event in link_load() when creating link dhcp_client or ipv4ll

Commit 08c588d18b1e337f856e6541f3f711be48718279 moved attachment of the
sd-event into creation of the dhcp_client or ipv4ll in dhcp4_configure()
or ipv4ll_configure(), but these can also be created in link_load(),
so that creation needs to also perform sd-event attachment.

Without this, dhcp_client or ipv4ll created in link_load() will not have
an ->event and will fail assertion, causing networkd to fail, e.g.:

Assertion 'client->event' failed at src/libsystemd-network/sd-dhcp-client.c:1283, function client_start_delayed(). Ignoring.
ens2: Could not acquire DHCPv4 lease: Invalid argument
ens2: Failed

5 years agonetworkctl: Use string table for bridge state 15214/head
Susant Sahani [Tue, 24 Mar 2020 11:23:35 +0000 (12:23 +0100)] 
networkctl: Use string table for bridge state

5 years agoshared: Introduce bridge util
Susant Sahani [Tue, 24 Mar 2020 11:23:08 +0000 (12:23 +0100)] 
shared: Introduce bridge util

5 years agonetworkctl: Add more bridge properties
Susant Sahani [Sun, 22 Mar 2020 13:27:30 +0000 (14:27 +0100)] 
networkctl: Add more bridge properties

5 years agoMerge pull request #15185 from ssahani/fix-sip-copy-paste
Zbigniew Jędrzejewski-Szmek [Tue, 24 Mar 2020 09:03:57 +0000 (10:03 +0100)] 
Merge pull request #15185 from ssahani/fix-sip-copy-paste

network: DHCP lease load SIP copy paste error

5 years agodavfs is a network file system
pelzvieh [Mon, 23 Mar 2020 10:15:11 +0000 (11:15 +0100)] 
davfs is a network file system

5 years agoFall back to kexec when no kexec binary exists
Arusekk [Sun, 22 Mar 2020 09:41:18 +0000 (10:41 +0100)] 
Fall back to kexec when no kexec binary exists

This may be not a popular setup, but in case kexec resides somewhere different
than the default location for KEXEC (`/usr/sbin/kexec`), don't just reboot and
try doing `reboot(RB_KEXEC)` instead, just like what `kexec -e` normally does.

5 years agounits: Don't mount tracefs in LXC
Balint Reczey [Sun, 22 Mar 2020 20:37:06 +0000 (21:37 +0100)] 
units: Don't mount tracefs in LXC

Mounting tracefs fails in unprivileged LXC containers and latest LXD
(3.23) bind mounts tracefs already.

Fixes https://github.com/lxc/lxd/issues/7059

5 years agoswap: check p->what for NULL
Vito Caputo [Sat, 21 Mar 2020 05:47:38 +0000 (22:47 -0700)] 
swap: check p->what for NULL

Commit 61f9cf4e4c introduced swap_get_parameters(s) but only
checked its return for NULL and not its ->what.

Fixes https://github.com/systemd/systemd/issues/15070

5 years agoman: fix typo in loader.conf(5)
ml [Sun, 22 Mar 2020 18:00:21 +0000 (19:00 +0100)] 
man: fix typo in loader.conf(5)

5 years agosd-bus: Add sd_bus_send docs + cleanups.
Daan De Meyer [Thu, 19 Mar 2020 17:52:52 +0000 (18:52 +0100)] 
sd-bus: Add sd_bus_send docs + cleanups.

5 years agonetworkctl: Add support to display SIP servers 15185/head
Susant Sahani [Sun, 22 Mar 2020 09:40:00 +0000 (10:40 +0100)] 
networkctl: Add support to display SIP servers

```
❯ build/networkctl status veth99                                                                                                                                                           ─╯
● 17: veth99
                     Link File: /usr/lib/systemd/network/99-default.link
                  Network File: /usr/lib/systemd/network/veth99.network
                          Type: ether
                         State: routable (configured)
                        Driver: veth
                    HW Address: 1e:04:f8:b8:2f:d4
                           MTU: 1500 (min: 68, max: 65535)
                         QDisc: noqueue
  IPv6 Address Generation Mode: eui64
          Queue Length (Tx/Rx): 1/1
              Auto negotiation: no
                         Speed: 10Gbps
                        Duplex: full
                          Port: tp
                       Address: 192.168.5.35 (DHCP4)
                                fe80::1c04:f8ff:feb8:2fd4
                       Gateway: 192.168.5.1
                           DNS: 192.168.5.1
                           NTP: 192.168.5.1
                           SIP: 192.168.5.4
                                192.168.5.5
                     Time Zone: Europe/Berlin

Mar 21 23:26:32 Zeus systemd-networkd[671]: veth99: Link DOWN
Mar 21 23:26:32 Zeus systemd-networkd[671]: veth99: Lost carrier
Mar 22 10:25:35 Zeus systemd-networkd[671]: veth99: Link UP
Mar 22 10:25:35 Zeus systemd-networkd[671]: veth99: Gained carrier
Mar 22 10:25:36 Zeus systemd-networkd[671]: veth99: Gained IPv6LL
Mar 22 10:29:02 Zeus systemd-networkd[671]: veth99: Link DOWN
Mar 22 10:29:02 Zeus systemd-networkd[671]: veth99: Lost carrier
Mar 22 10:29:13 Zeus systemd-networkd[671]: veth99: Link UP
Mar 22 10:29:13 Zeus systemd-networkd[671]: veth99: Gained carrier
Mar 22 10:29:14 Zeus systemd-networkd[671]: veth99: Gained IPv6LL

```

5 years agosd-network: Provice APIs to access SIP servers given by DHCP4 server
Susant Sahani [Sun, 22 Mar 2020 09:39:23 +0000 (10:39 +0100)] 
sd-network: Provice APIs to access SIP servers given by DHCP4 server

5 years agoSilence Wstring-plus-int warning when using clangd with GCC. 15186/head
Daan De Meyer [Sat, 21 Mar 2020 21:23:19 +0000 (22:23 +0100)] 
Silence Wstring-plus-int warning when using clangd with GCC.

5 years agonetwork: DHCP lease load SIP copy paste error
Susant Sahani [Sat, 21 Mar 2020 17:32:51 +0000 (18:32 +0100)] 
network: DHCP lease load SIP copy paste error

5 years agosd-bus: whitespace adjustments 15170/head
Zbigniew Jędrzejewski-Szmek [Thu, 19 Mar 2020 20:31:04 +0000 (21:31 +0100)] 
sd-bus: whitespace adjustments

5 years agosd-bus: support SD_BUS_DEFAULT* and don't crash in functions where bus is optional
Zbigniew Jędrzejewski-Szmek [Thu, 19 Mar 2020 20:30:44 +0000 (21:30 +0100)] 
sd-bus: support SD_BUS_DEFAULT* and don't crash in functions where bus is optional

In those functions where bus defaults to the m->bus, we should also
resolve the magic parameters. And if neither called with bus=NULL
and an unattached message, return properly instead of crashing in assert
later.

5 years agosd-bus: make sure SD_BUS_DEFAULT* works everywhere
Zbigniew Jędrzejewski-Szmek [Thu, 19 Mar 2020 20:28:25 +0000 (21:28 +0100)] 
sd-bus: make sure SD_BUS_DEFAULT* works everywhere

I'm not sure why those functions were not touched in
45b1f410ba699990e4033805fe64cc369b835f10. Anyway, it seems easier
to just support the magic parameters everywhere.

5 years agosd-bus: Add sd_bus_reply_method_return docs + cleanups
Daan De Meyer [Thu, 19 Mar 2020 18:52:54 +0000 (19:52 +0100)] 
sd-bus: Add sd_bus_reply_method_return docs + cleanups

5 years agosd-bus: add sd_bus_message_seal docs + cleanups
Daan De Meyer [Wed, 18 Mar 2020 19:47:49 +0000 (20:47 +0100)] 
sd-bus: add sd_bus_message_seal docs + cleanups

5 years agoFix keys on Medion Akoya P6669
Finn [Wed, 11 Mar 2020 20:38:58 +0000 (21:38 +0100)] 
Fix keys on Medion Akoya P6669

5 years agologin: allow non-console sessions to change vt
Arnaud Ferraris [Sat, 14 Mar 2020 01:08:50 +0000 (02:08 +0100)] 
login: allow non-console sessions to change vt

When starting a wayland session through a systemd service for a non-root
user, the compositor (based on wlroots) is denied the authorization to
change vt.
Once the user logs in, either through a local console or via ssh, the
compositor can work properly.

This is related to the login polkit policy:
- `allow_inactive` has value `auth_admin_keep`, denying any non-root
  user session the authorization to change vt
- `allow_active` has value `yes`, which explains why the vt change
  becomes possible once the user logs in through another channel

By changing the `allow_inactive` value to `yes`, any user session setup
in a service file can switch vt, allowing wayland sessions for non-root
users.

5 years agologind: log a more accurate error when we failed at session creation
Franck Bui [Tue, 17 Mar 2020 17:30:58 +0000 (18:30 +0100)] 
logind: log a more accurate error when we failed at session creation

We used to log the following error:

  "Start job for unit user-1000.slice failed with 'canceled'"

which can be really misleading if the actual job failed at *stopping* a unit.

Indeed "Start" was hard coded but it was wrong since we can also fail with stop
jobs which are enqueued when a session is stopped.

5 years agoMerge pull request #15153 from keszybz/man-bus-address
Zbigniew Jędrzejewski-Szmek [Thu, 19 Mar 2020 08:11:14 +0000 (09:11 +0100)] 
Merge pull request #15153 from keszybz/man-bus-address

Add two man pages for sd-bus

5 years agonetwork: Fix split in `SendOption=` on client and server
David Wood [Fri, 28 Feb 2020 18:28:49 +0000 (18:28 +0000)] 
network: Fix split in `SendOption=` on client and server

When specifying `DHCPv4.SendOption=`, it is used by systemd-networkd to
set the value of that option within the DHCP request that is sent out.
This differs to setting `DHCPServer.SendOption=`, which will place all
the options together as suboptions into the vendor-specific information
(code 43) option.

This commit adds two new config options, `DHCPv4.SendVendorOption=` and
`DHCPServer.SendVendorOption=`. These both have the behaviour of the old
`DHCPServer.SendOption=` flag, and set the value of the suboption in the
vendor-specific information option.

The behaviour of `DHCPServer.SendOption=` is then changed to reflect
that of `DHCPv4.SendOption=`. It will set the value of the corresponding
option in the DHCP request.

5 years agonetworkctl: Add support to display IPv6 addrgenmode
Susant Sahani [Wed, 18 Mar 2020 12:42:27 +0000 (13:42 +0100)] 
networkctl: Add support to display IPv6 addrgenmode

5 years agoselinux: delay mac_selinux_enforcing call after SELinux was determined to be enabled
Christian Göttsche [Tue, 17 Mar 2020 17:11:14 +0000 (18:11 +0100)] 
selinux: delay mac_selinux_enforcing call after SELinux was determined to be enabled

Calling `mac_selinux_enforcing()`, which calls `security_getenforce()`, on a SELinux disabled system causes the following error message to be printed:
    Failed to get SELinux enforced status: No such file or directory

Fixes: 257188f80ce1a083e3a88b679b898a73fecab53b ("selinux: cache enforced status and treat retrieve failure as enforced mode")
Supersedes: #15145

5 years agosd-bus: sd_bus_set/get_method_call_timeout docs + cleanups.
Daan De Meyer [Wed, 18 Mar 2020 18:29:57 +0000 (19:29 +0100)] 
sd-bus: sd_bus_set/get_method_call_timeout docs + cleanups.

5 years agoman: say "is" not "has been" 15153/head
Zbigniew Jędrzejewski-Szmek [Wed, 18 Mar 2020 16:57:07 +0000 (17:57 +0100)] 
man: say "is" not "has been"

5 years agoman: mention sd_bus_is_anonymous() and sd_bus_is_trusted()
Zbigniew Jędrzejewski-Szmek [Wed, 18 Mar 2020 16:00:02 +0000 (17:00 +0100)] 
man: mention sd_bus_is_anonymous() and sd_bus_is_trusted()

5 years agosd-bus: mark sd_bus_try_close() as deprecated
Zbigniew Jędrzejewski-Szmek [Wed, 18 Mar 2020 15:40:50 +0000 (16:40 +0100)] 
sd-bus: mark sd_bus_try_close() as deprecated

codesearch.debian.net shows no uses (except for the definition in systemd and
elogind).

$ cat > test.c

int main() {
  sd_bus_try_close(NULL);
  return 0;
}
$ gcc -Isrc/systemd -Wall -o testbus test.c -lsystemd
test.c: In function ‘main’:
test.c:4:3: warning: ‘sd_bus_try_close’ is deprecated [-Wdeprecated-declarations]
    4 |   sd_bus_try_close(NULL);
      |   ^~~~~~~~~~~~~~~~
In file included from test.c:1:
src/systemd/sd-bus.h:180:5: note: declared here
  180 | int sd_bus_try_close(sd_bus *bus) _sd_deprecated_; /* deprecated */
      |     ^~~~~~~~~~~~~~~~

5 years agobus: drop dead code for kdbus support
Zbigniew Jędrzejewski-Szmek [Wed, 18 Mar 2020 15:36:14 +0000 (16:36 +0100)] 
bus: drop dead code for kdbus support

sd_bus_try_close() always returns -EOPNOTSUPP if bus is a valid object.
It nevers returns -EBUSY. So we'd always go into the "fallback" path.

5 years agoman: describe sd_bus_default_flush_close()
Zbigniew Jędrzejewski-Szmek [Wed, 18 Mar 2020 15:28:35 +0000 (16:28 +0100)] 
man: describe sd_bus_default_flush_close()

5 years agoman: add sd_bus_set_address(3)
Zbigniew Jędrzejewski-Szmek [Wed, 18 Mar 2020 12:22:29 +0000 (13:22 +0100)] 
man: add sd_bus_set_address(3)

5 years agosd-bus: make bus_set_address_user always go through sd_bus_set_address
Zbigniew Jędrzejewski-Szmek [Wed, 18 Mar 2020 11:16:06 +0000 (12:16 +0100)] 
sd-bus: make bus_set_address_user always go through sd_bus_set_address

This way all the checks are done, and we don't leak a pointer if
bus_set_address_user() is called twice.

5 years agoman: add sd_bus_start(3)
Zbigniew Jędrzejewski-Szmek [Wed, 18 Mar 2020 10:38:15 +0000 (11:38 +0100)] 
man: add sd_bus_start(3)

5 years agonetworkctl: Add support to display bond
Susant Sahani [Wed, 18 Mar 2020 07:50:15 +0000 (08:50 +0100)] 
networkctl: Add support to display bond