summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #30271 from YHNdnzj/executor-cloexecLennart Poettering2023-12-067-57/+45
|\ | | | | fdset,core/executor: ocloexecification ™️
| * core/exec-invoke: prevent potential double-close of exec_fdMike Yuan2023-11-301-26/+21
| | | | | | | | | | | | If exec_fd is closed in add_shifted_fd() by close_and_replace(), but something goes wrong later, we may close exec_fd twice in exec_params_shallow_clear().
| * core/exec-invoke: remove redundant fd_cloexec() callMike Yuan2023-11-302-13/+3
| |
| * fdset: set all collected fds to CLOEXEC in fdset_new_fill()Mike Yuan2023-11-304-8/+15
| |
| * core/exec-invoke: rename flags_fds to flag_fdsMike Yuan2023-11-301-6/+3
| |
| * core/execute-serialize: FOREACH_ARRAY at one more placeMike Yuan2023-11-301-4/+3
| |
* | Merge pull request #29987 from yuwata/network-bridge-vlanZbigniew Jędrzejewski-Szmek2023-12-0622-209/+571
|\ \ | | | | | | network: remove unnecessary bridge vlan IDs
| * | test-network: extend tests for [BridgeVLAN] settingsYu Watanabe2023-11-129-11/+162
| | |
| * | network/brvlan: remove unnecessary bridge vlan IDsYu Watanabe2023-11-128-20/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an interface is being reconfigured with different bridge vlan settings, this makes old vlan IDs on the interface removed. This also makes the PVID= setting support negative boolean value, e.g. "no", in which case, the currently assigned PVID (typically, assigned by the kernel when an interface is joined to a bridge) is dropped. This feature is requested by #15291. Note, if a .network file has no settings about bridge vlan, networkd keeps the currently assigned vlan IDs. That's intended, to make not break existing setups. When a .network file has only PVID=no line in [BridgeVLAN] section, then all assigned vlan IDs are removed. Fixes #29975. Closes #15291.
| * | network/brvlan: read bridge vlan IDs through netlink and save themYu Watanabe2023-11-125-0/+90
| | | | | | | | | | | | | | | In this commit, obtained vlan IDs are not used, but they will be used in the later commits.
| * | network/brvlan: make [BridgeVLAN] settings support an empty stringYu Watanabe2023-11-127-71/+52
| | | | | | | | | | | | This also renames Network.pvid and friends.
| * | network/brvlan: convert condtion to assertionYu Watanabe2023-11-121-2/+2
| | | | | | | | | | | | The condition should be always true.
| * | network/brvlan: parse_vlanid() accepts zero, hence PVID may be zeroYu Watanabe2023-11-122-2/+4
| | | | | | | | | | | | So, the default value should not be zero.
| * | network/brvlan: rework bridge vlan ID assignmentYu Watanabe2023-11-123-126/+144
| | | | | | | | | | | | No functional change, just refactoring.
| * | network/neighbor: suppress noisy debugging logsYu Watanabe2023-11-121-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | - AF_BRIDGE is not invalid. But we are not interested in it, currently. - Also, we are not interested in non-static neighbors, at least currently, - As already commented, the kernel sends message about neighbors after sending RTM_DELLINK. In that case, the corresponding Link object is already removed, and there is nothing we need to do in that case.
* | | Merge pull request #29853 from YHNdnzj/sleep-automatedZbigniew Jędrzejewski-Szmek2023-12-0621-140/+421
|\ \ \ | | | | | | | | logind: support Sleep() that automatically choose a sleep operation
| * | | systemctl: add support for Sleep() logind callMike Yuan2023-12-056-2/+32
| | | |
| * | | logind: introduce Sleep() call and action that automatically choose a sleep ↵Mike Yuan2023-12-0513-60/+309
| | | | | | | | | | | | | | | | operation
| * | | logind: test: make sure string of HandleAction and SleepOperation matchMike Yuan2023-12-051-0/+17
| | | |
| * | | logind: put more struct members into designated initializerMike Yuan2023-12-051-9/+9
| | | |
| * | | logind: take HandleAction instead of HandleActionData at several placesMike Yuan2023-12-054-73/+58
| | | | | | | | | | | | | | | | Preparation for addition of HANDLE_SLEEP.
* | | | Merge pull request #30338 from keszybz/fwrite-error-handlingLennart Poettering2023-12-066-46/+33
|\ \ \ \ | | | | | | | | | | Fix fwrite() error handling
| * | | | sd-journal/catalog: modernize write_catalog()Zbigniew Jędrzejewski-Szmek2023-12-051-35/+15
| | | | |
| * | | | networkd: unvoidify fwrite()Zbigniew Jędrzejewski-Szmek2023-12-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Those were the only two places we did that, so for consistency it's better to drop it.
| * | | | variuos: fwrite() does not set errnoZbigniew Jędrzejewski-Szmek2023-12-054-9/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The man page doesn't even mention errno. It just says that ferror() should be used to check for errors. Those writes are unlikely to fail, but if they do, errno might even be 0. Also, we have fflush_and_check() which does additional paranoia around errno, because we apparently do not trust that errno will always be set correctly.
* | | | | README.md: irc:// URLs are not rendered as links by markdown on GithubLuca Boccassi2023-12-061-1/+1
| | | | | | | | | | | | | | | | | | | | Use the webchat link and spell out the channel and server instead
* | | | | journal-gatewayd: add since/until parameters for /entriesSamuel BF2023-12-063-40/+165
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Request with Range header like 'entries=<cursor>:' (with a colon at the end, invalid syntax per the doc), is now rejected with error 400 Bad Request. fix #4883
* | | | | udev: generate system-unique storage symlinks using device pathRoland Hieber2023-12-061-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the same disk image is written to multiple storage units, for example an external SD card and an internal eMMC, the symlinks in /dev/disk/by-{label,uuid,partlabel,partuuid}/ are no longer unique, and will point to the device that is probed last. Adressing partitions via labels and UUIDs is nice to work with, and depending on the use case, it might also be more robust than using the symlinks in /dev/disk/by-path/ containing the partition number. Combine the two approaches to create unique symlinks containing both the device path as well as the respective UUIDs or labels, and throw in a symlink using the devpath and the partition number for the sake of completeness. For an exemplary GPT-partitioned disk at "platform-2198000.mmc" with a partition containing an ext4 file system, this might create symlinks of the following form: /dev/disk/by-path/platform-2198000.mmc-part/by-partnum/1 /dev/disk/by-path/platform-2198000.mmc-part/by-partuuid/e5a75233-3b90-4aec-8075-b4dd7132b48d /dev/disk/by-path/platform-2198000.mmc-part/by-partlabel/rootfs /dev/disk/by-path/platform-2198000.mmc-part/by-uuid/b2c92f24-8215-4680-b931-f423aae5f1c9 /dev/disk/by-path/platform-2198000.mmc-part/by-label/rootfs Signed-off-by: Roland Hieber <rhi@pengutronix.de>
* | | | | Merge pull request #30353 from bluca/newsZbigniew Jędrzejewski-Szmek2023-12-062-2/+6
|\ \ \ \ \ | | | | | | | | | | | | Version bumps
| * | | | | RELEASE: mark a few items for the final stepLuca Boccassi2023-12-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Doesn't make much sense to push RCs to the stable repository, just do that in the final tag push
| * | | | | NEWS: open for v256Luca Boccassi2023-12-061-0/+4
| | | | | |
* | | | | | systemctl-whoami: use pidfd to refer to processesMike Yuan2023-12-061-30/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While at it, rephrase the output a bit. Before this commit, if the pid doesn't exist, we output something hard to interpret - "Failed to get unit for ourselves".
* | | | | | Merge pull request #30101 from poettering/underline-reworkLennart Poettering2023-12-064-44/+180
|\ \ \ \ \ \ | | | | | | | | | | | | | | systemctl: "list-units" table tweaks
| * | | | | | systemctl: also grey out useful hints in output, since no primary contents ↵Lennart Poettering2023-11-201-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | shown here
| * | | | | | systemctl: port to the new underline cell attributeLennart Poettering2023-11-201-24/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And be more careful when adding color to log lines: 1. Apply color derived from load state only to load state (and in special cases to the circle at the beginning of the line) 2. Apply color derived from active/sub states only to active/sub states (and in special cases to the circle at the beginning of the line) 3. Special case the "exited" state of services, i.e. make the substate grey, as in this case the service is active, yet consumes no resources. 4. Cover the "inactive" state properly, by greying it our too 5. Downgrade the load state of "not-found" from red to yellow, since it's not really a case one needs to be come active on.
| * | | | | | format-table: add a proper "underline" concept to cellsLennart Poettering2023-11-202-15/+117
| | | | | | |
| * | | | | | terminal-util: add macro for adding underline to existing formatsLennart Poettering2023-11-201-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is different from the existing macros that generate "underline" ANSI sequences: these ones are additive, i.e. do not reset the font to the default first. The idea is to combine these with other ansi sequences.
* | | | | | | recurse-dir: add new readdir_all_at() helperLennart Poettering2023-12-064-12/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This new helper combines open() with readdir_all() to simplify a few callers.
* | | | | | | Merge pull request #30295 from yuwata/hostnamectl-machine-idLuca Boccassi2023-12-063-30/+101
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | hostnamectl: read machine ID and boot ID through DBus
| * | | | | | | hostname: expose machine ID and boot ID through DBusYu Watanabe2023-12-063-23/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #30293.
| * | | | | | | hostnamectl: do not show local machine ID and boot ID when requested to show ↵Yu Watanabe2023-12-061-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | information about remote host Prompted by #30293.
* | | | | | | | Merge pull request #30183 from poettering/nlcrLennart Poettering2023-12-063-18/+43
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | NL → CRNL conversion fixes when logging at the same time as ptyfwd runs
| * | | | | | | | log: when writing a log message to a TTY always end line in CRNLLennart Poettering2023-11-241-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This should make sure our log lines look nice even if the tty we are connected to is in raw mode. Normally, it's the TTY's job to turn an NL we output into a CRNL and interpret it accordingly. However, if the tty is in "raw" mode it won't do that. Specifically, this is controlled by the ONLCR flag on the TTY. A TTY might be in raw mode if our "ptyfwd" logic is used for example, where a 2nd tty is bi-directionally connected to the primary tty, and duplicate processing is not desired. Hence, let's just write out the CR on our own. This will make sure that whenever we output something subsequent output always continues on the beginning of the next line again, regardless the mode the TTY is in. Of course, if the TTY is *not* in raw mode, then the extra CR we now generate is redundant, but it shouldn't hurt either, as it just moves the cursor to the front of the line even though already is just there. We only to that if we actually talk to a TTY though, since we don't want the extra CRs if we are redirected to a pipe or file or so. We are not on Windows after all. Fixes: #30155
| * | | | | | | | ptyfwd: don't reset TTY twice if stdin/stdout point to same TTYLennart Poettering2023-11-241-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And in particular don't save/restore an already reset TTY state.
| * | | | | | | | ptyfwd: trivial format cleanupsYu Watanabe2023-11-241-9/+6
| | | | | | | | |
| * | | | | | | | stat-util: make file name arguments optional in inode_same_at()Lennart Poettering2023-11-241-4/+2
| | | | | | | | |
* | | | | | | | | show-status: suffix output ith CRNL rather than just NLLennart Poettering2023-12-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is similar to #30183 but focusses on the status output rather than the log output. Since the status output always goes to a TTY we don't have to conditionalize things on isatty(). Fixes: #30184
* | | | | | | | | user-util: add new helper fully_set_uid_gid()Lennart Poettering2023-12-067-54/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Usually when we do setresuid() we also do setesgid() and setgroups(). Let's add a common helper that does all three, and use it everywhere.
* | | | | | | | | mime: register confext/sysext images in shared-mime-infoLennart Poettering2023-12-063-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This make them recognized by file managers and stuff. Maybe one day we should properly register mime types in the "vnd." namespace with IANA, but I am too lazy to deal with the bureaucracy for that, hence let's stick with the x. namespace for now. This defines confext/sysext DDIs as subtype of: https://www.iana.org/assignments/media-types/application/vnd.efi.img Which is what everyone appears to use for raw disk images, in particular if they contain a GPT partition table.
* | | | | | | | | userdbctl: enable ssh-authorized-keys logic by defaultLennart Poettering2023-12-067-3/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sshd now supports config file drop-ins, hence let's install one to hook up "userdb ssh-authorized-keys", so that things just work. We put the drop-in relatively early, so that other drop-ins generally will override this. Ideally sshd would support such drop-ins in /usr/ rather than /etc/, but let's take what we can get. It's not that sshd's upstream was particularly open to weird ideas from Linux people.