Re: [PATCH 28/34] storage: Add function to remove provider files

2012-10-17 Thread Patrik Flykt
Hi, On Thu, 2012-10-04 at 12:56 +0300, Jukka Rissanen wrote: > --- > src/connman.h | 1 + > src/storage.c | 47 +++ > 2 files changed, 48 insertions(+) > > diff --git a/src/connman.h b/src/connman.h > index 8a33ba7..8a1a62c 100644 > --- a/src

Re: [PATCH 27/34] provider: Add callback when creating vpn provider

2012-10-17 Thread Patrik Flykt
Hi, On Thu, 2012-10-04 at 12:56 +0300, Jukka Rissanen wrote: > 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. Event

[PATCH v1 24/24] session: Don't filter match all out

2012-10-17 Thread Daniel Wagner
From: Daniel Wagner If the user provides the match all rule we should add the policy bearer to the result. --- src/session.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/session.c b/src/session.c index 0d06d85..a5102e0 100644 --- a/src/session.c +++ b/

[PATCH v1 23/24] session: Store user AllowedBearers configuration

2012-10-17 Thread Daniel Wagner
From: Daniel Wagner 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

[PATCH v1 22/24] session_policy_ivi: Implement policy_load()

2012-10-17 Thread Daniel Wagner
From: Daniel Wagner --- plugins/session_policy_ivi.c | 94 +++- 1 file changed, 92 insertions(+), 2 deletions(-) diff --git a/plugins/session_policy_ivi.c b/plugins/session_policy_ivi.c index c4e0e42..d52b345 100644 --- a/plugins/session_policy_ivi.c +++

[PATCH v1 21/24] session: Export session parsing functions

2012-10-17 Thread Daniel Wagner
From: Daniel Wagner --- include/session.h | 4 +++ src/session.c | 76 +-- 2 files changed, 56 insertions(+), 24 deletions(-) diff --git a/include/session.h b/include/session.h index afad9fb..9b5a1f0 100644 --- a/include/session.h +++ b/i

[PATCH v1 20/24] session_policy_ivi: Use the policy read from filesystem

2012-10-17 Thread Daniel Wagner
From: Daniel Wagner --- plugins/session_policy_ivi.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/plugins/session_policy_ivi.c b/plugins/session_policy_ivi.c index 70889ec..c4e0e42 100644 --- a/plugins/session_policy_ivi.c +++ b/plugins/session_policy_ivi

[PATCH v1 19/24] session_policy_ivi: Factor out SELinux context parser

2012-10-17 Thread Daniel Wagner
From: Daniel Wagner --- plugins/session_policy_ivi.c | 36 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/plugins/session_policy_ivi.c b/plugins/session_policy_ivi.c index dd3bda0..70889ec 100644 --- a/plugins/session_policy_ivi.c +++ b/plugin

[PATCH v1 18/24] session_policy_ivi: Watch for changes on policy files

2012-10-17 Thread Daniel Wagner
From: Daniel Wagner --- plugins/session_policy_ivi.c | 54 1 file changed, 54 insertions(+) diff --git a/plugins/session_policy_ivi.c b/plugins/session_policy_ivi.c index 1040040..dd3bda0 100644 --- a/plugins/session_policy_ivi.c +++ b/plugins/sessio

[PATCH v1 16/24] session_policy_ivi: Factor out config creation

2012-10-17 Thread Daniel Wagner
From: Daniel Wagner --- plugins/session_policy_ivi.c | 31 ++- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/plugins/session_policy_ivi.c b/plugins/session_policy_ivi.c index 1bebb2a..b2e58ee 100644 --- a/plugins/session_policy_ivi.c +++ b/plugins/ses

[PATCH v1 17/24] session_policy_ivi: Read policy config from file system

2012-10-17 Thread Daniel Wagner
From: Daniel Wagner --- plugins/session_policy_ivi.c | 116 +++ 1 file changed, 116 insertions(+) diff --git a/plugins/session_policy_ivi.c b/plugins/session_policy_ivi.c index b2e58ee..1040040 100644 --- a/plugins/session_policy_ivi.c +++ b/plugins/sessi

[PATCH v1 15/24] session_policy_ivi: Create session config

