summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJukka Rissanen <jukka.rissanen@linux.intel.com>2013-03-12 16:41:59 +0200
committerPatrik Flykt <patrik.flykt@linux.intel.com>2013-03-14 11:29:30 -0700
commit9917659fbfba8fcdb98b042ecc1d1ec541f75894 (patch)
tree964f73fe1fe89feffaca4dbd4e2315071caf02b2 /src
parent76e97ed5506da5b88111a9b2a3cdcaa4f6d8c43d (diff)
downloadconnman-9917659fbfba8fcdb98b042ecc1d1ec541f75894.tar.gz
connman-9917659fbfba8fcdb98b042ecc1d1ec541f75894.tar.bz2
connman-9917659fbfba8fcdb98b042ecc1d1ec541f75894.zip
service: User cannot modify immutable service
If the service is provisioned via .config file, then user is only able to set the AutoConnect status of the service. All the other settings must be set from the .config file. Fixes BMC#25984
Diffstat (limited to 'src')
-rw-r--r--src/service.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/service.c b/src/service.c
index 53a839cd..e0bf409b 100644
--- a/src/service.c
+++ b/src/service.c
@@ -3099,6 +3099,9 @@ static DBusMessage *set_property(DBusConnection *conn,
int index;
const char *gw;
+ if (service->immutable == TRUE)
+ return __connman_error_not_supported(msg);
+
if (type != DBUS_TYPE_ARRAY)
return __connman_error_invalid_arguments(msg);
@@ -3162,6 +3165,9 @@ static DBusMessage *set_property(DBusConnection *conn,
GSList *list = NULL;
int count = 0;
+ if (service->immutable == TRUE)
+ return __connman_error_not_supported(msg);
+
if (type != DBUS_TYPE_ARRAY)
return __connman_error_invalid_arguments(msg);
@@ -3203,6 +3209,9 @@ static DBusMessage *set_property(DBusConnection *conn,
DBusMessageIter entry;
GString *str;
+ if (service->immutable == TRUE)
+ return __connman_error_not_supported(msg);
+
if (type != DBUS_TYPE_ARRAY)
return __connman_error_invalid_arguments(msg);
@@ -3239,6 +3248,9 @@ static DBusMessage *set_property(DBusConnection *conn,
} else if (g_str_equal(name, "Proxy.Configuration") == TRUE) {
int err;
+ if (service->immutable == TRUE)
+ return __connman_error_not_supported(msg);
+
if (type != DBUS_TYPE_ARRAY)
return __connman_error_invalid_arguments(msg);
@@ -3261,6 +3273,9 @@ static DBusMessage *set_property(DBusConnection *conn,
CONNMAN_IPCONFIG_TYPE_UNKNOWN;
int err = 0;
+ if (service->immutable == TRUE)
+ return __connman_error_not_supported(msg);
+
DBG("%s", name);
if (service->ipconfig_ipv4 == NULL &&