Marcel Holtmann [Sun, 23 Dec 2012 01:38:39 +0000 (17:38 -0800)]
build: Fix Daniel's commits without name
Marcel Holtmann [Sun, 23 Dec 2012 01:35:25 +0000 (17:35 -0800)]
build: Fix Flavio's name mapping to email address
Marcel Holtmann [Sat, 22 Dec 2012 20:14:30 +0000 (12:14 -0800)]
build: Add vpn/net.connman.vpn.service to .gitignore
Marcel Holtmann [Sat, 22 Dec 2012 20:05:59 +0000 (12:05 -0800)]
gdbus: Avoid using g_ptr_array_new_full convenience function
The g_ptr_array_new_full function only got introduced with GLib 2.30
and to avoid requiring a newer GLib use g_ptr_array_set_free_func instead.
Patrik Flykt [Fri, 21 Dec 2012 12:10:33 +0000 (14:10 +0200)]
session-policy-local: Check policy being non-NULL before using
When running unit/test-session the following happens if SELinux is disabled but
--enable-session-policy-local is specified for ./configure:
connmand[6468]: src/session.c:__connman_session_create() owner :1.269
connmand[6468]: src/dbus.c:selinux_get_context_reply() Failed to retrieve SELinux context
connmand[6468]: src/session.c:session_create_cb() session 0x2388dc0 config (nil)
connmand[6468]: Aborting (signal 11) [src/connmand]
connmand[6468]: ++++++++ backtrace ++++++++
connmand[6468]: #0 0x7f5b2b8184f0 in /lib/x86_64-linux-gnu/libc.so.6
connmand[6468]: #1 0x4379b4 in policy_local_destroy() at plugins/session_policy_local.c:245
connmand[6468]: #2 0x46703f in free_session() at src/session.c:258
connmand[6468]: #3 0x468603 in session_create_cb() at src/session.c:1710
connmand[6468]: #4 0x4377e7 in selinux_context_reply() at plugins/session_policy_local.c:201
connmand[6468]: #5 0x461366 in selinux_get_context_reply() at src/dbus.c:475
connmand[6468]: #6 0x7f5b2c66b1ca in /lib/x86_64-linux-gnu/libdbus-1.so.3
connmand[6468]: #7 0x7f5b2c66e293 in /lib/x86_64-linux-gnu/libdbus-1.so.3
connmand[6468]: #8 0x410aa8 in message_dispatch() at gdbus/mainloop.c:76
connmand[6468]: #9 0x7f5b2c8eeeeb in /lib/x86_64-linux-gnu/libglib-2.0.so.0
connmand[6468]: #10 0x7f5b2c8ee355 in /lib/x86_64-linux-gnu/libglib-2.0.so.0
connmand[6468]: #11 0x7f5b2c8ee688 in /lib/x86_64-linux-gnu/libglib-2.0.so.0
connmand[6468]: #12 0x7f5b2c8eea82 in /lib/x86_64-linux-gnu/libglib-2.0.so.0
connmand[6468]: #13 0x410592 in main() at src/main.c:672
connmand[6468]: #14 0x7f5b2b804ead in /lib/x86_64-linux-gnu/libc.so.6
connmand[6468]: +++++++++++++++++++++++++++
Daniel Wagner [Wed, 19 Dec 2012 14:29:17 +0000 (15:29 +0100)]
gweb: Use glib memory functions
Use for all memory allocation/dealocation operation the glib
functions. This allows us to use g_mem_profile().
Daniel Wagner [Wed, 19 Dec 2012 14:29:16 +0000 (15:29 +0100)]
gdhcp: Use glib memory functions
Use for all memory allocation/dealocation operation the glib
functions. This allows us to use g_mem_profile().
Daniel Wagner [Wed, 19 Dec 2012 14:29:15 +0000 (15:29 +0100)]
core: Use glib memory functions
Use for all memory allocation/dealocation operation the glib
functions. This allows us to use g_mem_profile().
Marcel Holtmann [Wed, 19 Dec 2012 02:49:33 +0000 (03:49 +0100)]
build: Compile support for new D-Bus client helpers
Marcel Holtmann [Tue, 18 Dec 2012 04:27:09 +0000 (05:27 +0100)]
gdbus: Increase the method call timeout to 5 minutes
Marcel Holtmann [Tue, 18 Dec 2012 04:09:59 +0000 (05:09 +0100)]
gdbus: Add helper for sending async error replies
Marcel Holtmann [Sun, 16 Dec 2012 00:16:28 +0000 (01:16 +0100)]
gdbus: Fix race condition with creating duplicate client proxies
Marcel Holtmann [Sun, 16 Dec 2012 00:06:33 +0000 (01:06 +0100)]
gdbus: Fix issue with unref of client while parsing interfaces
Marcel Holtmann [Sat, 15 Dec 2012 22:34:51 +0000 (23:34 +0100)]
gdbus: Fix issue with unref of client in connect handler
Marcel Holtmann [Sat, 15 Dec 2012 00:50:58 +0000 (01:50 +0100)]
gdbus: Add support for D-Bus client method calls
Marcel Holtmann [Fri, 14 Dec 2012 18:48:06 +0000 (19:48 +0100)]
gdbus: Add callback support for handling property changes
Marcel Holtmann [Fri, 14 Dec 2012 18:16:59 +0000 (19:16 +0100)]
gdbus: Handle property changed signals and update property
Marcel Holtmann [Fri, 14 Dec 2012 17:48:18 +0000 (18:48 +0100)]
gdbus: Set property changed filter match rule for each proxy
Marcel Holtmann [Fri, 14 Dec 2012 17:23:39 +0000 (18:23 +0100)]
gdbus: Use a GPtrArray for the match rules
Marcel Holtmann [Fri, 14 Dec 2012 14:19:53 +0000 (15:19 +0100)]
gdbus: Add support for setting D-Bus client basic properties
Marcel Holtmann [Fri, 14 Dec 2012 14:07:36 +0000 (15:07 +0100)]
gdbus: Deep copy of variants also requires a signature
Marcel Holtmann [Thu, 13 Dec 2012 16:14:33 +0000 (17:14 +0100)]
gdbus: Add support for complex D-Bus client properties
Marcel Holtmann [Thu, 13 Dec 2012 13:06:25 +0000 (14:06 +0100)]
gdbus: Add support for D-Bus client properties
Marcel Holtmann [Thu, 13 Dec 2012 01:38:53 +0000 (02:38 +0100)]
gdbus: Add support for D-Bus client proxies
Marcel Holtmann [Wed, 12 Dec 2012 20:58:57 +0000 (21:58 +0100)]
gdbus: Add helper functions for simple D-Bus clients
Daniel Wagner [Mon, 17 Dec 2012 11:03:59 +0000 (12:03 +0100)]
agent: Don't crash when no agent was registered on exit
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]: +++++++++++++++++++++++++++
Marcel Holtmann [Fri, 14 Dec 2012 15:09:54 +0000 (16:09 +0100)]
main: Small cleanup for config file parsing and checking
Patrik Flykt [Fri, 14 Dec 2012 14:55:55 +0000 (16:55 +0200)]
main: Add function to check for main.conf groups and keys
Print out a warning on an unknown group and unknown keys in the "General"
group.
Patrik Flykt [Fri, 14 Dec 2012 14:55:54 +0000 (16:55 +0200)]
main: Use defines for main.conf keys
Patrik Flykt [Fri, 14 Dec 2012 11:01:19 +0000 (13:01 +0200)]
vpn-provider: Report disconnect errors other than -EINPROGRESS
Return code -EINPROGRESS is an indication of a disconnect taking place,
not a disconnect error.
Patrik Flykt [Fri, 14 Dec 2012 11:01:18 +0000 (13:01 +0200)]
vpn-provider: Set state when connecting and disconnecting
Update provider state when connect or disconnect is initiated.
Patrik Flykt [Fri, 14 Dec 2012 11:01:17 +0000 (13:01 +0200)]
vpn-plugin: Send proper response to caller and connect if needed
Send a proper response to the caller and attempt to connect if the
provider data exists but is not connected.
Patrik Flykt [Fri, 14 Dec 2012 11:01:16 +0000 (13:01 +0200)]
vpn: Clear pending connect flag on connect attempt
Fixes BMC#25894
Patrik Flykt [Wed, 12 Dec 2012 09:39:00 +0000 (11:39 +0200)]
technology: Soft block on offline mode or disabled technology
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
Marcel Holtmann [Tue, 11 Dec 2012 12:49:30 +0000 (13:49 +0100)]
README: Add extra empty line between sections
Marcel Holtmann [Tue, 11 Dec 2012 11:38:08 +0000 (12:38 +0100)]
unit: Fix differences with including gdbus.h header
Marcel Holtmann [Tue, 11 Dec 2012 11:37:45 +0000 (12:37 +0100)]
client: Fix up header inclusion mess
Marcel Holtmann [Tue, 11 Dec 2012 11:30:50 +0000 (12:30 +0100)]
client: Do not include headers from the core
Marcel Holtmann [Tue, 11 Dec 2012 11:22:52 +0000 (12:22 +0100)]
client: Provide own D-Bus helper functions
Marcel Holtmann [Tue, 11 Dec 2012 11:13:17 +0000 (12:13 +0100)]
client: Remove useless circular inclusion protection
Marcel Holtmann [Tue, 11 Dec 2012 11:11:47 +0000 (12:11 +0100)]
client: Add missing includes of config.h
Marcel Holtmann [Tue, 11 Dec 2012 11:07:08 +0000 (12:07 +0100)]
client: Fix the mangled copyright statement
In addition relax it to GPLv2 or later to make linking against
newer versions of readline library possible.
Marcel Holtmann [Tue, 11 Dec 2012 00:23:46 +0000 (01:23 +0100)]
build: Fix typo in command line client configure option
Patrik Flykt [Mon, 10 Dec 2012 10:42:05 +0000 (12:42 +0200)]
vpn-plugin: Check completion of configure and connect
When creating a configuration, wait until both configuration and
connection has been done. Otherwise NULL user data is passed to the
callback which then cannot relay an error to the caller and the caller will
get a timeout waiting for a reply from D-Bus.
Patrik Flykt [Mon, 10 Dec 2012 10:42:04 +0000 (12:42 +0200)]
vpn-plugin: Propagate most common errors to callback function
Instead of always setting the create callback function error to
-ECONNREFUSED, create a helper function to detect the two most often emitted
errors.
Patrik Flykt [Mon, 10 Dec 2012 10:42:03 +0000 (12:42 +0200)]
manager: -EINPROGRESS is a valid response for ConnectProvider
With VPN connections being handled by connman-vpnd, -EINPROGRESS is a
valid value to report to the caller if the VPN is already connecting.
Daniel Wagner [Thu, 6 Dec 2012 07:37:11 +0000 (08:37 +0100)]
session_policy_local: Create policy directory if necessary
Create the policy directory as first thing. If we don't do this
adding a watch on the non existing directory will fail and the
whole plugin is not loaded.
We need to figure out later how permissive the MODE of the directory
should be. Currently, we play safe and have it tied down.
Daniel Wagner [Wed, 5 Dec 2012 13:57:50 +0000 (14:57 +0100)]
session: Call callback directly when no plugin is assigned
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).
Daniel Wagner [Wed, 5 Dec 2012 13:57:49 +0000 (14:57 +0100)]
session: Add a cleanup function for the user config
This helps to make the error path more readable.
Daniel Wagner [Wed, 5 Dec 2012 13:57:48 +0000 (14:57 +0100)]
session: Move cleanup/destroy function up
We need to call those function from create_policy_config() therefore
more it in front of it.
Daniel Wagner [Wed, 5 Dec 2012 13:57:47 +0000 (14:57 +0100)]
session: Return error code from callback
In the case the callback is directly called we can use the
return value to provide it to the user.
Daniel Wagner [Wed, 5 Dec 2012 13:57:46 +0000 (14:57 +0100)]
session: Fix error case handling
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.
Daniel Wagner [Wed, 5 Dec 2012 13:57:45 +0000 (14:57 +0100)]
session: Fix error return code
The error codes propagated over D-Bus are non-negative values.
Daniel Wagner [Wed, 5 Dec 2012 13:57:44 +0000 (14:57 +0100)]
session: Remove notify watch
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.
Jukka Rissanen [Wed, 5 Dec 2012 11:11:41 +0000 (13:11 +0200)]
test: simple-agent must monitor vpn status
simple-agent needs to monitor vpnd status as vpnd can stop if there
are no vpn configured. When vpnd quits we must not quit the agent
as then wifi questions would not be asked from the user any more.
Patrik Flykt [Wed, 5 Dec 2012 13:33:43 +0000 (15:33 +0200)]
TODO: Add unit test task
Patrik Flykt [Wed, 5 Dec 2012 11:32:04 +0000 (13:32 +0200)]
build: Fix build to enable session-policy-local
Daniel Wagner [Wed, 5 Dec 2012 09:45:00 +0000 (11:45 +0200)]
session_policy: Remove dummy plugin
The default configuration will be created by the core if no
plugin is used. Therefore there is no need for this plugin.
Daniel Wagner [Wed, 5 Dec 2012 09:44:59 +0000 (11:44 +0200)]
session_policy_local: Rename session_policy_ivi
On popular request the plugin is renamed. The plugin is reading
local files and has nothing to do with IVI.
Daniel Wagner [Wed, 5 Dec 2012 09:44:58 +0000 (11:44 +0200)]
session_policy_ivi: Initialize variable and remove an unused one
Remove unused 'err' variable and properly initialize 'ident' for error cases.
Daniel Wagner [Wed, 5 Dec 2012 09:44:57 +0000 (11:44 +0200)]
build: Fix non-builtin session-plugin
The session ivi plugin needs to know where STORAGEDIR points to.
Jukka Rissanen [Mon, 3 Dec 2012 07:45:47 +0000 (09:45 +0200)]
dhcpv6: Memory leak when sending Option Request Option
Jukka Rissanen [Fri, 30 Nov 2012 13:51:12 +0000 (15:51 +0200)]
pptp: Header file was missing
Jukka Rissanen [Fri, 30 Nov 2012 13:51:11 +0000 (15:51 +0200)]
l2tp: Header file was missing
Patrik Flykt [Fri, 30 Nov 2012 12:10:03 +0000 (14:10 +0200)]
TODO: Add tasks for variable types and data structures
Jukka Rissanen [Fri, 30 Nov 2012 09:30:54 +0000 (11:30 +0200)]
pptp: Clear password when disconnecting
Jukka Rissanen [Fri, 30 Nov 2012 09:30:53 +0000 (11:30 +0200)]
l2tp: Clear password when disconnecting
Jukka Rissanen [Fri, 30 Nov 2012 09:30:51 +0000 (11:30 +0200)]
vpn: Driver disconnect needs provider information
The provider pointer needs to be passed to VPN driver when
disconnecting. Otherwise we cannot find the correct provider
that is being disconnected.
Jukka Rissanen [Fri, 30 Nov 2012 09:30:50 +0000 (11:30 +0200)]
vpn-provider: Unregister provider from dbus when freed
The provider object was not unregistered from dbus watch
when the provider was removed which caused free memory access
error.
Jukka Rissanen [Fri, 30 Nov 2012 09:30:49 +0000 (11:30 +0200)]
vpn-provider: Register agent driver
Jukka Rissanen [Fri, 30 Nov 2012 09:30:48 +0000 (11:30 +0200)]
agent: Release all agents when stopping
Jukka Rissanen [Fri, 30 Nov 2012 09:30:47 +0000 (11:30 +0200)]
pptp: Do not save the password
Jukka Rissanen [Fri, 30 Nov 2012 09:30:46 +0000 (11:30 +0200)]
l2tp: Do not save the password
Jukka Rissanen [Fri, 30 Nov 2012 09:30:45 +0000 (11:30 +0200)]
pptp: Ask username and password from agent
Jukka Rissanen [Fri, 30 Nov 2012 09:30:44 +0000 (11:30 +0200)]
l2tp: Ask username and password from agent
Jukka Rissanen [Fri, 30 Nov 2012 09:30:43 +0000 (11:30 +0200)]
vpn-agent: Routine to add username and password into agent dict
Jukka Rissanen [Fri, 30 Nov 2012 09:30:42 +0000 (11:30 +0200)]
openconnect: Add support for --no-cert-check client option
Jukka Rissanen [Fri, 30 Nov 2012 09:30:41 +0000 (11:30 +0200)]
openconnect: Domain pointer was used incorrectly
We must allocate the domain name from the heap and not
point to it directly because the dbus library will deallocate
it and we will have invalid memory access.
Jukka Rissanen [Fri, 30 Nov 2012 09:30:40 +0000 (11:30 +0200)]
test: Add vpn agent support into simple-agent
Jukka Rissanen [Fri, 30 Nov 2012 09:30:39 +0000 (11:30 +0200)]
openconnect: Add asking cookie from agent
It is possible to ask the cookie from agent for OpenConnect
VPN client. The agent should connect to VPN gateway, get the
HTML page, show the page in window or parse the HTML, then
allow user to feed the user id and passphrase and post the result.
The server will then return cookie to agent which should pass
the cookie to openconnect plugin in connman-vpnd daemon.
Jukka Rissanen [Fri, 30 Nov 2012 09:30:38 +0000 (11:30 +0200)]
vpn-agent: Add generic functions to add information into agent dict
Jukka Rissanen [Fri, 30 Nov 2012 09:30:37 +0000 (11:30 +0200)]
vpn: Make VPN plugin connection function async
This is needed as we want to ask user the passwords etc.
Jukka Rissanen [Fri, 30 Nov 2012 09:30:36 +0000 (11:30 +0200)]
vpn-provider: Add getter functions
Jukka Rissanen [Fri, 30 Nov 2012 09:30:35 +0000 (11:30 +0200)]
vpn: Add initial support for async connect
Needed for agent VPN support.
Jukka Rissanen [Fri, 30 Nov 2012 09:30:34 +0000 (11:30 +0200)]
doc: Describe VPN agent API
Luiz Augusto von Dentz [Tue, 27 Nov 2012 12:51:20 +0000 (14:51 +0200)]
gdbus: Add g_dbus_add_properties_watch function
Convenient function to create watches for D-Bus properties.
Lucas De Marchi [Thu, 29 Nov 2012 13:19:32 +0000 (11:19 -0200)]
gdbus: Don't automatically attach ObjectManager
Let each project attach the object manager interface instead of
registering it automatically.
Lucas De Marchi [Thu, 29 Nov 2012 13:19:31 +0000 (11:19 -0200)]
gdbus: Don't register DBus.Properties with no properties
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.
Daniel Wagner [Thu, 29 Nov 2012 08:38:14 +0000 (09:38 +0100)]
build: Disable FORTIFY_SOURCE when optimization is disabled
The last fix was wrong. We need to use U_FORTIFY_SOURCE flag for this.
Patrik Flykt [Tue, 27 Nov 2012 11:48:30 +0000 (13:48 +0200)]
dnsproxy: Fix hash table comparison function to avoid crash
Jukka Rissanen [Mon, 26 Nov 2012 13:58:51 +0000 (15:58 +0200)]
build: Add VPN documentation files into dist tar file
Jukka Rissanen [Mon, 26 Nov 2012 12:47:23 +0000 (14:47 +0200)]
vpn-provider: VPN driver pointer was not cleared
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.
Jukka Rissanen [Mon, 26 Nov 2012 12:47:12 +0000 (14:47 +0200)]
vpn-main: Plugin cleanup was not done
Jukka Rissanen [Mon, 26 Nov 2012 10:16:32 +0000 (12:16 +0200)]
vpn: Cleanup properly if vpn connect fails
Make sure that user callback data is cleared correctly
if vpn connect attempt fails.
Jukka Rissanen [Mon, 26 Nov 2012 13:29:29 +0000 (15:29 +0200)]
vpn: Cleanup vpn connections when vpnd dies
Jukka Rissanen [Mon, 26 Nov 2012 12:56:39 +0000 (14:56 +0200)]
vpn: Do not remove vpn connections hash when vpnd dies
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.
Patrik Flykt [Mon, 26 Nov 2012 13:40:02 +0000 (15:40 +0200)]
build: Fix up distribution dependencies in makefiles
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.
Szymon Janc [Wed, 21 Nov 2012 10:21:03 +0000 (11:21 +0100)]
gdbus: Remove not needed NULL pointer checks
g_strdup returns NULL if argument passed is NULL and there is no need
to double check that.
Syam Sidhardhan [Tue, 23 Oct 2012 13:57:06 +0000 (19:27 +0530)]
gdbus: Replace leading spaces with tabs
Trivial formatting fix.
Syam Sidhardhan [Wed, 14 Nov 2012 13:07:10 +0000 (18:37 +0530)]
gdbus: Fix compilation error due to missing #defines
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