Commit Graph

34935 Commits

Author SHA1 Message Date
Yu Watanabe 8aae9a66fa sd-device,libudev: make an argument for *_set_sysattr_value() const 2018-09-11 12:45:21 +09:00
Yu Watanabe 7f9e03952a libudev-monitor: use assert_return() in many places 2018-09-11 12:45:21 +09:00
Yu Watanabe e38242b03a libudev-monitor: add missing error checks in udev_monitor_enable_receiving() 2018-09-11 12:45:21 +09:00
Yu Watanabe a9808d8445 libudev-monitor: introduce udev_monitor_send_sd_device()
And use it in udev_monitor_send_device().
2018-09-11 12:45:21 +09:00
Yu Watanabe 23c457a7fb libudev-monitor: re-implement udev_monitor_receive_sd_device() 2018-09-11 12:45:21 +09:00
Yu Watanabe 759d9f3f8d libudev-monitor: use Hashmap or Set to store filters 2018-09-11 12:45:21 +09:00
Yu Watanabe 5e1e4c247b libudev-monitor: use structured initializer 2018-09-11 12:45:21 +09:00
Yu Watanabe a062a72f1b libudev-monitor: rename monitor_set_nl_address() and make it return negative errno 2018-09-11 12:45:21 +09:00
Yu Watanabe be1791ad6a libudev-monitor: rename udev_has_devtmpfs() and move it to mount-util.c
As the function itself is quite generic.
2018-09-11 12:45:21 +09:00
Yu Watanabe 3d01fa902c libudev-monitor: use structured initializer in bpf_*()
This also drop inline attribute from the functions.
2018-09-11 12:45:21 +09:00
Yu Watanabe 7f79720711 libudev-monitor: use 'unsigned' instead of 'unsigned int' 2018-09-11 12:45:21 +09:00
Yu Watanabe 02e7ae2fdc libudev-device: create sd_device at first in udev_device_new_from_*() 2018-09-11 12:45:21 +09:00
Yu Watanabe a7e9db150b libudev-device: drop prototypes of unexistent functions 2018-09-11 12:45:21 +09:00
Yu Watanabe 536cbd7fa6 libudev: drop a prototype of unexistent function 2018-09-11 12:45:21 +09:00
Yu Watanabe 76387b9abb libudev-device: coding style fixes 2018-09-11 12:45:21 +09:00
Yu Watanabe 33a03e6eff libudev-device: fix return value of udev_device_has_tag() 2018-09-11 12:45:21 +09:00
Yu Watanabe 1b6374d285 libudev-device: use original negative errno 2018-09-11 12:45:21 +09:00
Yu Watanabe 71074e3a10 libudev-device: use structured initializer 2018-09-11 12:45:21 +09:00
Yu Watanabe 60fdee32bd libudev-enumerate: use structured initializer 2018-09-11 12:45:21 +09:00
Yu Watanabe 2b19953a0d libudev-hwdb: use assert_return_errno() 2018-09-11 12:45:21 +09:00
Yu Watanabe 68b80b8557 libudev-hwdb: use structured initializer 2018-09-11 12:45:21 +09:00
Yu Watanabe b485aa5852 libudev-hwdb: drop unused 'struct udev *udev' in udev_hwdb struct 2018-09-11 12:45:21 +09:00
Yu Watanabe f8cdabc0ec libudev-queue: coding style fixes 2018-09-11 12:45:21 +09:00
Yu Watanabe 09f638ebd9 libudev-queue: drop prototypes of nonexistent functions 2018-09-11 12:45:21 +09:00
Yu Watanabe 2dac88a9d1 libudev-queue: use _cleanup_ attribute and TAKE_FD() 2018-09-11 12:45:21 +09:00
Yu Watanabe d35c0e8d53 libudev-queue: use assert_return() 2018-09-11 12:45:21 +09:00
Yu Watanabe ccda7f87f5 libudev-queue: use structured initializer 2018-09-11 12:45:21 +09:00
Yu Watanabe bc54df90e4 libudev: modernize code a bit 2018-09-11 12:45:21 +09:00
Yu Watanabe 5ccb44a53f libudev: use structured initializer 2018-09-11 12:45:21 +09:00
Yu Watanabe 2454727d5a libudev: drop unused element in udev struct 2018-09-11 12:45:21 +09:00
Yu Watanabe ff6f97f0cf libudev: drop outdated comments 2018-09-11 12:45:21 +09:00
Yu Watanabe 3c6ac21929 libudev: use DEFINE_PUBLIC_TRIVIAL_REF_UNREF_FUNC() macro where applicable 2018-09-11 12:45:21 +09:00
Yu Watanabe 50d2158901 libudev-monitor: use safe_close() in udev_monitor_disconnect() 2018-09-11 12:45:21 +09:00
Thomas Haller a507737e5c dhcp: fix assertion starting DHCP client without MAC address (#10054)
An assertion in dhcp_network_bind_raw_socket() is triggered when
starting an sd_dhcp_client without setting a MAC address first.

  - sd_dhcp_client_start()
    - client_start()
      - client_start_delayed()
        - dhcp_network_bind_raw_socket()

In that case, the arp-type and MAC address is still unset. Note that
dhcp_network_bind_raw_socket() already checks for a valid arp-type
and MAC address below, so we should just gracefully return -EINVAL.

Maybe sd_dhcp_client_start() should fail earlier when starting without
MAC address. But the failure here will be correctly propagated and
the start aborted.

Fixes: 76253e73f9
2018-09-11 09:45:47 +09:00
Dariusz Gadomski c6d7a5e9a3 hwdb: Update PNP IDs of Goldstar (now: LG Electronics). (#10051)
hwdb: Update PNP IDs of Goldstar (now: LG Electronics)
2018-09-11 00:35:30 +02:00
Franck Bui 03d0f4b58e nspawn: always use mode 555 for /sys
When a network namespace is needed, /sys is mounted as tmpfs (see commit
d8fc6a000f for details).

But in this case mode 755 was used as initial permissions for /sys whereas the
default mode for sysfs is 555.

In practice using 755 doesn't have any impact because /sys is mounted read-only
too but for consistency, let's use the correct mode.

Fixes: #10050
2018-09-11 00:34:00 +02:00
Jürg Billeter da0da5eccf pam_systemd: support use in PID namespaces
Pass 0 as leader PID to CreateSession to let logind use the PID from the
D-Bus credentials. This allows use of pam_systemd in PID namespaces.
2018-09-10 19:04:21 +02:00
Zbigniew Jędrzejewski-Szmek 3c83f15967
Merge pull request #10037 from filbranden/docs2
Moving docs around and starting conversion to Markdown
2018-09-09 21:01:17 +02:00
Filipe Brandenburger bf7efeb16f build-sys: Use common gcc argument detection for negative warning flags.
Starting with meson 0.46, it is able to detect these argument correctly.

See this commit in meson codebase for more details:
695b8f3a03

We already carry a requirement for meson_version : '>= 0.46', so we can be sure
our build system will include this commit.

Tested by building systemd using a cloned meson synced to the 0.46.0 tag,
confirmed the warnings were detected correctly in that case. The meson messages included this snippet:

> Compiler for C supports arguments -Wno-unused-parameter -Wunused-parameter: YES
> Compiler for C supports arguments -Wno-missing-field-initializers -Wmissing-field-initializers: YES
> Compiler for C supports arguments -Wno-unused-result -Wunused-result: YES
> Compiler for C supports arguments -Wno-format-signedness -Wformat-signedness: YES
> Compiler for C supports arguments -Wno-error=nonnull -Werror=nonnull: YES
> Compiler for C supports arguments -Wno-maybe-uninitialized -Wmaybe-uninitialized: YES
2018-09-09 20:57:08 +02:00
Zbigniew Jędrzejewski-Szmek 5e5796e3e1
Merge pull request #10042 from jwrdegoede/hwdb-sensors4
Hwdb sensors4
2018-09-09 20:39:23 +02:00
Hans de Goede f253cee808 hwdb: Add accelerometer orientation quirk for the Onda v975w tablet
Add accelerometer orientation quirk for the Onda v975w tablet.
2018-09-09 16:02:58 +02:00
Hans de Goede f0545adcd3 hwdb: Add accelerometer orientation quirk for the Connect Tablet9 tablet
Add accelerometer orientation quirk for the Connect Tablet9 tablet.
2018-09-09 16:02:58 +02:00
Hans de Goede a8b33d5cfd hwdb: Add accelerometer orientation quirk for the HP Pavilion x2 - 10-n000nd
Add accelerometer orientation quirk for the HP Pavilion x2 - 10-n000nd 2-in-1.
2018-09-09 16:02:58 +02:00
Hans de Goede a4d08d24e6 hwdb: Add accelerometer orientation quirk for the Chuwi Vi10 tablet
Add accelerometer orientation quirk for the Chuwi Vi10 (CWI505) tablet.

While at it also update the Chuwi Hi8 Pri comment to include the
CWI model-number.
2018-09-09 15:41:28 +02:00
Filipe Brandenburger b6dc0d7d01 docs: convert TRANSLATORS to Markdown
Also expand it to cover typical tasks of creating new translations, updating
existing ones and compiling them (which can be useful to check syntax.)
2018-09-08 13:40:19 -07:00
Filipe Brandenburger 1d1cb1683e docs: convert DISTRO_PORTING to Markdown 2018-09-08 13:39:03 -07:00
Filipe Brandenburger c2beadcd34 docs: move markdown docs from .github/ to docs/
The GitHub guide on contributing file says: "Decide whether to store your
contributing guidelines in your repository's root, docs, or .github directory."

https://help.github.com/articles/setting-guidelines-for-repository-contributors/#adding-a-contributing-file

But there's really no advantage to keeping it in the hidden .github/, since
these are public and really belong together with the other documentation.

We can still keep the issue templates under .github/, since they are not really
documentation on their own.

Updated the links pointing to CONTRIBUTING.md to refer to the one in docs/.
2018-09-08 13:39:03 -07:00
Filipe Brandenburger 9e825ebf4f docs: move doc/ to docs/
The docs/ directory is special in GitHub, since it can be used to serve GitHub
Pages from, so there's a benefit to switching to it in order to expose it
directly as a website.

Updated references to it from the documentations themselves, from the
CONTRIBUTING.md file and from Meson build files.
2018-09-08 13:39:03 -07:00
Zbigniew Jędrzejewski-Szmek 9d0798a2ed
Merge pull request #9832 from yuwata/fix-9831
network: fixes related to setting MTU
2018-09-08 17:17:07 +02:00
Zbigniew Jędrzejewski-Szmek a5404992cc
Merge pull request #9942 from lucaswerkmeister/9939
seccomp: fix #9939 and allow specifying multiple errnos for syscall
2018-09-08 12:08:54 +02:00