From 9917659fbfba8fcdb98b042ecc1d1ec541f75894 Mon Sep 17 00:00:00 2001 From: Jukka Rissanen Date: Tue, 12 Mar 2013 16:41:59 +0200 Subject: 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 --- src/service.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src') 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 && -- cgit v1.2.3