Commit graph

187 commits

Author SHA1 Message Date
Lennart Poettering aacf3b483b api: unify some common bits used by public systemd APIs 2013-10-16 17:01:26 +02:00
Lennart Poettering 40ca29a137 timedated: use libsystemd-bus instead of libdbus for bus communication
Among other things this also adds a few things necessary for the change:

- Considerably more powerful error returning APIs in libsystemd-bus

- Adapter for connecting an sd_bus to an sd_event

- As I reworked the PolicyKit logic to the new library I also made it
  asynchronous, so that PolicyKit requests of one user cannot block out
  another user anymore.

- We always use the macro names for common bus error. That way it is
  harder to mistype them since the compiler will notice
2013-10-16 06:15:02 +02:00
Lennart Poettering 4be391639f bus: properly implement logic for generating InterfacesAdded/InterfacesRemoved signals of ObjectManager 2013-10-11 23:23:46 +02:00
Lennart Poettering 55736ed0c7 bus: add sd_bus_message_append_strv() to easily add a NULL terminated string array to a message 2013-10-11 23:02:47 +02:00
Lennart Poettering 77a874a3fb bus: don't rely on gccisms/c11 in public header files.
One day sd-bus.h should become a public header file. We generally try to
be conservative in language features we use in public headers (much
unlike in private code), hence don't make use of anonymous unions in
structs for the vtable definitions.
2013-10-11 20:32:16 +02:00
Lennart Poettering 9db7635521 bus: if a a Set() vtable callback of a writable is left NULL, try to do the right thing automatically 2013-10-11 20:03:19 +02:00
Lennart Poettering 90d184b234 bus: decorate API calls with gcc attributes where appropriate 2013-10-11 05:21:08 +02:00
Lennart Poettering 29ddb38fea libsystemd-bus: add lightweight object vtable implementation for exposing objects on the bus
This adds a lightweight scheme how to define interfaces in static fixed
arrays which then can be easily registered on a bus connection. This
makes it much easier to write bus services.

This automatically handles implementation of the Properties,
ObjectManager, and Introspection bus interfaces.
2013-10-09 02:40:07 +02:00
Lennart Poettering 9444b1f20e logind: add infrastructure to keep track of machines, and move to slices
- This changes all logind cgroup objects to use slice objects rather
  than fixed croup locations.

- logind can now collect minimal information about running
  VMs/containers. As fixed cgroup locations can no longer be used we
  need an entity that keeps track of machine cgroups in whatever slice
  they might be located. Since logind already keeps track of users,
  sessions and seats this is a trivial addition.

- nspawn will now register with logind and pass various bits of metadata
  along. A new option "--slice=" has been added to place the container
  in a specific slice.

- loginctl gained commands to list, introspect and terminate machines.

- user.slice and machine.slice will now be pulled in by logind.service,
  since only logind.service requires this slice.
2013-06-20 03:49:59 +02:00
Lennart Poettering 264ad849a4 bus: add APIs for negotiating what is attached to messages 2013-05-17 04:26:27 +02:00
Lennart Poettering eb01ba5de1 bus: synthesize timeout message errors instead of returning error codes 2013-05-16 21:14:56 +02:00
Lennart Poettering 453a0c2946 bus: add support for adding memfds into message payload 2013-05-15 19:45:45 +02:00
Lennart Poettering f8e013f8bf bus: add sd_bus_message_append_string_space() for zero-copy string appending 2013-05-10 03:38:11 +02:00
Lennart Poettering b3af9646f8 bus: add API for appending/reading fixed arrays 2013-05-09 20:01:21 +02:00
Lennart Poettering 8973790ee6 cryptsetup: warn if /etc/crypttab is world-readable 2013-04-30 08:36:01 -03:00
Zbigniew Jędrzejewski-Szmek e4d2bfdd73 Add printf attributes in exported headers
gcc (and other compilers) sometimes generate spurious warnings, and
thus users of public headers must be able to disable warnings.

Printf format attributes can be disabled by setting
    #define _sd_printf_attr_
before including the header file.

Also, add similar logic for sentinel attribute:
    #define _sd_sentinel_attr_
before including the header file disables the attribute.
2013-04-25 21:50:48 -04:00
Lennart Poettering 7066618570 bus: add cal to determine machine id of an owner of a service 2013-04-23 16:00:32 -03:00
Lennart Poettering 102ea8e4f2 bus: parse capability kdbus meta data of messages 2013-04-23 00:14:30 -03:00
Lennart Poettering 120f919e70 bus: parse audit metadata from kdbus messages 2013-04-22 23:38:38 -03:00
Lennart Poettering bc7f3beb30 bus: parse owner uid from cgroup path, too 2013-04-22 23:27:38 -03:00
Lennart Poettering d8d3d8a781 bus: parse unit/user unit/session from cgroup path 2013-04-16 04:54:46 +02:00
Lennart Poettering 4a875b6133 kdbus: parse cgroup meta data, too 2013-04-15 01:51:37 +02:00
Lennart Poettering 77930f1120 kdbus: also parse cmdline message attribute 2013-04-14 03:20:23 +02:00
Lennart Poettering 69aec65cf8 kdbus: parse even more kernel meta data fields 2013-04-13 21:53:11 +02:00
Lennart Poettering acb5a3cb20 bus: parse and expose kdbus message timestamps 2013-04-12 01:57:53 +02:00
Lennart Poettering 8323bc1f90 bus: also parse PID starttime out of kdbus message 2013-04-12 01:49:52 +02:00
Lennart Poettering e9a967f9a0 bus: make kdbus work so that we can exchange real messages
We have ignition, we have tremendous fire!
2013-04-12 01:19:32 +02:00
Lennart Poettering 05d0c3e1fd update TODO 2013-04-09 21:31:16 +02:00
Lennart Poettering b6b7d43379 update TODO 2013-04-08 15:23:52 +02:00
Lennart Poettering f10dda3b82 bus: add convenience calls for method replies, too 2013-04-05 14:56:48 +02:00
Lennart Poettering c784c5ce77 bus: use C99 struct construction for error initializers
That way we can allocate an error struct on-the-fly while calling a
function. Nice!
2013-04-05 13:12:11 +02:00
Lennart Poettering 917b5dc707 bus: add convenience functions for constructing and sending method calls/signals in one call 2013-04-05 04:15:39 +02:00
Lennart Poettering 7286037fd4 bus: properly detect and handle if a callback is installed/removed from within a callback 2013-04-05 03:55:58 +02:00
Lennart Poettering 6807947e56 bus: don't allow recursive invocation of sd_bus_process() 2013-04-05 03:15:10 +02:00
Lennart Poettering d1148ed10a update TODO 2013-04-02 17:47:59 +02:00
Lennart Poettering 15d5af8145 bus: fall back to readv/writev if recvmsg/sendmsg don't work 2013-04-01 03:29:29 +02:00
Lennart Poettering a7edaadd78 journal-gatewayd: query PID 1 for virtalization
Since journal-gatewayd is now running unprivileged, and detecting
virtalization requires privileges, query PID1 via D-Bus for the used
virtualization.

This is also the first time we use libsystemd-bus for more than just
testing.

https://bugs.freedesktop.org/show_bug.cgi?id=62173
2013-03-31 18:16:02 +02:00
Renamed from src/libsystemd-bus/sd-bus.h (Browse further)