summaryrefslogtreecommitdiffstats
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
* test-dhcp-server: add usual headersYu Watanabe2022-02-011-0/+6
|
* test-dhcp-server: run a test earlier which does not require privilegeYu Watanabe2022-02-011-1/+2
|
* test-dhcp-server: move sd-event allocationYu Watanabe2022-02-011-6/+6
|
* test-dhcp-server: use log_tests_skipped_errno()Yu Watanabe2022-02-011-5/+5
|
* sd-dhcp-server: split out logic to ACK requestYu Watanabe2022-02-011-85/+55
|
* sd-dhcp-server: do not assign address reserved for static leases to ↵Yu Watanabe2022-02-011-0/+3
| | | | | | non-matching clients This fix the root cause of the issue #22253.
* sd-dhcp-server: explicitly refuse when conflicting address is requestedYu Watanabe2022-02-011-4/+7
|
* sd-dhcp-server: do not assign an address from pool when a static lease for ↵Yu Watanabe2022-02-011-3/+7
| | | | the client ID exists
* sd-dhcp-server: rename get_pool_offset() -> address_is_in_pool()Yu Watanabe2022-02-011-12/+9
| | | | As, the value of pool_offset is not used.
* sd-dhcp-server: rename server_send_nak() -> server_send_nak_or_ignore()Yu Watanabe2022-02-011-13/+16
| | | | And logs error in the function.
* sd-dhcp-server: set DHCPLease::server before hashmap_put()Yu Watanabe2022-02-011-21/+13
| | | | | | | | | | | | | Otherwise, if the second push is failed, then the first hashmap contains dirty entry. Also, this makes hashmap_remove_value() used when removing leases to make not wrong lease is removed from the hashmap. Note, this just hide the root cause of the issue #22253, which will be fixed in later commit. Fixes #22253.
* sd-dhcp-server: fix indentationYu Watanabe2022-02-011-2/+2
|
* sd-dhcp-server: rename argument and add one missing assertionYu Watanabe2022-02-011-5/+10
|
* sd-dhcp-server: do not use implicit cast to boolean from integerYu Watanabe2022-02-011-12/+12
|
* sd-dhcp-server: refuse zero length client IDYu Watanabe2022-02-011-5/+6
|
* sd-dhcp-server: do not log "STOPPED" when already stoppedYu Watanabe2022-02-011-3/+6
|
* Merge pull request #22175 from keszybz/kernel-install-mkosi-initrdLuca Boccassi2022-02-013-21/+40
|\ | | | | kernel-install: add support for KERNEL_INSTALL_INITRD_GENERATOR and KERNEL_INSTALL_STAGING_AREA
| * kernel-install: add missing log lineZbigniew Jędrzejewski-Szmek2022-01-281-0/+2
| |
| * kernel-install: add "$KERNEL_INSTALL_STAGING_AREA" directoryZbigniew Jędrzejewski-Szmek2022-01-282-3/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The general approach of kernel-install was that each plugin would drop in some files into the entry directory. But this doesn't scale well, because if we have multiple initrd generators, or multiple initrds, each generator would need to recreate the logic to put the generated files in the right place. Also, effective cleanup is impossible if anything goes wrong on the way, so we could end up with unused files in $BOOT. So let's invert the process: plugins drop files into $KERNEL_INSTALL_STAGING_AREA, and at the end 90-loaderentry.install DTRT with those files. This allow new plugins like 50-mkosi-initrd.install to be significantly simpler.
| * kernel-install: prefix errors with "Error:", exit immediatelyZbigniew Jędrzejewski-Szmek2022-01-282-11/+11
| | | | | | | | | | | | | | | | | | | | kernel-install would continue after errors… We don't want this, as it makes the results totally unpredicatable. If we didn't install the kernel or didn't do some important part of the setup, let's just return an error and let the user deal with it. When looking at output, the error was often hard to distinguish, esp. with -v. Add "Error:" everywhere to make the output easier to parse.
| * kernel-install: k-i already creates $ENTRY_DIR_ABS, no need to do it againZbigniew Jędrzejewski-Szmek2022-01-281-6/+2
| |
| * kernel-install: add new variable $KERNEL_INSTALL_INITRD_GENERATORZbigniew Jędrzejewski-Szmek2022-01-182-1/+5
| | | | | | | | | | | | The idea is that when not set, we do whatever we did in the past. But with a new setting of initrd_generator=mkosi-initrd, mkosi-initrd will generate an initrd.
* | network: s/confiured/configured/Frantisek Sumsal2022-02-011-1/+1
| | | | | | | | A quick typo fix I noticed whilst debugging.
* | tree-wide: some additional checks to avoid CVE-2021-4034 style weaknessesLennart Poettering2022-02-012-0/+13
| |
* | random-seed: add missing %m in error messageLennart Poettering2022-01-311-1/+1
| |
* | Merge pull request #22316 from yuwata/network-mac-address-lengthLuca Boccassi2022-01-3110-7/+114
|\ \ | | | | | | network: several cleanups related to MAC address length
| * | network: currently IPv4ACD requires MAC address whose length is ETH_ALENYu Watanabe2022-01-311-3/+5
| | |
| * | network: currently RADV requires MAC address whose length is ETH_ALENYu Watanabe2022-01-311-0/+6
| | |
| * | network: disable NDisc for CAN interfacesYu Watanabe2022-01-311-0/+4
| | | | | | | | | | | | We already disabled DHCP clients for CAN interfaces.
| * | network: configure NDisc after MAC address is assignedYu Watanabe2022-01-315-4/+82
| | |
| * | network: configure DHCP clients after MAC address is assignedYu Watanabe2022-01-313-0/+17
| | | | | | | | | | | | Prompted by #20090.
* | | Merge pull request #22300 from yuwata/bus-fix-error-handlingLuca Boccassi2022-01-313-9/+21
|\ \ \ | | | | | | | | tree-wide: fix bus method error handling
| * | | login: use bus_error_message() at one more placeYu Watanabe2022-01-291-3/+7
| | | |
| * | | core/unit: use bus_error_message() at one more placeYu Watanabe2022-01-291-2/+6
| | | |
| * | | bus-util: retrieve bus error from messageYu Watanabe2022-01-291-4/+8
| | | | | | | | | | | | | | | | The error in argument is not input, but used for output.
* | | | boot: Don't require a machine ID to be availableDaan De Meyer2022-01-311-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | Regression introduced in https://github.com/systemd/systemd/pull/21807. Fixes #22224
* | | | Merge pull request #22274 from yuwata/resolve-commentLuca Boccassi2022-01-316-67/+81
|\ \ \ \ | | | | | | | | | | resolve: cleanups for on_stream_io()
| * | | | resolve: llmnr: fix never hit conditionYu Watanabe2022-01-283-10/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the condition in on_stream_io_impl() never hit, as the read packet is always taken from the stream in the few lines above. Instead of the dns_stream_complete() under the condition, the stream is unref()ed in the on_packet callback for LLMNR stream, unlike the other on_packet callbacks. That's quite tricky. Also, potentially, the stream may still have queued packets to write. This fix the condition, and drops the unref() in the on_packet callback. C.f. https://github.com/systemd/systemd/pull/22274#issuecomment-1023708449. Closes #22266.
| * | | | resolve: mention that dns_stream_update() needs to be called after ↵Yu Watanabe2022-01-281-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dns_stream_take_read_packet() Based on the analysis by Joan Bruguera <joanbrugueram@gmail.com>. See https://github.com/systemd/systemd/pull/22132#discussion_r793951650.
| * | | | resolve: call dns_stream_take_read_packet() in on_stream_io()Yu Watanabe2022-01-286-39/+31
| | | | | | | | | | | | | | | | | | | | | | | | | As dns_stream_take_read_packet() is called only in on_packet callbacks, and all on_packet callbacks call it.
| * | | | resolve: make dns_stream_new() take on_packet and complete callbacksYu Watanabe2022-01-286-23/+31
| | | | | | | | | | | | | | | | | | | | And make on_packet callback mandatory.
* | | | | core: don't fail on EEXIST when creating mount pointLuca Boccassi2022-01-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | systemd[1016]: Failed to mount /tmp/app1 (type n/a) on /run/systemd/unit-extensions/1 (MS_BIND ): No such file or directory systemd[1016]: Failed to create destination mount point node '/run/systemd/unit-extensions/1': File exists
* | | | | core: check argc/argv uncoditionallyFrantisek Sumsal2022-01-312-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | as `assert()` might be dropped with `-DNDEBUG`. Follow-up to cf3095a and 1637e75.
* | | | | Merge pull request #21838 from lnussel/logind-refactorYu Watanabe2022-01-3111-364/+380
|\ \ \ \ \ | | | | | | | | | | | | Logind shutdown refactor
| * | | | | systemctl: shutdown don't fallback on auth failLudwig Nussel2022-01-253-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For shutdowns don't fall back to starting the target directly if talking to logind failed with auth failure. That would just lead to another polkit auth attempt.
| * | | | | logind: refactorLudwig Nussel2022-01-258-338/+306
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid hardcoded strings and string compares related to shutdown actions. Instead put everything into a common structure. Reuse existing HandleAction as index since it's already exposed as property for the button handlers.
| * | | | | logind: require polkit auth for cancelling shutdownsLudwig Nussel2022-01-251-2/+32
| | | | | |
| * | | | | logind: fix wall messages for direct shutdown callsLudwig Nussel2022-01-251-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The wall mechanism uses the scheduled_shutdown_type to determine what message to send so it needs to be filled in also for the cases that call for shutdown without schedule. It's really a hackish way. The overall code needs refacturing.
| * | | | | logind: enable wall messages by defaultLudwig Nussel2022-01-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Something calling directly into the dbus interface to request a shutdown may not bother turning wall messages on explicitly. This has the convenient side effect that no separate polkit auth is required to turn on wall messages. Was annoying as having a wall message is the default behavior of the commandline tools. Now it's the other way around ie eg systemctl reboot --no-wall requires auth to explicitly turn off the wall message.
| * | | | | systemctl: simplify halt_main()Ludwig Nussel2022-01-251-28/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code at this point is not able to tell whether it was called as halt/poweroff/reboot or shutdown with time "now". The code also takes a shortcut to skip logind if called as root. That however means asking shutdown for immediate action won't trigger a wall message. As per https://github.com/systemd/systemd/issues/8424#issuecomment-374677315 all commands should trigger a wall message. That simplifies the code as we can try logind first always.