From 7f218c554166af6a1782b2aefde8e873cc9e3e99 Mon Sep 17 00:00:00 2001 From: Patrik Flykt Date: Fri, 2 Dec 2011 16:18:22 +0200 Subject: [PATCH] service: Return -EPERM for hidden services and prompt for input --- src/service.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/service.c b/src/service.c index 663b985..214cc8c 100644 --- a/src/service.c +++ b/src/service.c @@ -4520,6 +4520,9 @@ static int service_connect(struct connman_service *service) { int err; + if (service->hidden == TRUE) + return -EPERM; + switch (service->type) { case CONNMAN_SERVICE_TYPE_UNKNOWN: case CONNMAN_SERVICE_TYPE_SYSTEM: @@ -4674,7 +4677,7 @@ int __connman_service_connect(struct connman_service *service) __connman_provider_disconnect(service->provider); if (service->userconnect == TRUE) { - if (err == -ENOKEY) { + if (err == -ENOKEY || err == -EPERM) { if (__connman_agent_request_passphrase_input(service, request_input_cb, NULL) == -EIO) -- 2.7.4