summaryrefslogtreecommitdiffstats
path: root/src/timedate (unfollow)
Commit message (Collapse)AuthorFilesLines
2024-08-20tests: Don't override QemuKvm= value if TEST_NO_KVM=0Daan De Meyer1-1/+1
Let's disable KVM if TEST_NO_KVM=1 is set but let's not specify anything if it's not set so the QemuKvm= setting from mkosi.conf is used.
2024-08-20network/address-label: allow to configure IPv6 address label in networkd.confYu Watanabe10-25/+203
Closes #23159.
2024-08-20network/queue: introduce manager_queue_request_full()Yu Watanabe2-0/+29
Currently it is not used, but will be used later.
2024-08-20network/address-label: split out address_label_fill_message()Yu Watanabe1-9/+18
No functional change, just refactoring and preparation for later commits.
2024-08-20network/address-label: several cleanups for conf parsersYu Watanabe1-5/+15
- Check userdata, instead of data, though they point to the same position. - Support an empty string. - Use UINT32_MAX, as the label is uint32_t.
2024-08-20network/address-label: introduce custom hash_opsYu Watanabe2-2/+10
No functional change, just refactoring.
2024-08-20shared: invoke agents only when we have a controlling TTYLennart Poettering2-0/+16
being connected to a TTY is not really enough to determine interactivity in many cases. Let's also check if we have a controlling TTY. Inspired by #34016
2024-08-20man: fix ID_NET_LABEL_ONBOARD= documentationLennart Poettering1-4/+2
We do not prefix the field with anything, since 8c053c83ae3c18342c4faaa0043d787884056614.
2024-08-20resolved: demote the global unicast scopeRonan Pigott2-2/+6
This will greatly reduce the number of cases where the global unicast scope overlaps with link scopes configured as default-route, making it feasible to use the global DNS setting in conjunction with per-link dns servers configured by the network. This change is preferred over demoting links to default-route=no where the user prefers to use the network provided DNS servers, and I expect it is non-disruptive in that it should not degrade the efficacy of any existing configuration.
2024-08-20tree-wide: use isatty_safe() moreLennart Poettering19-32/+36
2024-08-20terminal-util: don't assume errno is correctly set when using isatty_safe()Lennart Poettering3-5/+5
let's instead generate ENOTTY on our own. This is more correct with out coding style (since we generally do not propagate errors via errno), and also addresses #34039 as side effect. (#34039 really needs to be fixed in musl though, too, this is just a work-around as side-effect). Fixes: #34039
2024-08-20terminal-util: fix isatty_safe() on hung-up TTYsLennart Poettering1-0/+6
glibc returs EIO on ttys that are hung up. That's not really correct, POSIX seems to disagree. Work around this in our code, and turn this into a clean "1", since a hung up tty doesn't stop being a tty just because it is hung up. Background: https://github.com/systemd/systemd/pull/34039
2024-08-20test-network: make kernel send NA with router flagYu Watanabe1-0/+1
If the router interface send NA without router flag, client interface will drop SLAAC addresses. To make the router interface send NA with router flag, IPv6 forwarding needs to be enabled. === client: NDISC: Received Neighbor Advertisement from fe80::1034:56ff:fe78:9a99: Router=no, Solicited=yes, Override=no client: NDISC: Invoking callback for 'neighbor' event. client: Removing NDisc route (configured): dst: 2002:da8:1:99::/64, src: n/a, gw: n/a, prefsrc: n/a, table: main(254), priority: 1024, proto: ra, scope: global, type: unicast, flags: n/a client: Removing NDisc route (configured): dst: n/a, src: n/a, gw: fe80::1034:56ff:fe78:9a99, prefsrc: n/a, table: main(254), priority: 1024, proto: ra, scope: global, type: unicast, flags: n/a client: Removing NDisc address (configured): 2002:da8:1:99:1034:56ff:fe78:9a00/64 (valid for 23h 59min 58s, preferred for 3h 59min 58s), flags: manage-temporary-address,no-prefixroute, scope: global ===
2024-08-20namespace: Fix extension release memory leakmaia x.1-8/+14
In apply_one_mount(), in the MOUNT_EXTENSION_DIRECTORY case, char **extension_release was used as a return pointer twice but only cleaned up once in the end. Fix it by removing duplicate code that was causing this issue. Fixes issue introduced in 55ea4ef096543d2bceea9315868d5aca945d7a57.
2024-08-19network/routing-policy-rule: drop unused argumentYu Watanabe1-5/+3
2024-08-19network/routing-policy-rule: introduce ref and unref functions for ↵Yu Watanabe3-43/+81
RoutingPolicyRule No functional change, just refactoring and preparation for later change.
2024-08-19network/routing-policy-rule: manage all flagsYu Watanabe3-11/+7
Currently, only FIB_RULE_INVERT flag can be configurable, but for simplicity and future extension, let's manage all flags. No functional change, just refactoring.
2024-08-19network/routing-policy-rule: use int32_t for suppress_prefixlenYu Watanabe3-4/+4
The kernel parses FRA_SUPPRESS_PREFIXLEN as uint32_t, but internally handled as signed integer and negative values as unset. Let's explicitly specify the size of the variable. No functional change, just refactoring.
2024-08-19network/routing-policy-rule: reorder elements of RoutingPolicyRule and add ↵Yu Watanabe1-28/+27
comments No functional change, just refactoring.
2024-08-19network/routing-policy-rule: update hash and compare function for fib ruleYu Watanabe1-109/+90
Let's manage fib rules with the logic used by the kernel. Should not change any behavior.
2024-08-19test-dhcp-server: Gracefully handle the network being downDaan De Meyer1-1/+5
2024-08-19run: also enable interactive authentication on opening ptyYu Watanabe1-2/+4
2024-08-19run: use sd_bus_set_allow_interactive_authorization()Yu Watanabe1-12/+2
2024-08-19mount: use sd_bus_set_allow_interactive_authorization()Yu Watanabe1-12/+2
2024-08-19timedatectl: drop unnecessary temporal variablesYu Watanabe1-3/+2
Also drop unnecessary spaces.
2024-08-19tree-wide: voidify polkit_agent_open_if_enabled()Yu Watanabe9-42/+42
2024-08-19timedatectl: enable interactive authentication for DBus methodsYu Watanabe1-0/+2
2024-08-19resolve: inherit server userdataYu Watanabe1-24/+8
No functional change, just refactoring.
2024-08-19resolve: support polkit authentication for io.systemd.Resolve.MonitorYu Watanabe4-18/+138
Then, non-privilege user can call e.g. 'resolvectl monitor' with authentication.
2024-08-19sd-varlink: allow to dispatch method again on pending-method-more stateYu Watanabe1-1/+1
Otherwise, polkit authentication does not work for methods that require the MORE flag.
2024-08-19resolvectl: acquire DBus connection only when necessaryYu Watanabe1-51/+130
When e.g. `resolvectl monitor` is called, it is not necessary to acquire DBus connection.
2024-08-19resolvectl: several coding style cleanupsYu Watanabe1-68/+57
Use RET_GATHER(), FOREACH_ARRAY(), and strv_skip().
2024-08-19resolvectl: introduce --no-ask-password optionYu Watanabe4-1/+20
2024-08-19resolvectl: enable interactive authentication for dbus method callYu Watanabe1-0/+23
Even the server side supports polkit authentication, previously the client side did not support polkit authentication.
2024-08-19networkctl: introduce --no-ask-password optionYu Watanabe4-15/+33
2024-08-19networkctl: enable interactive authentication for dbus method callYu Watanabe2-0/+12
Previously, e.g. 'networkctl reload' did not ask password through polkit.
2024-08-18test: Gracefully handle running within user namespace with single userDaan De Meyer10-10/+43
Unprivileged users often make themselves root by unsharing a user namespace and then mapping their current user to root which does not require privileges. Let's make sure our tests don't fail in such an environment by adding checks where required to see if we're not running in a user namespace with only a single user.
2024-08-18analyze: introduce --instance= option to control instance name for template ↵Yu Watanabe7-4/+38
units Note, `systemd-analyze foo@.service --instance=hoge` is equivalent to `systemd-analyze foo@hoge.service`. But, the option may be useful when e.g. passing multiple template units that have restriction on their instance name: ``` $ ls template_aaa@.service template_bbb@.service template_ccc@.service $ systemd-analyze ./template_* --instance=hoge ``` Without the option, we need to embed an instance name into each unit name, so cannot use globs. Prompted by #33681.
2024-08-18edit-util: catch and warn about edits outside of markersMike Yuan1-4/+26
The users still periodically come back to #24208. Let's add a detection for this hence.
2024-08-18string-util: update ptr declaration to match our coding styleMike Yuan1-2/+2
2024-08-18basic/process-util: modernize setpriority_closest()Mike Yuan1-18/+13
Before this commit, the "Cannot raise nice level" branch is rather confusing, as we're actually lowering the nice. Also, it's better to log about the final nice value for both cases, no matter whether we need to set to limit or not.
2024-08-18test-netlink: Gracefully handle the loopback interface being downDaan De Meyer1-5/+11
2024-08-17core/unit: unit_is_filtered() -> unit_passes_filter() and invert logicMike Yuan4-7/+6
Follow-up for 6d2984d21bf2a8f71d379ef6bc13a761bb2e2756 The current semantics of "filtered" in unit_is_filtered() are actually the contrary of ListUnitsFiltered(). Let's make things consistent, i.e. return true when the unit shall be included.
2024-08-17core/unit: rename set_unit_path() -> setenv_unit_path()Mike Yuan14-20/+22
The previous name is quite vague on what this precisely do.
2024-08-17core/dbus-service: refuse bind mounting over /run/credentials/Mike Yuan4-19/+25
The credential mounts should be managed singlehandedly by pid1. Preparation for the future introduction of RefreshOnReload=credential, where refreshing creds will be properly supported on reload.
2024-08-17core/dbus-service: some modernization for bus_service_method_mount()Mike Yuan1-20/+22
Perform some checks earlier to avoid pointless polkit auth. Plus, the missing unit_get_exec_context() shall not be a formalized error. As it's our internal representation and in the normal operation should never happen.
2024-08-16network: refuse files under API VFS specified in PrivateKeyFile= and friendsYu Watanabe2-3/+3
Addresses https://github.com/systemd/systemd/pull/34013#discussion_r1719890231.
2024-08-16test: add test case that 'nspawn --network-veth' enables IP forwardingYu Watanabe3-2/+67
2024-08-16network/wireguard: introduce [WireGuardPeer] PublicKeyFile=Yu Watanabe7-7/+43
Similar to PresharedKeyFile=, but for public key. Closes #34012.
2024-08-16test: allow to skip matrix_run_one() if $TEST_MATCH_TESTCASE is setYu Watanabe1-7/+11