From: Jukka Rissanen Date: Tue, 12 Mar 2013 14:41:59 +0000 (+0200) Subject: service: User cannot modify immutable service X-Git-Tag: 1.13~90 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9917659fbfba8fcdb98b042ecc1d1ec541f75894;p=platform%2Fupstream%2Fconnman.git 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 --- diff --git a/src/service.c b/src/service.c index 53a839c..e0bf409 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 &&