summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2015-06-04Merge pull request #57 from pwithnall/wip/pwithnall/udev-virtualbox-rulesDavid Herrmann
logind: Add a udev rule to tag all DRM cards with master-of-seat
2015-06-04Partially revert "ma-setup: simplify"Zbigniew Jędrzejewski-Szmek
copy_bytes() tries to do the write in chunks, but ima kernel code needs every rule to be written in one write. Writing the whole file at once avoids the issue. http://lists.freedesktop.org/archives/systemd-devel/2015-June/032623.html http://sourceforge.net/p/linux-ima/mailman/message/34145236/ https://bugzilla.redhat.com/show_bug.cgi?id=1226948
2015-06-03Merge pull request #65 from teg/enumerate-accept-nullKay Sievers
libudev: enumerate - accept NULL parameters in add_match()
2015-06-03Merge pull request #52 from mbiebl/systemctl-edit-default-editorTom Gundersen
systemctl: Use /usr/bin/editor if available
2015-06-03kdbus: remove attach_flags_mask module parameter settingKay Sievers
2015-06-03libudev: enumerate - accept NULL parameters in add_match()Tom Gundersen
This was a regression introduced when moving to sd-device.
2015-06-03test-util: fix a memleakThomas Hindoe Paaboel Andersen
2015-06-03test-unit-file.c: fixup the test for commit 3b51f8ddd5Harald Hoyer
2015-06-03systemctl: Use /usr/bin/editor if availableMichael Biebl
If the EDITOR environment variable is not set, the Debian policy recommends to use the /usr/bin/editor program as default editor. This file is managed via the dpkg alternatives mechanism and typically used in Debian/Ubuntu and derivatives to configure the default editor. See section 11.4 of the Debian policy [1]. Therefor prefer /usr/bin/editor over specific editors if available. [1] https://www.debian.org/doc/debian-policy/ch-customized-programs.html
2015-06-03util: fix another cunescape() regressionDaniel Mack
Fix a regression caused by 4034a06d ("util: rework word parsing and c unescaping code") which broke octal escape sequences. The reason for this breakage is that cunescape_one() expects 4 characters in an octal encoding, which is a stray left-over from the old code which operated on different variables to make the length check. While at it, add a test case to prevent the same thing from happening again.
2015-06-03udevd: merge manager_new() and manager_listen() againTom Gundersen
Now that listen_fds() have been split out, we can safely move the allocation of the manager object after doing the forking (the fork is done to notify legcay init-systems that the fds are ready). Subsequently, we can merge manager_listen() back into managre_new(). This entails a minor behaviour change: the application of permissions to static device nodes now happens after the fork (but still before notifying systemd about being ready).
2015-06-03udevd: make sd_notify independent of forknig/notify modeTom Gundersen
This will simply silently fail on non-systemd systems, so there is no reason to make it conditional. Also make it clear that we notify systemd about being ready as the last step before starting the event loop, whereas the forking might need to happen earlier.
2015-06-03udevd: manager - split listen_fds() out of manager_new()Tom Gundersen
This will allow us in a follow-up commit to listen to fds before forking and still allocate the manager only after the fork.
2015-06-03udevd: unify fd handling in forking/notify modesTom Gundersen
Hide the differenec in listen_fds, by simply opening the fds here in case they are not passed in.
2015-06-03libudev: monitor - set nl_pid when reusing fd in ↵Tom Gundersen
udev_monitor_new_from_netlink_fd This allows a fd to be created and configured as part of one monitor, to be passed in to create a second monitor without having to redo any of the configuration.
2015-06-03udevd: make cgroup logic independent of socket passingTom Gundersen
This should have no behavioural change, but it is odd to tie the cgroup cleaning to whether or not we are passed sockets. The point really is if we are guaranteed to be in a dedicated cgroup, so instead check for our parent being PID1 (we already implicitly only do this on systemd systems).
2015-06-03udevd: only bind ctrl and netlink sockets when we open themTom Gundersen
If they are passed from PID1 this is not necessary.
2015-06-03udevd: rename systemd_fds to listen_fdsTom Gundersen
2015-06-03udevd: simplify signal mask handlingTom Gundersen
We used to block all signals, and restore the original signal mask before exec'ing external processes. Now we just block the signals we care about and unconditionally unblock all signals before exec'ing.
2015-06-03Merge pull request #41 from mischief/ipforwardingTom Gundersen
networkd: create "kernel" setting for IPForwarding
2015-06-02networkd: create "kernel" setting for IPForwardingNick Owens
In 5a8bcb674f71a20e95df55319b34c556638378ce, IPForwarding was introduced to set forwarding flags on interfaces in .network files. networkd sets forwarding options regardless of the previous setting, even if it was set by e.g. sysctl. This commit creates a new option for IPForwarding, "kernel", that preserves the sysctl settings rather than always setting them. See https://bugs.freedesktop.org/show_bug.cgi?id=89509 for the initial bug report.
2015-06-03udev: input_id - use ABS_MT_SLOT{-1} to exclude non touch screen devicesAndreas Pokorny
Peek at the ABS_MT_SLOT-1 axis. Expect that touch screens only have axes inside the MT range.
2015-06-03udev: input_id - use direct property and mt axis for touch screen detectionAndreas Pokorny
A lot of touch screens use INPUT_PROP_DIRECT to indicate that touch input maps directly to the underlying screen, while the BTN_TOUCH bit might not be set.
2015-06-03udev: input_id - refactor device detectionAndreas Pokorny
This change switches to bools and separates bit flag evaluation from decision making and application of udev properties, while hopefully keeping the same semantics. Apart from using BTN_LEFT instead of BTN_MOUSE for mouse detection.
2015-06-03remove gudev and gtk-docKay Sievers
The library moved to: https://git.gnome.org/browse/libgudev/
2015-06-02fix double semicolon typoThomas Hindoe Paaboel Andersen
2015-06-02Merge pull request #12 from ↵Tom Gundersen
systemd-mailing-devs/1433236104-9967-1-git-send-email-m.olbrich@pengutronix.de missing: add more btrfs defines
2015-06-02udev-builtin: path_id - don't pass NULL to udev_device_get_parent()Tom Gundersen
Being explicit about this makes the code easier to follow IMHO.
2015-06-02udev: add some assertsTom Gundersen
Mostly for documentation purposes.
2015-06-02sd-device: get_driver - remember if a device does not have a driverTom Gundersen
Don't try to read it again.
2015-06-02sd-device: get_subsystem - don't complain if a device does not have a subsystemTom Gundersen
2015-06-02Merge pull request #8 from ↵Martin Pitt
systemd-mailing-devs/1433236059-9824-1-git-send-email-m.olbrich@pengutronix.de random-util: guard including sys/auxv.h with the corresponding ifdef …
2015-06-02logind: Add a udev rule to tag all DRM cards with master-of-seatPhilip Withnall
This is needed for generic DRM devices like the VirtualBox vboxvideo driver, which exposes itself as a generic, ID-less DRM device at /dev/dri/card0 (after applying this commit): $ udevadm info --query=all --path \ /sys/devices/pci0000:00/0000:00:02.0/drm/card0 P: /devices/pci0000:00/0000:00:02.0/drm/card0 N: dri/card0 E: DEVNAME=/dev/dri/card0 E: DEVPATH=/devices/pci0000:00/0000:00:02.0/drm/card0 E: DEVTYPE=drm_minor E: ID_FOR_SEAT=drm-pci-0000_00_02_0 E: ID_PATH=pci-0000:00:02.0 E: ID_PATH_TAG=pci-0000_00_02_0 E: MAJOR=226 E: MINOR=0 E: SUBSYSTEM=drm E: TAGS=:master-of-seat:seat:uaccess: E: USEC_INITIALIZED=59893 Without this patch, the capabilities for a seat on a VirtualBox installation of systemd v219 incorrectly show it as non-graphical, even though I can type these commands from an xterm: $ loginctl show-seat seat0 Id=seat0 CanMultiSession=yes CanTTY=yes CanGraphical=no … https://bugs.freedesktop.org/show_bug.cgi?id=90822
2015-06-0290-loaderentry.install: fixup BOOT_OPTIONSHarald Hoyer
better use "read -r -d '' -a" to read in the array. It handles multiple lines and missing newline at the EOF.
2015-06-02random-util: guard including sys/auxv.h with the corresponding ifdef checkMichael Olbrich
2015-06-02missing: add more btrfs definesMichael Olbrich
2015-06-01test-unit-file: add test for improperly escaped exec stringDaniel Mack
Add a regression test for the recent breakage of handling improperly escaped exec strings in unit files. Code contributed by Martin Pitt: https://bugs.freedesktop.org/show_bug.cgi?id=90794
2015-06-01load-fragment: use UNESCAPE_RELAX flag to parse exec directivesDaniel Mack
The cunescape() helper function used to handle unknown escaping sequences gracefully by copying them over verbatim. Commit 527b7a42 ("util: rework cunescape(), improve error handling") added a flag to make that behavior optional, and changed to default to error out with -EINVAL otherwise. However, config_parse_exec(), which is used to parse the Exec{Start,Stop}{Post,Pre,} directives of unit files, was not changed along with that commit, which means that directives with improperly escaped command line strings are no longer parsed. Relevant bugreports include: https://bugs.freedesktop.org/show_bug.cgi?id=90794 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=787256 Fix this by passing UNESCAPE_RELAX to config_parse_exec() in order to restore the original behavior.
2015-06-01sd-device: ensure update_properties_buf() is a noop on failureTom Gundersen
Don't clobber the sd_device struct, and don't leak memory when memory allocation fails.
2015-06-01sd-device: fix invalid property strv pointersMartin Pitt
In device_update_properties_bufs(), the strv is built from pointers into the single nul-terminated buf_nulstr string, to avoid allocating the key=value strings twice. However, we must not do that while building and GREEDY_REALLOC0()'ing buf_nulstr, as each time when this actually reallocates memory the pointers we wrote into buf_strv so far become invalid. So change the logic to first completely build the new buf_nulstr, and then iterate over it to pick out the pointers to the individual key=value strings for properties_strv. This fixes invalid environment for udev callouts.
2015-05-31udevd: open sockets before forkingTom Gundersen
The communication channels must all be opened before forknig in daemon mode, or we cannot guarantee that udevadm will work correctly as soon as udevd is started.
2015-05-31udevd: don't allocate sd_event object before forkTom Gundersen
In daemon mode we would break sd-event as it cannot work accross different processes. Simply delay the allocation to after the fork.
2015-05-31udevd: don't sanitize fd 0,1,2Tom Gundersen
Kay said: 'it is from ancient times, when we started udevd from the kernel's usermodhelper which had no fd 0,1,2'.
2015-05-31core/namespace: Protect /usr instead of /home with ProtectSystem=yesJason Pleau
A small typo in ee818b8 caused /home to be put in read-only instead of /usr when ProtectSystem was enabled (ie: not set to "no").
2015-05-30conf-parser: parsing error logs should show a type not a vartypeRonny Chevalier
Instead of this: [filename:1] Failed to parse nsec_t value, ignoring: garbage we show this: [filename:1] Failed to parse nsec value, ignoring: garbage
2015-05-30networkctl: fix uninitialized variableRonny Chevalier
We ignore the return value of sd_device_get_devtype, then devtype could be uninitialized when used with streq_ptr. So we need to initialize it first.
2015-05-30test-fdset: add more testsRonny Chevalier
add tests for the following functions: - fdset_new_array - fdset_steal_first - fdset_isempty
2015-05-30tests: add test-conf-parserRonny Chevalier
2015-05-30terminal: fix include orderingThomas Hindoe Paaboel Andersen
2015-05-29console: use signal-util.h and reorder includesThomas Hindoe Paaboel Andersen
Missed this one from the previous commit