summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-11-30vpn-agent: Add generic functions to add information into agent dictJukka Rissanen3-1/+145
2012-11-30vpn: Make VPN plugin connection function asyncJukka Rissanen4-9/+28
This is needed as we want to ask user the passwords etc.
2012-11-30vpn-provider: Add getter functionsJukka Rissanen2-0/+19
2012-11-30vpn: Add initial support for async connectJukka Rissanen9-36/+93
Needed for agent VPN support.
2012-11-30doc: Describe VPN agent APIJukka Rissanen1-0/+137
2012-11-30gdbus: Add g_dbus_add_properties_watch functionLuiz Augusto von Dentz2-0/+33
Convenient function to create watches for D-Bus properties.
2012-11-29gdbus: Don't automatically attach ObjectManagerLucas De Marchi2-21/+36
Let each project attach the object manager interface instead of registering it automatically.
2012-11-29gdbus: Don't register DBus.Properties with no propertiesLucas De Marchi1-3/+6
Delay registering DBus.Properties interface until the moment there are properties on that path. This is needed for objects that currently don't expose any property to not export the interface.
2012-11-29build: Disable FORTIFY_SOURCE when optimization is disabledDaniel Wagner1-3/+3
The last fix was wrong. We need to use U_FORTIFY_SOURCE flag for this.
2012-11-27dnsproxy: Fix hash table comparison function to avoid crashPatrik Flykt1-1/+1
2012-11-26build: Add VPN documentation files into dist tar fileJukka Rissanen1-1/+3
2012-11-26vpn-provider: VPN driver pointer was not clearedJukka Rissanen1-0/+15
When VPN driver is unregistered, we must clear the corresponding pointer in provider struct. If this is not done we will have already freed memory access in clean_provider() function.
2012-11-26vpn-main: Plugin cleanup was not doneJukka Rissanen1-0/+1
2012-11-26vpn: Cleanup properly if vpn connect failsJukka Rissanen1-2/+4
Make sure that user callback data is cleared correctly if vpn connect attempt fails.
2012-11-26vpn: Cleanup vpn connections when vpnd diesJukka Rissanen1-0/+2
2012-11-26vpn: Do not remove vpn connections hash when vpnd diesJukka Rissanen1-14/+9
We must keep the vpn connections hash alive as long as connman is running. We must not remove the hash when vpnd dies, otherwise we might feed null pointer to various glib hash functions.
2012-11-26build: Fix up distribution dependencies in makefilesPatrik Flykt2-4/+5
Ensure all files needed at build time are added to the distribution tar file, especially those for VPN. Files in any *_SOURCES variables or ending with *.in are already covered.
2012-11-26gdbus: Remove not needed NULL pointer checksSzymon Janc1-2/+2
g_strdup returns NULL if argument passed is NULL and there is no need to double check that.
2012-11-26gdbus: Replace leading spaces with tabsSyam Sidhardhan1-4/+4
Trivial formatting fix.
2012-11-26gdbus: Fix compilation error due to missing #definesSyam Sidhardhan1-0/+8
Since these are simple #define strings, we are defining it here instead of upgrading to D-Bus 1.5 or later. Log: CC gdbus/object.o gdbus/object.c: In function ‘properties_set’: gdbus/object.c:876:7: error: ‘DBUS_ERROR_UNKNOWN_PROPERTY’ undeclared (first use in this function) gdbus/object.c:876:7: note: each undeclared identifier is reported only once for each function it appears in gdbus/object.c:881:6: error: ‘DBUS_ERROR_PROPERTY_READ_ONLY’ undeclared (first use in this function) make[1]: *** [gdbus/object.o] Error 1 make: *** [all] Error 2
2012-11-26gdbus: Remove connection from pending_property functionsLucas De Marchi2-20/+17
The reply to a DBus.Properties.Set() method call should go through the same D-Bus connection. Thus remove the DBusConnection parameter from the following functions: - g_dbus_pending_property_success() - g_dbus_pending_property_error_valist() - g_dbus_pending_property_error()
2012-11-26gdbus: Fix invalid memory access during interface removalJohan Hedberg1-6/+6
If an interface is removed from the root path during the same mainloop iteration that it was added we need to check for data->added before doing the check for data->parent == NULL in the remove_interface() function. Otherwise the added interface doesn't get removed from the data->added list and will result in accessing freed memory: ==337== Invalid read of size 8 ==337== at 0x4F65AFA: dbus_message_iter_append_basic (in /usr/lib64/libdbus-1.so.3.7.1) ==337== by 0x1247B5: append_interface (object.c:556) ==337== by 0x4C8DC5C: g_slist_foreach (gslist.c:840) ==337== by 0x1261F7: process_changes (object.c:594) ==337== by 0x126372: generic_unregister (object.c:997) ==337== by 0x4F69669: ??? (in /usr/lib64/libdbus-1.so.3.7.1) ==337== by 0x4F5CE51: dbus_connection_unregister_object_path (in /usr/lib64/libdbus-1.so.3.7.1) ==337== by 0x125E81: object_path_unref (object.c:1236) ==337== by 0x126136: g_dbus_unregister_interface (object.c:1361) ==337== by 0x14CDF0: service_exit (service.c:581) ==337== by 0x177556: plugin_cleanup (plugin.c:242) ==337== by 0x12221F: main (main.c:559) ==337== Address 0x5bc1550 is 0 bytes inside a block of size 56 free'd ==337== at 0x4A079AE: free (vg_replace_malloc.c:427) ==337== by 0x4C7850E: g_free (gmem.c:252) ==337== by 0x125DB0: remove_interface (object.c:671) ==337== by 0x125E3B: object_path_unref (object.c:1230) ==337== by 0x126136: g_dbus_unregister_interface (object.c:1361) ==337== by 0x14CDF0: service_exit (service.c:581) ==337== by 0x177556: plugin_cleanup (plugin.c:242) ==337== by 0x12221F: main (main.c:559)
2012-11-26gdbus: Add g_dbus_get_properties functionJohan Hedberg2-0/+21
This function can be used to construct custom D-Bus messages containing the properties for a specific interface on a given path.
2012-11-26gdbus: Add support for invalidated propertiesJohan Hedberg1-1/+14
If there's a pending property but its exists() callback returns false the property should be considered invalidated and included in the relevant list of the PropertiesChanged signal.
2012-11-26gdbus: Fix processing pending properties in remove_interface()Johan Hedberg1-0/+2
2012-11-26gdbus: Fix up Properties.Set() code pathLucas De Marchi1-3/+7
Minor fixes to make setter actually work: - Add propdata in pending_property_set - Break loop when we are removing propdata from list and we found it - in_args and out_args were swapped - interface and method name arguments were swapped
2012-11-26gdbus: Fix invalid memory access while unregisteringLucas De Marchi1-0/+11
If an interface is added and removed on the same mailoop iteration, ObjectManager would try to send InterfacesAdded signal while running the idler because the interface was added to data->added list. This is easily reproduced by forcing an error path in a plugin registration, like on sap_server_register(), resulting in the following error: ==11795== Invalid read of size 4 ==11795== at 0x496F592: dbus_message_iter_append_basic (dbus-message.c:2598) ==11795== by 0x117B39: append_interface (object.c:554) ==11795== by 0x48955E7: g_slist_foreach (gslist.c:840) ==11795== by 0x11923B: process_changes (object.c:592) ==11795== by 0x11956D: generic_unregister (object.c:980) ==11795== by 0x4973BAC: _dbus_object_tree_unregister_and_unlock (dbus-object-tree.c:516) ==11795== by 0x4965240: dbus_connection_unregister_object_path (dbus-connection.c:5776) ==11795== by 0x1178A5: object_path_unref (object.c:1219) ==11795== by 0x118517: g_dbus_unregister_interface (object.c:1344) ==11795== by 0x19AF5B: sap_exit (sap.c:385) ==11795== by 0x13E9E2: sap_server_register (server.c:1428) ==11795== by 0x13C092: sap_server_probe (manager.c:44) With this patch we don't send the InterfacesAdded signal, removing it from data->added while unregistering.
2012-11-26gdbus: Implement PropertiesChanged signalLucas De Marchi2-2/+109
2012-11-26gdbus: Simplify code for appending propertiesLuiz Augusto von Dentz1-32/+2
This reuse append_properties for GetAll and GetManagedObjects
2012-11-26gdbus: Integrates ObjectManager with Properties interfaceLuiz Augusto von Dentz1-1/+27
This appends the properties and its values when using ObjectManager.
2012-11-26gdbus: Only export ObjectManager interface on root pathLuiz Augusto von Dentz1-2/+15
ObjectManager should be exported only in the root path and list all the children paths.
2012-11-26gdbus: Group interface changes to reduce the amount of signals emittedLuiz Augusto von Dentz1-154/+208
InterfacesAdded and InterfacesRemoved can group all the interfaces changes together in one message.
2012-11-26gdbus: Add support for org.freedesktop.DBus.ObjectManager interfaceLuiz Augusto von Dentz1-10/+237
This implements initial support for ObjectManager, it automatically adds objects to its parents so no action is needed by daemons to get their objects managed by this interface. ObjectManager is part of D-Bus spec since revision 0.17: http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager
2012-11-26gdbus: Add properties into Introspectable interfaceLucas De Marchi1-0/+19
2012-11-26gdbus: Implement DBus.Properties.Set methodLucas De Marchi2-1/+157
Contrary to Get() and GetAll(), Set() is asynchronous so we pass an id to the setter so later it can declare the Set() as successful or otherwise.
2012-11-26gdbus: Implement DBus.Properties.GetAll methodLucas De Marchi1-1/+55
2012-11-26gdbus: Implement DBus.Properties.Get methodLucas De Marchi2-1/+69
2012-11-26gdbus: Add skeleton of DBus.Properties interfaceLucas De Marchi1-0/+46
This interface is responsible for handling properties of all objects in a given path. Right now it only registers itself, doing nothing useful. A conversion to this new layout will be done by subsequent patches. org.freedesktop.org.DBus.Properties spec can be found at http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-properties
2012-11-26gdbus: Use macros to add annotationsLucas De Marchi1-12/+28
Besides being more readable this way it avoids going over 80 chars.
2012-11-26gdbus: Move typedefs upLucas De Marchi1-18/+29
Move the typedefs up so they can be used by functions and callbacks.
2012-11-23TODO: systemd no longer log twice to syslogJukka Rissanen1-10/+0
Fixed by 295cc8b57ce12257a9e90ea2e15e0d610e072e0a
2012-11-23session_policy_ivi: Implement policy load functionDaniel Wagner1-1/+105
If config file should also be parsed and the values then stored in the config object.
2012-11-23session_policy_ivi: Watch for changes on policy filesDaniel Wagner1-4/+92
Monitor changes on the config files. Either create, modify or destroy them according the events we get from the inotify interface.
2012-11-23session_policy_ivi: Add hash table to track identsDaniel Wagner1-0/+43
Introduce the second hash table which tracks the config object lifetime based on the file existens. The parsing of the file and creation of the config object is part of the next patch.
2012-11-23session_policy_ivi: Create session configDaniel Wagner1-3/+115
The policy data object is refcounted because the policy data object can be created either through the session core or from the file based policy. In order to avoid complex logic which tries to figure out when to is safe to destroy the object we just fall back to refcountig. polich_hash is the owner of the policy object. When a object is created it is stored there. The key is the identitfier. Since the session core does not know about the identifier we introduce an additional hash table which maps from session pointer to the policy object.
2012-11-23session_policy_ivi: Get SELinux context of session ownerDaniel Wagner1-1/+95
2012-11-23session_policy_ivi: Add policy plugin for IVIDaniel Wagner3-0/+109
Add only the empty 'framework'. In the following patches we add step by step the implementation.
2012-11-23session: Don't filter match all outDaniel Wagner1-0/+5
If the user provides the match all rule we should add the policy bearer to the result.
2012-11-23session: Store user AllowedBearers configurationDaniel Wagner1-5/+9
Don't overwrite the user provided AllowedBearers configuration. Instead just store it at session level. So we always will apply the bearer filter on the user input. Obviously, this might need some more improvements on how we want to handle the AllowedBearers behavior when the policy plugin and the application provide a configuration. For exmaple should we update the AllowedBearers if the policy changes or just always show only the user input. This patch is not perfect but it improves the situation clearly.
2012-11-23session: Factor out set default config helperDaniel Wagner2-7/+18
Whenever a configuration gets invalid (e.g. a configuration is removed) then we need to be able to drop back to the default configutation.