2012-10-17 Thread Daniel Wagner
From: Daniel Wagner Instead using glib's cleanup hooks for the hash table, we implement it ourself. The reason for doing this is that we will use the policy_data structure via a second hash table. So there is no direct ownership between session_hash and policy_data after we add the second hash ta

[PATCH v1 14/24] session_policy_ivi: Get SELinux context of session owner

2012-10-17 Thread Daniel Wagner
From: Daniel Wagner --- plugins/session_policy_ivi.c | 50 +++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/plugins/session_policy_ivi.c b/plugins/session_policy_ivi.c index 2c30b05..8a7503a 100644 --- a/plugins/session_policy_ivi.c +++ b

[PATCH v1 13/24] session_policy_ivi: Add D-Bus connection

2012-10-17 Thread Daniel Wagner
From: Daniel Wagner --- plugins/session_policy_ivi.c | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/plugins/session_policy_ivi.c b/plugins/session_policy_ivi.c index c11067e..2c30b05 100644 --- a/plugins/session_policy_ivi.c +++ b/plugins/session_policy_iv

[PATCH v1 12/24] session_policy_ivi: Add policy plugin for IVI

2012-10-17 Thread Daniel Wagner
From: Daniel Wagner --- Makefile.plugins | 12 +++ configure.ac | 6 plugins/session_policy_ivi.c | 75 3 files changed, 93 insertions(+) create mode 100644 plugins/session_policy_ivi.c diff --git a/Makefile.plu

[PATCH v1 11/24] session: Add connman_session_get_owner()

2012-10-17 Thread Daniel Wagner
From: Daniel Wagner --- include/session.h | 3 ++- src/session.c | 5 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/include/session.h b/include/session.h index 086c0fc..afad9fb 100644 --- a/include/session.h +++ b/include/session.h @@ -85,9 +85,10 @@ void connman_sessio

[PATCH v1 10/24] gdbus: Add GetConnectionSELinuxSecurityContext

2012-10-17 Thread Daniel Wagner
From: Daniel Wagner --- Makefile.am | 2 +- gdbus/gdbus.h | 9 +++ gdbus/selinux.c | 167 3 files changed, 177 insertions(+), 1 deletion(-) create mode 100644 gdbus/selinux.c diff --git a/Makefile.am b/Makefile.am index b845d6e

[PATCH v1 09/24] storage: Move generic inotify into storage.c

2012-10-17 Thread Daniel Wagner
From: Daniel Wagner --- include/storage.h | 8 +++ src/config.c | 122 +- src/connman.h | 5 ++ src/main.c| 2 + src/storage.c | 155 ++ 5 files changed, 172 insertions(+), 120

[PATCH v1 08/24] config: Factor out config inotify handler

2012-10-17 Thread Daniel Wagner
From: Daniel Wagner --- src/config.c | 97 1 file changed, 52 insertions(+), 45 deletions(-) diff --git a/src/config.c b/src/config.c index 4686914..16fed8d 100644 --- a/src/config.c +++ b/src/config.c @@ -562,6 +562,57 @@ static int

[PATCH v1 07/24] session: Update sessions on config updates

2012-10-17 Thread Daniel Wagner
From: Daniel Wagner Give the 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. It is not expected that there are many updates so let's keep it simple for

[PATCH v1 06/24] session: Register session after policy plugin return config

2012-10-17 Thread Daniel Wagner
Move the configuration part of __connman_session_create() into session_create_cb(). With this change the policy plugin is able to do async work to retrieve a configuration. --- src/session.c | 190 -- 1 file changed, 106 insertions(+), 84 del

[PATCH v1 05/24] session: Factor out user settings in __connman_session_create()

2012-10-17 Thread Daniel Wagner
In order to be able to passing the user configuration provided through the D-Bus Manager.SessionCreate() call to the callback we need to store the configuration into a local data data structure. This can then be passed into the callback we introduce in the following patches. --- src/session.c | 50

[PATCH v1 03/24] session: Factor out memory release part of cleanup_session

2012-10-17 Thread Daniel Wagner
From: Daniel Wagner We want to reuse this code snippet for the error case in __connman_session_create() too. --- src/session.c | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/src/session.c b/src/session.c index 3d497b8..e489742 100644 --- a/src/sessio

