b1afef0bc8d98c389a7f71307bee8ef9fc991ced |
|
01-Feb-2017 |
Pavel Březina <pbrezina@redhat.com> |
SBUS: use sss_ptr_hash for signals table
This patch reuses sss_ptr_hash module introduced in NSS patches in sbus code.
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com> |
ea872f140a04419fba3f2b9722da74d7fd1ca1ee |
|
01-Feb-2017 |
Pavel Březina <pbrezina@redhat.com> |
SBUS: use sss_ptr_hash for nodes table
This patch reuses sss_ptr_hash module introduced in NSS patches in sbus code.
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com> |
a3b2bc38263191f23eba2ad98470d8ecd016a60b |
|
01-Feb-2017 |
Pavel Březina <pbrezina@redhat.com> |
SBUS: use sss_ptr_hash for opath table
This patch reuses sss_ptr_hash module introduced in NSS patches in sbus code.
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com> |
7622d9d97eb6747a9f3406633281f2492f8f4a0a |
|
23-Jan-2017 |
Fabiano Fidêncio <fidencio@redhat.com> |
SBUS: Add destructor data to sbus_connection
This additions has a very specific reason: unregister a service when
it's shutdown.
So far, we never had to do this kind of operation because the services
were started during SSSD's startup when finished when SSSD finished.
Now, with the socket-activation in place the game will be a little bit
different as the services will have an idle timeout and will be able
shut themselves down. In order to do it properly the monitor will need
to "unregister" the service and there's no way to do that without adding
this destructor data to the sbus_connection structure and introducing a
new function to access it from the monitor (where we're going to
set the destructor function to the sbus_connection for the
socket-activated services).
So far it's not being used anywhere as every function taking it as
parameter is just receiving NULL, but it will be used in the follow up
commits, by the monitor.
Related:
https://fedorahosted.org/sssd/ticket/3245
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
b46c4c0d3e364636af1b42683cd3229ffa0b77cb |
|
23-Jan-2017 |
Fabiano Fidêncio <fidencio@redhat.com> |
SBUS: Add a time_t pointer to the sbus_connection
The idea of this commit is to provide a way to update the time of the
last request coming from/going to the responders through sbus.
For now it's not used anywhere as all the functions that will pass their
time_t to the sbus_connection are currently passing NULL. It will be
used by follow-up patches.
Related:
https://fedorahosted.org/sssd/ticket/3245
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
d4aa049726ce8c6feeaf6995d4abb4cb5155b9a1 |
|
19-Jun-2015 |
Pavel Březina <pbrezina@redhat.com> |
sbus: listen to NameOwnerChanged
Resolves:
https://fedorahosted.org/sssd/ticket/2326
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
ae7247551b78a05a5397d3c790afad7ef51b0d9d |
|
19-Jun-2015 |
Pavel Březina <pbrezina@redhat.com> |
sbus: add support for incoming signals
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
f7adbb15dbdcb79e291f7cf361a400ce25f7b382 |
|
18-Jun-2015 |
Pavel Březina <pbrezina@redhat.com> |
SBUS: Add support for <node /> in introspection
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
b742179ac0790068380618ab72a06af18544f09c |
|
23-Jan-2015 |
Pavel Březina <pbrezina@redhat.com> |
sbus: support org.freedesktop.DBus.Properties
Bring back org.freedesktop.DBus.Properties with support of
multiple interfaces on single object path.
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
80d0bd38268c02fd32f62b02ae59f19229ca1a79 |
|
23-Jan-2015 |
Pavel Březina <pbrezina@redhat.com> |
sbus: support org.freedesktop.DBus.Introspectable
This commit brings back support of Introspectable interface and
enables support of multiple interfaces there. It also refactors
the old code so the generator and introspect xml format especially
is more readable.
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
21e05273eed8cc914871938061554589883e67ce |
|
23-Jan-2015 |
Pavel Březina <pbrezina@redhat.com> |
sbus: add sbus_opath_hash_lookup_supported()
This function acquires list of all interfaces that are supported on
given object path. It is a preparation for Introspect interface.
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
46ee931314e6a5517f5c6b6b14f759364be119cc |
|
23-Jan-2015 |
Pavel Březina <pbrezina@redhat.com> |
sbus: support multiple interfaces on single path
This patch removes the old message handler which is replaced
with a new one that supports multiple interfaces registered
on single object path.
A hash table is used to store registered object paths and their
interfaces. When an entry or the table itself is destroyed,
registered object path is unregistered through delete callback.
It temporarily removes support of Introspect and Properties
standard D-Bus interfaces and disables unit tests of those
interfaces. The support is brought back by following patches.
Resolves:
https://fedorahosted.org/sssd/ticket/2339
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
d87e960c17d7598781cf032d06ba03a3ecadbfa2 |
|
23-Jan-2015 |
Pavel Březina <pbrezina@redhat.com> |
sbus: move iface and object path code to separate file
This is done to better distinguish between connection code and interface
stuff. It will help with orientation and thus simplify next changes.
Preparation for:
https://fedorahosted.org/sssd/ticket/2339
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
886d29fced0bcc1668a3cb99a5bca66ea486b3a4 |
|
27-May-2014 |
Jakub Hrozek <jhrozek@redhat.com> |
SBUS: Consolidate VTABLE_FUNC definitions in sssd_dbus_meta.h
We had several duplicated declarations of the VTABLE_FUNC macro in the
SSSD source code. This patch consolidates on one definition in
sssd_dbus_meta.h that is usable by all consumers, including the upcoming
GetAll method implementation.
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
1319e71fd1680ca4864afe0b1aca2b8c8e4a1ee4 |
|
22-May-2014 |
Stef Walter <stefw@redhat.com> |
SBUS: Start implementing property access
This patch adds the basis of SBUS getters and setters. A new module,
sssd_dbus_properties.c would contain handlers for the property methods
like Get, Set and GetAll.
Type-safe property access works in a similar fashion like type-safe
method calls - the invoker calls the getter which returns the primitive
type, which is in turn marshalled into variant by the invoker.
This patch does not contain the complete functionality, see later
patches that continue implementing the getters and setters.
Reviewed-by: Stef Walter <stefw@redhat.com>
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
0161a3c5637a0c0092bf54c436bb3d6508d7df26 |
|
13-May-2014 |
Jakub Hrozek <jhrozek@redhat.com> |
SBUS: Add an async request to retrieve the caller ID
Adds an async request sbus_get_sender_id_{send,recv} that allows
retrieval of UID based on "sender" as returned by
dbus_message_get_sender().
The UID is an int64_t to be able to use "-1" to as a fallback value for
uknown or error cases.
The unit test is added as a standalone one, not part of the sbus_tests
because the request, and by extension the unit test relies on being
connected to the system bus, which is very unlikely to work in a build
system.
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Reviewed-by: Stef Walter <stefw@redhat.com> |
393099fb7caa2c128277e26ba3463aa7f95a0ebb |
|
13-May-2014 |
Jakub Hrozek <jhrozek@redhat.com> |
SBUS: Split out dbus_conn_send
Split dbus_conn_send out of sbus_conn_send to be able to call DBus
messages without having a full sbus connection. This function is
available to the sbus code only, consumers of sbus (responders and
providers) should use sbus_conn_send.
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Reviewed-by: Stef Walter <stefw@redhat.com> |
dff909d473f43a6bd0f0286fa2d279c0ebe945c6 |
|
19-Apr-2014 |
Stef Walter <stefw@redhat.com> |
sbus: Add type-safe DBus method handlers and finish functions
Type safe method handlers allow methods not to have to do tedious
unwrapping and wrapping of DBus method call messages or replies.
Arguments of the following DBus types are supported in type-safe
method handlers. In addition arrays of these are supported.
y: uint8_t
b: bool (but no arrays, yet)
n: int16_t
q: uint16_t
i: int32_t
u: uint32_t
x: int64_t
t: uint64_t
d: double
s: char * (utf8 string)
o: char * (object path)
As an exception, arrays of booleans are not supported, but could be
added later. Other more complex types could be added later if desired.
If a method has other argument types, then it must be marked as having
a raw handler (see below).
Internally each method can have a type specific invoker function which
unpacks the incoming arguments and invokes the method handler with the
correct arguments.
Each method also has a finish which accepts the type-safe out arguments
(ie: return values) and builds the reply message. Like other request
'finish' functions, these free the request talloc context, and are to
be used in place of sbus_request_finish() or friends.
Raw method handlers parse their own method arguments, and prepare their
own reply (ideally using sbus_request_finish() helpers). They can also
do strange things like have variable arguments. To mark a DBus method
as having a raw method handler use the following annotation:
<annotation name="org.freedesktop.sssd.RawHandler" value="true"/>
Raw methods do not have invokers or finish functions.
I've left all of the internal peer to peer communication using raw
method handlers. No code changes here. |
7a9a6ee1b5f5479c3a6958401f9b34c571c3b6bf |
|
19-Apr-2014 |
Jakub Hrozek <jhrozek@redhat.com> |
SBUS: Create an sbus_method_meta instance for Introspection
Also fixes a warning about uninitialized 'method' as the 'method'
variable was unused and not set previously when introspecting. |
42c28b9424b6ef8a0021b124773e171dd5defadd |
|
15-Apr-2014 |
Jakub Hrozek <jhrozek@redhat.com> |
SBUS: Generate introspection from the interface meta structure
https://fedorahosted.org/sssd/ticket/2234
This patch generates the introspection data from the sbus interface meta
structure. The generated XML conforms to
http://dbus.freedesktop.org/doc/dbus-specification.html#introspection-format
The XML description of the interface also always includes the
org.freedesktop.DBus.Introspectable interface, which this patch also allows
in the policy settings. |
07e941c1bbdc752142bbd3b838c540bc7ecd0ed7 |
|
14-Mar-2014 |
Stef Walter <stefw@redhat.com> |
sbus: Refactor how we export DBus interfaces
Most importantly, stop using per connection private data. This doesn't
scale when you have more than one thing exporting or exported on a
connection.
Remove struct sbus_interface and expand sbus_conn_add_interface()
function. Remove various struct sbus_interface args to connection
initialization functions and make callers use sbus_conn_add_interface()
directly. The old method was optimized for exporting one interface
on a connection. We'll have connections that export zero, one or more
interfaces.
To export an interface on a DBus server, call sbus_conn_add_interface()
from within the sbus_server_conn_init_fn. To export an interface on
a DBus client, call sbus_conn_add_interface() after sbus_new_connection()
returns.
As before struct sbus_interface represents an object exported via DBus.
However it is now talloc allocated. One can set instance data on the
struct sbus_interface. This instance data is passed to the various
handlers and used in their implementation.
However, we now have type safe interface exporting in the various
high level sss_process_init() sss_monitor_init() and so on.
Introspection support was not in use, and is now gone until we
implement it using the metadata (future patch).
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
d9577dbd92555b0755881e37724019ef9c578404 |
|
14-Mar-2014 |
Stef Walter <stefw@gnome.org> |
sbus: Add struct sbus_request to represent a DBus invocation
struct sbus_request represents a request from a dbus client
being handled by a dbus server implementation. The struct
contains the message, connection and method (and in the
future teh property) which is being requested.
In the future it will contain caller information as well.
sbus_request is a talloc memory context, and is a good place to
attach any allocations and memory specific to the request.
Each handler accepts an sbus_request. If a handler returns
EOK, it is assumed that the handler will finish the request.
Any of the sbus_request_*finish() methods can be used to
complete the request and send back a reply.
sbus_request_return_and_finish() uses the same argument
varargs syntax as dbus_message_append_args(), which isn't
a great syntax. Document it a bit, but don't try to redesign:
The marshalling work (will follow this patch set) will remove
the need to use varargs for most DBus implementation code.
This patch migrates the monitor and data provider dbus code
to use sbus_request, but does not try to rework the talloc
context's to use it.
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
2c9a76e553f9239eaa91f32ccaf18b7a68316ce5 |
|
13-Oct-2011 |
Jakub Hrozek <jhrozek@redhat.com> |
Append PID to sbus server socket name, let clients use a symlink
https://fedorahosted.org/sssd/ticket/1034 |
1c48b5a62f73234ed26bb20f0ab345ab61cda0ab |
|
18-Feb-2010 |
Stephen Gallagher <sgallagh@redhat.com> |
Rename server/ directory to src/
Also update BUILD.txt |