1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-06 16:59:03 +03:00
Commit Graph

254 Commits

Author SHA1 Message Date
Lennart Poettering
7bb4d371af sd-bus: when an event loop terminates, explicitly close the bus
This makes sure we actually release the bus and all the messages it
references.
2014-07-02 17:36:47 +02:00
Lennart Poettering
b5eca3a205 bus: drop bus/message GC logic
When a caller drops all references to a bus and its messages while the
messages where still queue, this causes the bus to reference the
messages, and the messages to reference the bus, without anybody else
keeping a reference, which is something we so far considered a leak, and
tried to fix with a GC logic that would recognize cases like this, and
drop the reference.

This GC logic has been broken sofar, and remained unfixed. This commit
removes it altogther, replacing it with nothing. The rationale is that
simply because all refs to the bus have been dropped its queued messages
should *still* be written to the bus, even if the caller doesn't retain
any reference to either bus nor message. This means it was actually
wrong to attempt to clean up the bus in this case.

The proper way how applications should handle this is by explicitly
invoking sd_bus_close(), when they want busses to go away. This is
probably want they want to do anyway to avoid getting spurious
callbacks after they stopped using a bus.
2014-07-02 17:29:09 +02:00
Lennart Poettering
9a00f57a5b path: add new "systemd-path" utility for querying paths described in file-hierarchy(7)
This new tool is based on "sd-path", a new (so far unexported) API for
libsystemd, that can hopefully grow into a workable API covering /opt
and more one day.
2014-07-02 12:23:36 +02:00
Tom Gundersen
9e358851b4 networkd: netdev - add dummy support 2014-07-01 22:10:07 +02:00
Lennart Poettering
5d3de3fe9c socket-util: introduce in_addr_union similar to sockaddr_union and make use of it everywhere 2014-06-18 18:28:29 +02:00
Susant Sahani
6ef8147700 sd-rtnl: add support for vxlan rtnl attributes
This patch adds vxlan rtnl attributes to sd-rtnl
2014-06-16 20:38:22 +02:00
Lennart Poettering
42a04ee69c build-sys: update library versions 2014-06-11 15:30:28 +02:00
Lennart Poettering
2a0958d2d0 sd-bus: don't allow creating message objects that are not attached to a bus
It seems unnecessary to support this, and we rather should avoid
allowing this at all, so that people don't program against this
sloppily and we end up remarshalling all the time...
2014-06-06 18:30:01 +02:00
Lennart Poettering
be8f4e9e8e sd-daemon: introduce sd_pid_notify() and sd_pid_notifyf()
sd_pid_notify() operates like sd_notify(), however operates on a
different PID (for example the parent PID of a process).

Make use of this in systemd-notify, so that message are sent from the
PID specified with --pid= rather than the usually shortlived PID of
systemd-notify itself.

This should increase the likelyhood that PID 1 can identify the cgroup
that the notification message was sent from properly.
2014-06-05 17:05:18 +02:00
Lennart Poettering
b27adf354a bus: make use of sd_bus_try_close() in exit-on-idle services 2014-06-05 13:50:35 +02:00
Lennart Poettering
eec6022cf0 sd-event: restore correct timeout behaviour 2014-06-05 13:50:35 +02:00
Lennart Poettering
a4152e3fe2 kdbus: when uploading bus name policy, resolve users/groups out-of-process
It's not safe invoking NSS from PID 1, hence fork off worker processes
that upload the policy into the kernel for busnames.
2014-06-05 13:09:46 +02:00
Susant Sahani
a613382bbf networkd: introduce vti tunnel
This patch enables vti tunnel support.

example conf:

file : vti.netdev
[NetDev]
Name=vti-tun
Kind=vti
MTUBytes=1480

[Tunnel]
Local=X.X.X.X
Remote=X.X.X.X

file: vti.network
[Match]
Name=em1

[Network]
Tunnel=vti-tun

TODO:

Add more attributes for vti tunnel
IFLA_VTI_IKEY
IFLA_VTI_OKEY
2014-06-02 16:20:44 +02:00
Susant Sahani
8bb088c5d4 networkd: introduce gre tunnel
This patch enables gre tunnel support.

example conf:

file : gre.netdev
[NetDev]
Name=gre-tun
Kind=gre
MTUBytes=1480

[Tunnel]
Local=X.X.X.X
Remote=X.X.X.X

file: gre.network
[Match]
Name=em1

[Network]
Tunnel=gre-tun

TODO:

Add more attributes for gre tunnel
IFLA_GRE_IFLAGS
IFLA_GRE_IFLAGS
IFLA_GRE_IKEY
IFLA_GRE_OKEY
2014-06-02 16:13:00 +02:00
Kay Sievers
82d115d9ab timedated: refuse manual system time updates when automatic timesync is enabled 2014-05-24 10:45:44 +08:00
Lennart Poettering
9a05490933 cgroups: simplify CPUQuota= logic
Only accept cpu quota values in percentages, get rid of period
definition.

