summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* networkctl: fix use of uninitialized valueYu Watanabe2019-06-131-1/+1
|
* Merge pull request #12777 from yuwata/libudev-enumerate-issue-12776Yu Watanabe2019-06-137-284/+314
|\ | | | | libudev: rescan devices when filter is updated
| * libudev: hide definition of struct udev_deviceYu Watanabe2019-06-123-32/+41
| |
| * libudev: rescan devices when filter is updatedYu Watanabe2019-06-121-9/+73
| | | | | | | | Fixes #12776.
| * libudev: re-implement libudev-list with LIST and hashmapYu Watanabe2019-06-121-193/+105
| |
| * libudev: hide definition of struct udev_list from other libudev componentsYu Watanabe2019-06-127-70/+116
| | | | | | | | | | In the later commit, udev_list will be just a wrapper of hashmap or LIST. So, allocating udev_list does not increase much cost.
| * libudev: drop unused variableYu Watanabe2019-06-121-1/+0
| |
* | journal: also disable memory tricks when hashing under msanZbigniew Jędrzejewski-Szmek2019-06-121-3/+3
| | | | | | | | Might help with #11738.
* | test-bus-marshall: add a hopefully helpful commentZbigniew Jędrzejewski-Szmek2019-06-121-0/+1
| |
* | system-update-generator: do not emit bogus warning if no /system-update symlinkZbigniew Jędrzejewski-Szmek2019-06-121-1/+2
| | | | | | | | We only need to check for the kernel cmdline override our symlink is there.
* | Merge pull request #12424 from poettering/logind-brightnessZbigniew Jędrzejewski-Szmek2019-06-1230-199/+692
|\ \ | | | | | | logind: add SetBrightness() bus call as minimal API for setting "leds" and "backlight" kernel class device brightness
| * | logind: split out dbus header files into their ownLennart Poettering2019-05-2421-64/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, logind's logind-session.h would define prototypes for logind-session.c and logind-session-dbus.c. Split that out, so that there's a separate logind-session-dbus.h for that. Similar for seats and users as well as the manager itself. This changes no code, just rearranges where protoypes are located.
| * | logind: convert ENXIO into 0, to signal 'not found' cleanlyLennart Poettering2019-05-241-1/+6
| | |
| * | logind: support self/auto seats for AttachDevice(), tooLennart Poettering2019-05-241-2/+11
| | |
| * | logind: validate /sys fs path a bit more strictlyLennart Poettering2019-05-241-0/+2
| | |
| * | logind: prefer hashmap_contains() over hashmap_get()Lennart Poettering2019-05-241-6/+4
| | |
| * | loginctl: drop $XDG_SESSION_ID env var magicLennart Poettering2019-05-241-24/+7
| | | | | | | | | | | | | | | The server side can do something similar, but better on its own, let's hence rely on that.
| * | logind: make "self" and "auto" magic strings when operating on seats + sessionsLennart Poettering2019-05-245-87/+179
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of the operations one can do on sessions so far accepted an empty session name as a shortcut for the caller's session. This is quite useful traditionally, but much less useful than it used to be, since most user code now (rightfully) runs in --user context, not in a session. With this change we tweak the logic a bit: we introduce the two special session and seat names "self" and "auto". The former refers to the session/seat the client is in, and is hence mostly equivalent to te empty string "" as before. However, the latter refers to the session/seat the client is in if that exists, with a fallback of the user's display session if not. Clients can hence reference "auto" instead of the empty string if they really don't want to think much about sessions. Why "self" btw? Previously, we'd already expose a special dbus object with the path /org/freedesktop/login1/session/self (and similar for the seat), matching what the empty string did for bus calls that took a session name. With this scheme we reuse this identifier and introduce "auto" in a similar way. Of course this means real-life seats and sessions can never be named "self" or "auto", but they aren't anyway: valid seat names have to start with "seat" anyway, and sessions are generated server-side as either a numeric value or "c" suffixed with a counter ID. Fixes: #12399
| * | logind: make a constant array staticLennart Poettering2019-05-241-1/+1
| | |
| * | logind: consider "greeter" sessions suitable as "display" sessions of a userLennart Poettering2019-05-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Interestingly, elect_display_compare() already ordered "user" sessions before "greeter" sessions, though nothing other than "user" sessions where ever considered anyway. Fixes: #12399
| * | logind: add SetBrightness() bus call for setting brightness of ↵Lennart Poettering2019-05-2411-14/+355
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | leds/backlight devices associated with a seat This augments the drm/input device management by adding a single method call for setting the brightness of an "leds" or "backlight" kernel class device. This method call requires no privileges to call, but a caller can only change the brightness on sessions that are currently active, and they must own the session. This does not do enumeration of such class devices, feature or range probing, chnage notification; it doesn't help associating graphics or input devices with their backlight or leds devices. For all that clients should go directly to udev/sysfs. The SetBrightness() call is just for executing the actual change operation, that is otherwise privileged. Example line: busctl call org.freedesktop.login1 /org/freedesktop/login1/session/self org.freedesktop.login1.Session SetBrightness ssu "backlight" "intel_backlight" 200 The parameter the SetBrightness() call takes are the kernel subsystem (i.e. "leds" or "backlight"), the device name, and the brightness value. On some hw setting the brightness is slow, and implementation and write access to the sysfs knobs exposes this slowness. Due to this we'll fork off a writer process in the background so that logind doesn't have to block. Moreover, write requestes are coalesced: when a write request is enqueued while one is already being executed it is queued. When another write reques is then enqueued the earlier one is replaced by the newer one, so that only one queued write request per device remains at any time. Method replies are sent as soon as the first write request that happens after the request was received is completed. It is recommended that bus clients turn off the "expect_reply" flag on the dbus messages they send though, that relieves logind from sending completion notification and is particularly a good idea if clients implement reactive UI sliders that send a quick secession of write requests. Replaces: #12413
| * | logind: small simplificationLennart Poettering2019-05-241-2/+1
| | |
| * | udev: tag "leds" and "backlight" devices for association to a seatLennart Poettering2019-05-241-0/+4
| | | | | | | | | | | | | | | | | | These devices do not become user-accessible this way, but they are logically assigned to a seat, which makes a lot of sense, since they are human-facing output devices, and such should belong to one.
* | | service: Fix typo in warning messagePhilip Withnall2019-06-121-1/+1
| | | | | | | | | | | | | | | | | | The directive is `RuntimeMaxSec=`, not `MaxRuntimeSec=`. Signed-off-by: Philip Withnall <withnall@endlessm.com>
* | | pam_systemd: Fix some option names in error messagesPhilip Withnall2019-06-121-2/+2
| |/ |/| | | | | Signed-off-by: Philip Withnall <withnall@endlessm.com>
* | Merge pull request #12774 from ↵Yu Watanabe2019-06-126-18/+38
|\ \ | | | | | | | | | | | | yuwata/network-ignore-ipv6-settings-when-sysctl-disable-ipv6 network: ignore ipv6 settings when sysctl disable ipv6
| * | network: ignore requested ipv6 fdb entry when ipv6 is disabled by sysctlYu Watanabe2019-06-121-1/+6
| | |
| * | network: ignore requested ipv6 routing policy rule when ipv6 is disabled by ↵Yu Watanabe2019-06-122-3/+8
| | | | | | | | | | | | sysctl
| * | network: ignore requested ipv6 route when ipv6 is disabled by sysctlYu Watanabe2019-06-123-9/+14
| | |
| * | network: ignore requested ipv6 addresses when ipv6 is disabled by sysctlYu Watanabe2019-06-123-5/+10
| | |
* | | resolved: Fix incorrect use of OpenSSL BUF_MEMTomas Mraz2019-06-121-1/+4
|/ / | | | | | | Fixes: #12763
* | Merge pull request #12685 from yuwata/network-dhcp-assign-adn-remove-12676Zbigniew Jędrzejewski-Szmek2019-06-113-47/+153
|\ \ | | | | | | network: assign new DHCP address before removing old lease address
| * | network: assign new DHCP address before removing old lease addressYu Watanabe2019-06-073-24/+126
| | | | | | | | | | | | Closes #12676.
| * | network: ignore callback calls when link is in failed stateYu Watanabe2019-06-071-2/+11
| | |
| * | network: drop unnecessary link_enter_failed() callsYu Watanabe2019-06-071-10/+4
| | | | | | | | | | | | As the function called soon later anyway.
| * | network: check earlier the existence of lifetime in leaseYu Watanabe2019-06-071-6/+6
| | |
| * | network: make all failures in route configuration fatalYu Watanabe2019-06-071-8/+9
| | |
* | | systemd-mount: don't check for non-normalized WHAT for network FSKarel Zak2019-06-111-1/+2
|/ / | | | | | | | | | | | | The WHAT string could be whatever for many filesystems. The common example are network filesystems. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1708996
* | cgroup: Prevent theoretical nullptr deref in unit mask calculationChris Down2019-06-071-0/+2
| |
* | systemctl: Prevent state_missing from being used uninitChris Down2019-06-071-1/+1
| |
* | Merge pull request #12738 from yuwata/network-routing-policy-cleanupZbigniew Jędrzejewski-Szmek2019-06-063-10/+10
|\ \ | | | | | | network: several cleanups for routing policy rule
| * | network: check stored object is euivalent to what we want to removeYu Watanabe2019-06-061-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | When object A is stored in Manager::rules and B is in ::rules_foreign, and compare function for the object cannot distinguish them, then freeing A causes B to be removed from rules_foreign or vice versa. Hopefully fixes #12731.
| * | network: remove unused argument in routing_policy_rule_configure()Yu Watanabe2019-06-043-3/+3
| | |
| * | network: fix double free on error pathYu Watanabe2019-06-041-5/+3
| | |
* | | network: make KeepConfiguration=static drop DHCP addresses and routesYu Watanabe2019-06-061-1/+42
| | | | | | | | | | | | Also, KeepConfiguration=dhcp drops static foreign addresses and routes.
* | | network: add KeepConfiguration=dhcp-on-stopYu Watanabe2019-06-065-17/+23
| | | | | | | | | | | | | | | The option prevents to drop lease address on stop. By setting this, we can safely restart networkd.
* | | networkd: add support to keep configurationSusant Sahani2019-06-065-7/+52
| | |
* | | Merge pull request #12508 from keszybz/no-root-checksYu Watanabe2019-06-067-41/+33
|\ \ \ | | | | | | | | Drop many root checks
| * | | udevadm trigger: log errors and return first failureZbigniew Jędrzejewski-Szmek2019-06-051-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When udevadm trigger is called, the list of devices to trigger is always generated through enumeration, and devices can come and go, so we should not treat -ENOENT as a failure. But other types of failure should be logged. It seems they were logged until baa30fbc2c04b23209d0b8fb3c86cd15ef9ea81a. Also, return the first error. (I'm not sure if there are other failure modes which we want to ignore. If they are, they'll need to be whitelisted like -ENOENT.).
| * | | systemctl: show a hint if root privileges might yield more informationZbigniew Jędrzejewski-Szmek2019-05-081-3/+11
| | | |