Commit Graph

1556 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek 65d410c7ca sd-id128: add sd_id128_get_boot_app_specific() 2018-10-02 15:15:10 +02:00
Yu Watanabe 5c434af721
Merge pull request #10218 from keszybz/export-sd-device-hwdb
Export functions in sd-device and sd-hwdb
2018-10-01 19:45:55 +02:00
Yu Watanabe f9c8c01fcc test: try system bus if user bus cannot be opened 2018-10-01 10:15:54 +02:00
Thomas Haller f21f31b24b trivial: fix spelling in code comments
Based-on-patch-by: Rafael Fontenelle <rafaelff@gnome.org>
2018-09-30 21:32:33 +02:00
Zbigniew Jędrzejewski-Szmek 6083c4b763 libsystemd: export all functions in sd-hwdb.h
sd-hwdb.h is now also installed in /usr/include/systemd.
2018-09-30 20:39:02 +02:00
Zbigniew Jędrzejewski-Szmek 3f608087bd libsystemd: export all functions in sd-device.h
sd-device.h is now also installed in /usr/include/systemd.
2018-09-30 20:39:02 +02:00
Lennart Poettering 0eeba7a39f
Merge pull request #10168 from keszybz/coverity-fixes
Coverity fixes
2018-09-26 15:37:22 +02:00
Yu Watanabe 0fbc35524c libsystemd: add missing 'global' specifier in libsystemd.sym 2018-09-25 23:30:58 +02:00
Zbigniew Jędrzejewski-Szmek ec766a5168 sd-event: use new cleanup function more 2018-09-25 11:15:27 +02:00
Zbigniew Jędrzejewski-Szmek 8c75fe1765 sd-event: remove dead code and use _cleanup_
CID #1393250.
2018-09-25 11:10:12 +02:00
Yu Watanabe dcfbde3a43 sd-device: make sd_device_get_*() return -ENOENT if the values are not set 2018-09-23 17:18:19 +09:00
Yu Watanabe 80f1b34442 sd-hwdb: initialize variable
The variable 'fn' was not initialized on compat mode.

