summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2013-01-15agent: Keep track of the driver to unref user context relevantlyTomasz Bursztyka1-2/+3
Fixes BMC#25884
2013-01-08inet: Fix error handling when bridging interfacesForest Bond1-18/+22
Functions that add and remove interfaces to and from bridges now return an appropriate error code.
2013-01-08inet: Fix error handling when adding/removing routesForest Bond1-84/+152
Functions that add and remove routes now return an appropriate error code. EEXIST and ESRCH are ignored when adding and removing routes (respectively) to reduce spurious error messages in the logs.
2013-01-04storage: Remove storage migration codePatrik Flykt3-177/+0
2013-01-04core: Remove WiMAX definitions from codePatrik Flykt11-70/+1
2012-12-20core: Use glib memory functionsDaniel Wagner2-6/+6
Use for all memory allocation/dealocation operation the glib functions. This allows us to use g_mem_profile().
2012-12-17agent: Don't crash when no agent was registered on exitDaniel Wagner1-0/+4
If the user never registered an agent, agent_sender and agent_path are NULL. D-Bus does not handle this gracefully, instead it kills ConnMan. So let's skip the D-Bus part in this case. connmand[4271]: src/agent.c:connman_agent_driver_unregister() Sending release to (null) path (null) iface net.connman.Agent process 4271: arguments to dbus_message_new_method_call() were incorrect, assertion "path != NULL" failed in file dbus-message.c line 1198. This is normally a bug in some application using the D-Bus library. D-Bus not built with -rdynamic so unable to print a backtrace connmand[4271]: Aborting (signal 6) [./src/connmand] connmand[4271]: ++++++++ backtrace ++++++++ connmand[4271]: #0 0x3a9920f500 in /lib64/libpthread.so.0 connmand[4271]: #1 0x3a98e36285 in /lib64/libc.so.6 connmand[4271]: #2 0x3a98e37b9b in /lib64/libc.so.6 connmand[4271]: #3 0x3c7602fff5 in /lib64/libdbus-1.so.3 connmand[4271]: #4 0x3c76026fc1 in /lib64/libdbus-1.so.3 connmand[4271]: #5 0x3c76018aea in /lib64/libdbus-1.so.3 connmand[4271]: #6 0x45b8b1 in connman_agent_driver_unregister() at src/agent.c:426 connmand[4271]: #7 0x457b7c in __connman_service_cleanup() at src/service.c:6756 connmand[4271]: #8 0x43f54f in main() at src/main.c:702 connmand[4271]: #9 0x3a98e2169d in /lib64/libc.so.6 connmand[4271]: +++++++++++++++++++++++++++
2012-12-14main: Small cleanup for config file parsing and checkingMarcel Holtmann1-7/+9
2012-12-14main: Add function to check for main.conf groups and keysPatrik Flykt1-0/+53
Print out a warning on an unknown group and unknown keys in the "General" group.
2012-12-14main: Use defines for main.conf keysPatrik Flykt1-18/+29
2012-12-12technology: Soft block on offline mode or disabled technologyPatrik Flykt1-2/+2
When adding an rfkill device which is unblocked, soft block it immediately if offline mode is enabled or the technology (enable_persistent) is disabled. Fixes BMC#25858
2012-12-10manager: -EINPROGRESS is a valid response for ConnectProviderPatrik Flykt1-7/+1
With VPN connections being handled by connman-vpnd, -EINPROGRESS is a valid value to report to the caller if the VPN is already connecting.
2012-12-05session: Call callback directly when no plugin is assignedDaniel Wagner1-8/+9
When we have no plugin assigned we have to call the final session callback directly. Since __connman_session_create() doesn't know if a plugin was called or not, create_policy_config() or __connman_session_create() needs to free all allocated resources (also in the error path).
2012-12-05session: Add a cleanup function for the user configDaniel Wagner1-13/+23
This helps to make the error path more readable.
2012-12-05session: Move cleanup/destroy function upDaniel Wagner1-48/+48
We need to call those function from create_policy_config() therefore more it in front of it.
2012-12-05session: Return error code from callbackDaniel Wagner1-1/+3
In the case the callback is directly called we can use the return value to provide it to the user.
2012-12-05session: Fix error case handlingDaniel Wagner1-2/+3
There is no need to unref the pending message, because in all cases we generate a reply message which takes care of unrefing the message. Hence the dbus_message_unref() is not needed. Furthermore, we need to pass the created error message to the bus via g_dbus_send_message() so that the client gets always a response.
2012-12-05session: Fix error return codeDaniel Wagner1-1/+1
The error codes propagated over D-Bus are non-negative values.
2012-12-05session: Remove notify watchDaniel Wagner1-0/+3
free_session() will be also called from the error path (e.g. __connman_session_create()). In case we have added a watch we need to disarm it.
2012-11-30agent: Release all agents when stoppingJukka Rissanen1-1/+21
2012-11-27dnsproxy: Fix hash table comparison function to avoid crashPatrik Flykt1-1/+1
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 Wagner1-7/+17
Whenever a configuration gets invalid (e.g. a configuration is removed) then we need to be able to drop back to the default configutation.
2012-11-23session: Export session parsing functionsDaniel Wagner1-16/+38
We want to reuse these functions.
2012-11-23session: Add getter for session ownerDaniel Wagner1-0/+5
2012-11-23session: Add destroy function for pluginsDaniel Wagner1-1/+8
The error handling can get easily get pretty hairy, e.g. reallocating memory for allowed_bearers. If we hit this situation we allow the plugin to shutdown the session. That is consistent with what we do when there is a problem while creating a new session.
2012-11-23session: Add sessions config update functionDaniel Wagner1-0/+40
Give a policy plugin a way to inform the session core that some of the config values have changed. This could be done in a more clever way, e.g. figure out only to update the necessary info entries but we keep it for now as simple and assume everthing has changed.
2012-11-23dbus: Add SELinux supportDaniel Wagner1-0/+135
ConnMan needs to identify application in a secure way when they are using the Session API. The current D-Bus server implemention supports two types of LSM, POSIX and SELinux. In order to support SMACK or TOMOYO the D-Bus code base needs to be patch. This is the initial work to support at least POSIX and SELinux. Maybe in the future we are able to support also the other LSMs. The idea behind gsec is to keep the LSM related code together in one directory. The API introduces in this patch is not any way final. It will need some more time figuring out how are able to intregrate this in a nice way. The current API introduces g_sec_get_selinux_label() which will return the SELinux context. The function will issuing a GetConnectionSELinuxSecurityContext method call. Note, that this function is not documented in the D-Bus specification. See for more details the source code dbus/bus/drivers.c and dbus/bus/selinux.c in the D-Bus reference implementation.
2012-11-23inotify: Watch out for files moved to/from watched dirsDaniel Wagner1-1/+2
When we do not watch watch for IN_MOVED_TO or IN_MOVED_FROM we can easily inconsistent. The user creates a file and moves it then from the watched directory. We wouldn't see this change and therefore keep the configuration. That is a rather anoying behavoir for the policy plugin.
2012-11-23inotify: Move inotify code into its own fileDaniel Wagner4-120/+245
The inotify code will be used by the core (config.c) and the session policy plugin. We introduce a new API for file modifcation notifcation. We move the factored out code part from the last patch into a new file and also change the inotify code so that it allows to monitor not only STORAGEDIR. When registering a new observer, the callee has to tell which directory should be watched. inotify.c will group the observers together.
2012-11-23config: Factor out config inotify handlerDaniel Wagner1-45/+52
The inotify code can be reused. So before we introduce a new generic inotify API, let's factor out in order to simplify the review process.
2012-11-23provider: Set the state properly when removing providerJukka Rissanen1-0/+3
We need to set the provider into idle state when removing, otherwise the default route will not be set properly after provider removal. Fixes BMC#25658
2012-11-23device: Include stdlib.hDaniel Wagner1-0/+1
gcc complains about missing definition for malloc.
2012-11-23ipconfig: Do not check device if interface name is not setJukka Rissanen1-0/+3
If the interface name is not set, then it is no use checking if the interface would be ignored. The interface name is not set if the interface is being taken down and we get NEWLINK message with NULL interface. Fixes BMC#25865
2012-11-23main: Plugin and provider cleanup order fixedJukka Rissanen1-1/+1
We must cleanup the plugin first before cleaning up the provider because the vpn plugin needs providers from provider hash.
2012-11-23provider: Do not remove the provider as it would remove it from storageJukka Rissanen1-15/+1
2012-11-23storage: Add function to remove provider filesJukka Rissanen2-0/+41
2012-11-23provider: Add callback when creating vpn providerJukka Rissanen1-5/+37
Because the vpnd Create() in manager API only creates and does not connect the vpn, we must do the connect part after the vpn is created. This requires a callback which is called when the connection is established. Eventually this patch becomes obsolete because the CreateProvider() connman API is deprecated.
2012-11-23manager: Deprecating connect/remove provider APIJukka Rissanen1-2/+2
The VPN configuration API is provided by connman-vpnd instead of connmand.
2012-11-23agent: Split agent code into generic and service specific partsJukka Rissanen6-690/+850
2012-11-23provider: Refactor server and user route handlingJukka Rissanen2-36/+23
The server and user route handling is refactored in order to reflect the vpn dbus API changes. The routes are now array of dicts in dbus API.
2012-11-23provider: Initially provider ipconfigs are now OFFJukka Rissanen1-2/+3
The ipconfig is marked as fixed when IP address is set to that ipconfig.
2012-11-23provider: Support functions addedJukka Rissanen1-0/+65
2012-11-23provider: Remove functionality that is no longer usedJukka Rissanen1-890/+68
The VPN support functionality is moved into connman-vpnd.
2012-11-23provider: Provider disconnect function made available to pluginJukka Rissanen3-7/+6
The VPN needs to be able to call the provider disconnect.
2012-11-23vpn: New vpn daemon that handles vpn connections and clientsJukka Rissanen1-1/+1
2012-11-23log: Give program name and version in log initJukka Rissanen3-4/+6
This allows the correct output when the log functions are used from separate vpn daemon.
2012-11-23device: Move device creation func into device.cJukka Rissanen3-174/+179
The device creation function should be part of device.c and not inet.c. After this change the inet.c can be used by separate vpn daemon.
2012-11-23ipconfig: Move IP address API into separate ipaddress.c fileJukka Rissanen5-171/+206
Done so that connman_ipaddress_* functions can be used from separate vpn daemon.