It's not clear whether the CFS period controllable per-cgroup even has a
future in the kernel, hence let's simplify all this, hardcode the period
to 100ms and only accept percentage based quota values.
2014-05-22 11:53:12 +09:00
Lennart Poettering
a077b666cb sd-login: add C API to query primary session of a user 2014-05-19 09:33:20 +09:00
Lennart Poettering
878cd7e95c machined: add logic to query IP addresses of containers 2014-05-18 20:52:49 +09:00
Zbigniew Jędrzejewski-Szmek
2915234da0 bus: fix unitialized variable access in error path 2014-05-16 18:03:00 -04:00
Lennart Poettering
7e28adeb63 sd-bus: make sure we properly handle NULL callback functions 2014-05-15 18:09:20 +02:00
Lennart Poettering
b98490f7dc sd-bus: fix an assert when running in kdbus mode 2014-05-15 17:42:39 +02:00
Lennart Poettering
f2e2415d69 resolve: fix copy/paste error 2014-05-15 17:31:14 +02:00
Lennart Poettering
9e7e9a6524 sd-bus: don't hit assert when installing match 2014-05-15 17:26:02 +02:00
Lennart Poettering
1b64f83829 sd-bus: always keep slot reference while dispatching callback
Also, make sure we automatically destroy reply callbacks that are
floating.
2014-05-15 17:13:05 +02:00
Lennart Poettering
4a134c4903 sd-resolve: add "floating" resolve queries
Same story as for sd-bus and sd-event: allow passing NULL to store query
in in which case the query is freed automatically.
2014-05-15 17:13:05 +02:00
Lennart Poettering
a71fe8b8ae sd-event: introduce concept of "floating" event sources
These are the counterpart of "floating" bus slots, i.e. event sources
that are bound to the lifetime of the event object itself, and thus
don't require an explicit reference to be kept.
2014-05-15 17:13:04 +02:00
Zbigniew Jędrzejewski-Szmek
de0671ee7f Remove unnecessary casts in printfs
No functional change expected :)
2014-05-15 15:29:58 +02:00
Lennart Poettering
19befb2d5f sd-bus: introduce sd_bus_slot objects encapsulating callbacks or vtables attached to a bus connection
This makes callback behaviour more like sd-event or sd-resolve, and
creates proper object for unregistering callbacks.

Taking the refernce to the slot is optional. If not taken life time of
the slot will be bound to the underlying bus object (or in the case of
an async call until the reply has been recieved).
2014-05-15 01:15:30 +02:00
Lennart Poettering
04552566fa bus: add userdata API for bus name tracker objects 2014-05-14 22:58:43 +02:00
Susant Sahani
7951dea209 networkd: introduce ipip tunnel
This patch enables basic ipip tunnel support.
It works with kernel module ipip

example conf:

file: ipip.netdev

[NetDev]
Name=ipip-tun
Kind=ipip
MTUBytes=1480

[Tunnel]
Local=192.168.223.238
Remote=192.169.224.239
TTL=64

file: ipip.network

[Match]
Name=em1

[Network]
Tunnel=ipip-tun

[tomegun:
         - drop unused variable
         - take ref when enslaving]
2014-05-12 17:37:12 +02:00
Tom Gundersen
8fe65c03fc rtnl: message - fix check for broadcast messages 2014-05-10 20:56:37 +02:00
Tom Gundersen
66269b05cf rtnl: message - read group membership of incoming messages 2014-05-10 20:56:37 +02:00
Tom Gundersen
26349add97 rtnl: message - verify that we read the pending message size from the kernel
Reuse the auth-checking for both the peek and the real read.
2014-05-10 20:56:37 +02:00
Tom Gundersen
127dc4ea94 rtnl: message - move code around
No functional change.
2014-05-10 20:56:37 +02:00
Tom Gundersen
897e184c7d rtnl: change from bitmask to enum for rtnl groups
The bitmask is deprecated in the kernel, so move to the new interface. At the moment
this does not make a difference for us, but it avoids having to change the API in the future.
2014-05-10 20:56:37 +02:00
Tom Gundersen
f4e884dd1c sd-rtnl: message - add support for getting prefixlen from address messages 2014-05-10 20:56:37 +02:00
Lennart Poettering
73dec31974 sd-resolve: make sure we can destroy a query object from its own callback handler 2014-05-05 23:49:19 +02:00
Lennart Poettering
cc567911ba sd-event: allow disabling event sources when an event object is dying anyway 2014-05-05 23:48:25 +02:00
Lennart Poettering
59bc1fd776 sd-event: make it easy to bind signal handling to event loop exits
By passing a NULL callback provide a simple way to make event loops exit
on SIGTERM and other signals.
2014-05-05 23:47:59 +02:00
Tom Gundersen
7ca1d31964 sd-rtnl-message: append - fix uninitialized memory
We were not properly clearing the padding at the front of some containers.
2014-05-03 18:14:42 +02:00
Tom Gundersen
3f781aa8a0 sd-rtnl: route - allow setting multiple matching routes 2014-05-03 18:14:42 +02:00
Lennart Poettering
93f1bcf400 sd-resolve: rework sd-resolve to be callback based, similar in style to sd-bus and sd-event 2014-04-29 15:45:16 +02:00
Lennart Poettering
b2f8b02ec2 core: expose CFS CPU time quota as high-level unit properties 2014-04-25 13:27:25 +02:00
Kay Sievers
1d49b5aea9 bus: update kdbus.h 2014-04-24 10:36:19 +02:00
Daniel Buch
77c98a9eb1 test-resolve.c: Cleanup and make use of sockaddr_pretty() 2014-04-24 09:27:20 +02:00
Lennart Poettering
6b01f1d391 delta: draw arrows with draw_special_char()
Let's unify generation of unicode chars at one place.

Also, don't add an extra space into chars we print, except for the tree
chars where this is really necessary.
2014-04-23 19:06:39 +02:00
Lennart Poettering
1b02f30183 bus: simplification 2014-04-23 19:06:38 +02:00
Kay Sievers
26e376bfe3 bus: remove "on behalf" kdbus logic (ABI break) 2014-04-22 22:52:19 +02:00
Lukasz Skalski
6d6c604ac8 doc: fix items' names in PORTING-DBUS1 2014-04-20 23:06:48 -04:00
Thomas Hindoe Paaboel Andersen
6e37cd2f4a silence warnings 2014-04-21 00:03:22 +02:00