Fixes CID#1395731.
2018-09-20 14:28:03 +02:00
Yu Watanabe d6609f8280 hwdb,udevadm: also unify hwdb_query() and hwdb_test() 2018-09-19 17:38:07 +09:00
Yu Watanabe e3b9fd0a27 sd-hwdb: use structured initializers 2018-09-19 17:36:19 +09:00
Yu Watanabe 6a34639e76 hwdb: unify duplicated code and move it to hwdb-util.c
Both 'systemd-hwdb update' and 'udevadm hwdb --update' creates hwdb
database. The database created by systemd-hwdb containes additional
information such that priority, line number, and source filename.
The unified function 'hwdb_update()' can take a flag 'compat' which
controls the format version of created database.
2018-09-19 17:36:03 +09:00
Yu Watanabe 73c63957d2 sd-hwdb: adjust included headers 2018-09-19 16:52:59 +09:00
Yu Watanabe 93bab28895 tree-wide: use typesafe_qsort() 2018-09-19 08:02:52 +09:00
Yu Watanabe 5485deee6e
sd-device: use qsort_safe() (#10099)
The number of found devices may be zero. So, let's use qsort_safe().

Follow-up for 0a1665890c.
Fixes #10096.
2018-09-16 23:46:58 +09:00
Zbigniew Jędrzejewski-Szmek 32397af3d4
Merge pull request #9928 from yuwata/libudev-cleanups
libudev: coding style updates
2018-09-15 22:36:38 +02:00
Zbigniew Jędrzejewski-Szmek 9035119518
Merge pull request #9958 from yuwata/sd-device-enum-set
sd-device: make sd_device_enumerator_get_*_next() not destroy the list
2018-09-15 18:33:18 +02:00
Zbigniew Jędrzejewski-Szmek 730d989acc tests: add a helper function to skip with errno 2018-09-14 09:29:57 +02:00
Zbigniew Jędrzejewski-Szmek 6d7c403324 tests: use a helper function to parse environment and open logging
The advantages are that we save a few lines, and that we can override
logging using environment variables in more test executables.
2018-09-14 09:29:57 +02:00
Zbigniew Jędrzejewski-Szmek 317bb217d3 tests: add helper to unify skipping a test and exiting 2018-09-14 09:29:57 +02:00
Yu Watanabe 964bc0ad60 test: log when skipping tests in more cases
Follow-up for the previous commit.
2018-09-13 12:07:34 +02:00
Yu Watanabe 8aae9a66fa sd-device,libudev: make an argument for *_set_sysattr_value() const 2018-09-11 12:45:21 +09:00
Yu Watanabe 708474c5a0 sd-device: introduce device_enumerator_get_devices() 2018-09-10 16:47:35 +09:00
Yu Watanabe 0a1665890c sd-device: make sd_device_enumerator_get_*_next() not destroy the list 2018-09-10 16:47:35 +09:00
Yu Watanabe 4005d3215e sd-device: sd_device_enumerator_get_subsystem_next() requests the device list is uptodate 2018-08-28 05:09:40 +09:00
Yu Watanabe 6116d2b275 sd-device: use structured initializers 2018-08-28 05:09:40 +09:00
Yu Watanabe 1c71f7f329 libsystemd: use DEFINE_ATOMIC_REF_UNREF_FUNC or frineds where applicable 2018-08-28 05:09:40 +09:00
Yu Watanabe 6b6e07415c sd-netlink: fix indentation 2018-08-28 05:09:40 +09:00
Yu Watanabe 61e21d4ca1 sd-hwdb: drop unused variable 2018-08-28 05:09:40 +09:00
Yu Watanabe 8301aa0bf1 tree-wide: use DEFINE_TRIVIAL_REF_UNREF_FUNC() macro or friends where applicable 2018-08-27 14:01:46 +09:00
Yu Watanabe cf4b2f9906 tree-wide: use unsigned for refcount 2018-08-27 13:48:04 +09:00
Zbigniew Jędrzejewski-Szmek e6a2feb57d
Merge pull request #8135 from shawnl/arg_host
sd-bus: rework host handling
2018-08-23 13:46:54 +02:00
Susant Sahani 53cb501a13 networkd and sd-netlink: add support for Generic netlink And FooOverUDP to IPIP tunnel
This work add support to generic netlink to sd-netlink.
See https://lwn.net/Articles/208755/

networkd: add support FooOverUDP support to IPIP tunnel netdev
https://lwn.net/Articles/614348/

Example conf:

/lib/systemd/network/1-fou-tunnel.netdev
```
[NetDev]
Name=fou-tun
Kind=fou

[FooOverUDP]
Port=5555
Protocol=4

```

/lib/systemd/network/ipip-tunnel.netdev
```
[NetDev]
Name=ipip-tun
Kind=ipip

[Tunnel]
Independent=true
Local=10.65.208.212
Remote=10.65.208.211
FooOverUDP=true
FOUDestinationPort=5555
```

$ ip -d link show ipip-tun
```
5: ipip-tun@NONE: <POINTOPOINT,NOARP> mtu 1472 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ipip 10.65.208.212 peer 10.65.208.211 promiscuity 0
    ipip remote 10.65.208.211 local 10.65.208.212 ttl inherit pmtudisc encap fou encap-sport auto encap-dport 5555 noencap-csum noencap-csum6 noencap-remcsum numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
```
2018-08-23 11:30:37 +02:00
Zbigniew Jędrzejewski-Szmek c07fe6d0df Merge pull request #9406 from yuwata/rfe-9228
Trivial conflict solved in merge and include net/if_arp.h added.
2018-08-23 11:11:13 +02:00
Yu Watanabe ad5944d71c sd-device: introduce device_new_from_stat_rdev() 2018-08-23 04:57:39 +09:00
Yu Watanabe 21e627daa5 hostname: expose product UUID on bus 2018-08-08 10:15:00 +09:00
Yu Watanabe fc95c359f6 tree-wide: use returned value from log_*_errno() 2018-08-07 15:48:37 +09:00
Yu Watanabe 4ae25393f3 tree-wide: shorten error logging a bit
Continuation of 4027f96aa0.
2018-08-07 10:14:33 +09:00
Shawn Landden 6a5558491b sd-bus: fix test cases on host handling 2018-08-06 14:30:53 -07:00
Zbigniew Jędrzejewski-Szmek 8a0c1913e0 test-bus-address: a simple test for address parsing 2018-08-06 14:30:53 -07:00
Shawn Landden b85b4a70d7 sd-bus rework host handling
--machine has been missing for a while in systemd-stdio-bridge
this syntax can be switched to be more standard.

v2: Support the old syntax too.

timedatectl -H server1.myhostingcompany.com:5555/container1

Closes: #8071
2018-08-06 14:30:53 -07:00
Zbigniew Jędrzejewski-Szmek 3d51a011f1 sd-bus: verify destination and sender values when setting
We would verify destination e.g. in sd_bus_message_new_call, but allow setting
any value later on with sd_bus_message_set_destination. I assume this check was
omitted not on purpose.
2018-08-02 15:49:45 +02:00
Yu Watanabe b127bc99d1 sd-resolve: workaround for structured initialization to nested structs
When a nested struct is initialized by structured initializer, then
padding space is not cleared by zero. So, before setting values,
this makes explicitly set zero including padding.

This fixes the following false positive warning by valgrind:
```
==492== Syscall param sendmsg(msg.msg_iov[0]) points to uninitialised byte(s)
==492==    at 0x56D0CF7: sendmsg (in /usr/lib64/libpthread-2.27.so)
==492==    by 0x4FDD3C5: sd_resolve_getaddrinfo (sd-resolve.c:975)
==492==    by 0x110B9E: manager_connect (timesyncd-manager.c:879)
==492==    by 0x10B729: main (timesyncd.c:165)
==492==  Address 0x1fff0008f1 is on thread 1's stack
==492==  in frame #1, created by sd_resolve_getaddrinfo (sd-resolve.c:928)
==492==
```
2018-07-29 16:05:23 +09:00
Yu Watanabe 2a12960bcd sd-resolve: use structured initialization at more places 2018-07-29 16:01:37 +09:00
Lennart Poettering a8c9b7a0fc sd-login: let's also make sd-login understand ".host"
if sd-bus and machined grok it, then sd-login should grok it too.
2018-07-25 22:48:11 +02:00
Lennart Poettering 1e5057b904 sd-bus: allow connecting to the pseudo-container ".host"
machined exposes the pseudo-container ".host" as a reference to the host
system, and this means "machinectl login .host" and "machinectl shell
.host" get your a login/shell on the host. systemd-run currently doesn't
allow that. Let's fix that, and make sd-bus understand ".host" as an
alias for connecting to the host system.
2018-07-25 22:48:11 +02:00
Yu Watanabe dc8bc9adde sd-device: include sd-device.h in device-internal.h 2018-07-24 01:22:32 +09:00