[PATCH v1 04/24] session: Add callback to policy create()

2012-10-17 Thread Daniel Wagner
From: Daniel Wagner Instead returning directly a config when create() is called in policy plugin, use a callback function for handing over a valid configuration from the plugin to the session core. This prepars support for asynchronize create call. --- include/session.h| 9 +++-- pl

[PATCH v1 02/24] manager: Allow async CreateSession method call

2012-10-17 Thread Daniel Wagner
From: Daniel Wagner The CreateSession D-Bus call should be marked as async call in order to allow the session core to defer the respond. --- src/manager.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/manager.c b/src/manager.c index 205359a..d4f8c3d 100644 --- a

[PATCH v1 00/24] Policy IVI Plugin

2012-10-17 Thread Daniel Wagner
From: Daniel Wagner Hi, The first patch is something I found during writing this code. So it is kind of unrelated. The patches up to #7 are the base work for the IVI policy plugin. I think we agreed on IRC that this should go in indepenend of the rest. >From patch #8 on the infrastructure code

[PATCH v1 01/24] storage: Add void if function does not have any arguments

2012-10-17 Thread Daniel Wagner
From: Daniel Wagner --- src/connman.h | 6 +++--- src/storage.c | 8 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/connman.h b/src/connman.h index 2f6746e..764422c 100644 --- a/src/connman.h +++ b/src/connman.h @@ -209,10 +209,10 @@ int __connman_resolvfile_remove(c

Re: [PATCH v2 1/5] main.conf: Add SingleConnectedTechnology description

2012-10-17 Thread Jukka Rissanen
Hi Patrik, On 17.10.2012 13:34, patrik.fl...@linux.intel.com wrote: From: Patrik Flykt --- src/main.conf | 12 1 file changed, 12 insertions(+) diff --git a/src/main.conf b/src/main.conf index 8c2f2de..f2ec931 100644 --- a/src/main.conf +++ b/src/main.conf @@ -64,3 +64,15 @@

[PATCH v2 4/5] service: Clear user connected flag on disconnect

2012-10-17 Thread patrik . flykt
From: Patrik Flykt Remember whether the service was connected by the user via D-Bus until the service gets disconnected. --- src/service.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/service.c b/src/service.c index 2ae5eec..fbbb175 100644 --- a/src/service.c ++

[PATCH v2 0/5] Implement SingleConnectedTechnology

2012-10-17 Thread patrik . flykt
From: Patrik Flykt Hi, These patches were extracted and updated from the previous patch set "[PATCH 0/9] PreferredTechnology fixes and SingleConnection". The feature was given a proper name and the documentation is now hopefully more readable. SingleConnectedTechnology documentation has

[PATCH v2 2/5] main: Add SingleConnectedTechnology main.conf variable

2012-10-17 Thread patrik . flykt
From: Patrik Flykt --- src/main.c | 12 1 file changed, 12 insertions(+) diff --git a/src/main.c b/src/main.c index d14cee6..187104b 100644 --- a/src/main.c +++ b/src/main.c @@ -68,6 +68,7 @@ static struct { unsigned int timeout_browserlaunch; char **blacklisted_i

[PATCH v2 5/5] service: Prefer user connected services with SingleConnectedTechnology

2012-10-17 Thread patrik . flykt
From: Patrik Flykt Don't override user connected services with the ones selected by the preferred technology list when SingleConnectedTechnology is enabled. Do this by checking each connected service sorted in the beginning of the service list for the userconnect flag. --- src/service.c | 20 +

[PATCH v2 1/5] main.conf: Add SingleConnectedTechnology description

2012-10-17 Thread patrik . flykt
From: Patrik Flykt --- src/main.conf | 12 1 file changed, 12 insertions(+) diff --git a/src/main.conf b/src/main.conf index 8c2f2de..f2ec931 100644 --- a/src/main.conf +++ b/src/main.conf @@ -64,3 +64,15 @@ # happen for example if we receive DHCP hostname option. # Default val

[PATCH v2 3/5] service: Keep only a single connected technology if configured

2012-10-17 Thread patrik . flykt
From: Patrik Flykt If SingleConnectedTechnology is enabled in main.conf, disconnect any previously connected services when the new service enters ready state. --- src/service.c | 32 1 file changed, 32 insertions(+) diff --git a/src/service.c b/src/service.c i

[PATCH 4/4] service: Fix default service switching and setting gateway

2012-10-17 Thread patrik . flykt
From: Patrik Flykt Calling switch_default_service() didn't change the service order since the services were already sorted that way. Also update the gateway immediately. --- src/service.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/service.c b/src/service.c in

[PATCH 3/4] main.conf: Update preferred technology description

2012-10-17 Thread patrik . flykt
From: Patrik Flykt --- src/main.conf | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/main.conf b/src/main.conf index 67275da..8c2f2de 100644 --- a/src/main.conf +++ b/src/main.conf @@ -44,12 +44,13 @@ # one to the least preferred one separated by commas "

[PATCH 2/4] service: A preferred service in state ready is good enough

2012-10-17 Thread patrik . flykt
From: Patrik Flykt Simplify the preferred service selection such that a connected service is good enough, especially since a connecting service will also terminate the search for the current preferred one. --- src/service.c |6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --gi

[PATCH 1/4] service: Don't trigger autoconnect when neither service is preferred

2012-10-17 Thread patrik . flykt
From: Patrik Flykt Don't trigger a new autoconnect when neither the default nor the new service is preferred. Rely on the fact that normal autoconnect selection mechanism has done the work for us already. --- src/service.c |3 --- 1 file changed, 3 deletions(-) diff --git a/src/service.c b/

[PATCH 0/4] PreferredTechnology fixes

2012-10-17 Thread patrik . flykt
From: Patrik Flykt Hi, The following four patches were split out from "[PATCH 0/9] PreferredTechnology fixes and SingleConnection". This part of the patch set concerns fixing some issues with PreferredTechnologies. The autoconnection request for PreferredTechnologies is removed as being

Re: [PATCH 0/4] Minor client improvements

2012-10-17 Thread Patrik Flykt
On ons, 2012-10-17 at 10:46 +0300, Tomasz Bursztyka wrote: > A quick patch set before seding agent support: > > trivial memory leaks fixes > and added support for Remove() method on service (which changes Favorit to > False) All four patches applied, thanks! Patrik ___

[PATCH 4/4] client: Add Remove() method support for service

2012-10-17 Thread Tomasz Bursztyka
--- client/commands.c | 5 + client/services.c | 31 +++ client/services.h | 2 ++ 3 files changed, 38 insertions(+) diff --git a/client/commands.c b/client/commands.c index 73a92eb..4cc3b2d 100644 --- a/client/commands.c +++ b/client/commands.c @@ -88,6 +88,7 @@

[PATCH 3/4] client: Fix various memory leaks in monitor and services parts

2012-10-17 Thread Tomasz Bursztyka
--- client/monitor.c | 5 + client/services.c | 10 -- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/client/monitor.c b/client/monitor.c index 3c3ca5c..d2f8846 100644 --- a/client/monitor.c +++ b/client/monitor.c @@ -164,6 +164,9 @@ DBusHandlerResult service_propert

[PATCH 2/4] client: Fix some memory leaks in data_manager part

2012-10-17 Thread Tomasz Bursztyka
--- client/data_manager.c | 58 +++ 1 file changed, 40 insertions(+), 18 deletions(-) diff --git a/client/data_manager.c b/client/data_manager.c index 723b979..13994c8 100644 --- a/client/data_manager.c +++ b/client/data_manager.c @@ -90,26 +90,31 @

[PATCH 1/4] client: Fix some memory leaks in commands part

2012-10-17 Thread Tomasz Bursztyka
--- client/commands.c | 159 +++--- 1 file changed, 78 insertions(+), 81 deletions(-) diff --git a/client/commands.c b/client/commands.c index 22d5b3c..73a92eb 100644 --- a/client/commands.c +++ b/client/commands.c @@ -102,35 +102,43 @@ int service_

[PATCH 0/4] Minor client improvements

2012-10-17 Thread Tomasz Bursztyka
A quick patch set before seding agent support: trivial memory leaks fixes and added support for Remove() method on service (which changes Favorit to False) Tomasz Bursztyka (4): client: Fix some memory leaks in commands part client: Fix some memory leaks in data_manager part client: Fix