summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhyunuktak <hyunuk.tak@samsung.com>2016-06-22 19:38:56 +0900
committerhyunuktak <hyunuk.tak@samsung.com>2016-06-22 19:39:05 +0900
commit267b65463cd3fd93a1ed245b527fca14fe469f07 (patch)
tree153f1a5ecc553869505307462724bbb39b6357db /src
parente0c6508191296071b1f84adc9a9dbb3ac6d530ad (diff)
downloadconnman-267b65463cd3fd93a1ed245b527fca14fe469f07.tar.gz
connman-267b65463cd3fd93a1ed245b527fca14fe469f07.tar.bz2
connman-267b65463cd3fd93a1ed245b527fca14fe469f07.zip
Change-Id: Id3697d995e4db5d6f03cdf182825d5f61136e235 Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
Diffstat (limited to 'src')
-rwxr-xr-xsrc/agent-connman.c67
-rwxr-xr-xsrc/connman.h5
-rwxr-xr-xsrc/connman.service.in9
-rwxr-xr-xsrc/main.c6
-rwxr-xr-xsrc/service.c30
-rwxr-xr-xsrc/timeserver.c15
6 files changed, 5 insertions, 127 deletions
diff --git a/src/agent-connman.c b/src/agent-connman.c
index 04f95df3..177cbe0a 100755
--- a/src/agent-connman.c
+++ b/src/agent-connman.c
@@ -595,73 +595,6 @@ int __connman_agent_request_login_input(struct connman_service *service,
return -EINPROGRESS;
}
-#if defined TIZEN_CONNMAN_USE_BLACKLIST
-dbus_bool_t __connman_agent_request_blacklist_check(
- const char *name, const char *security, const char *eap)
-{
- DBusMessage *message;
- DBusMessage *reply;
- DBusMessageIter iter;
- DBusError error;
- dbus_bool_t allowed = TRUE;
- const char *no_eap = "";
-
- if (agent_path == NULL) {
- DBG("agent is not registered");
- return FALSE;
- }
-
- if (name == NULL || security == NULL)
- return FALSE;
-
- message = dbus_message_new_method_call(agent_sender, agent_path,
- "net.netconfig.wifi",
- "CheckBlackList");
- if (message == NULL) {
- DBG("dbus_message_new_method_call() failed");
- return TRUE;
- }
-
- dbus_message_iter_init_append(message, &iter);
- dbus_message_iter_append_basic(&iter, DBUS_TYPE_STRING, &name);
- dbus_message_iter_append_basic(&iter, DBUS_TYPE_STRING, &security);
-
- if (eap)
- dbus_message_iter_append_basic(&iter, DBUS_TYPE_STRING, &eap);
- else
- dbus_message_iter_append_basic(&iter, DBUS_TYPE_STRING, &no_eap);
-
- dbus_error_init(&error);
-
- reply = dbus_connection_send_with_reply_and_block(connection, message, 2000, &error);
- if (reply == NULL) {
- if (dbus_error_is_set(&error) == TRUE) {
- DBG("dbus_connection_send_with_reply_and_block() failed. "
- "dbus error [%s: %s]", error.name, error.message);
-
- dbus_error_free(&error);
- } else
- DBG("failed to get properties");
-
- dbus_message_unref(message);
-
- return TRUE;
- }
-
- if (dbus_message_get_type(reply) == DBUS_MESSAGE_TYPE_ERROR) {
- DBG("failed to request blacklist check");
- return TRUE;
- }
-
- dbus_message_iter_init(reply, &iter);
- dbus_message_iter_get_basic(&iter, &allowed);
-
- dbus_message_unref(message);
-
- return allowed;
-}
-#endif
-
struct request_browser_reply_data {
struct connman_service *service;
browser_authentication_cb_t callback;
diff --git a/src/connman.h b/src/connman.h
index 26aa7e50..e3296a7a 100755
--- a/src/connman.h
+++ b/src/connman.h
@@ -125,11 +125,6 @@ int __connman_agent_request_peer_authorization(struct connman_peer *peer,
bool wps_requested,
const char *dbus_sender,
void *user_data);
-#if defined TIZEN_CONNMAN_USE_BLACKLIST
-dbus_bool_t __connman_agent_request_blacklist_check(
- const char *name, const char *security, const char *eap);
-#endif
-
#include <connman/log.h>
int __connman_log_init(const char *program, const char *debug,
diff --git a/src/connman.service.in b/src/connman.service.in
index 1df16701..ae7cbea8 100755
--- a/src/connman.service.in
+++ b/src/connman.service.in
@@ -1,14 +1,15 @@
[Unit]
Description=Connection service
-Requires=dbus.socket
-After=dbus.socket
+After=net-config.service
+DefaultDependencies=no
[Service]
Type=dbus
BusName=net.connman
-ExecStartPre=/usr/bin/dbus-send --system --dest=net.netconfig / net.netconfig.auto.activate
Restart=on-failure
-ExecStart=/usr/sbin/connmand -n
+ExecStart=@sbindir@/connmand -n --noplugin vpn
+StandardOutput=null
+CapabilityBoundingSet=~CAP_MAC_ADMIN
[Install]
WantedBy=multi-user.target
diff --git a/src/main.c b/src/main.c
index 2d91c2f6..513bd58b 100755
--- a/src/main.c
+++ b/src/main.c
@@ -741,9 +741,6 @@ int main(int argc, char *argv[])
__connman_proxy_init();
__connman_detect_init();
__connman_session_init();
-#if !defined TIZEN_EXT || defined TIZEN_CONNMAN_NTP
- __connman_timeserver_init();
-#endif
__connman_connection_init();
__connman_plugin_init(option_plugin, option_noplugin);
@@ -775,9 +772,6 @@ int main(int argc, char *argv[])
__connman_plugin_cleanup();
__connman_provider_cleanup();
__connman_connection_cleanup();
-#if !defined TIZEN_EXT || defined TIZEN_CONNMAN_NTP
- __connman_timeserver_cleanup();
-#endif
__connman_detect_cleanup();
__connman_proxy_cleanup();
__connman_task_cleanup();
diff --git a/src/service.c b/src/service.c
index 056213fa..69fefe75 100755
--- a/src/service.c
+++ b/src/service.c
@@ -4222,31 +4222,6 @@ void __connman_service_set_active_session(bool enable, GSList *list)
active_count);
}
-#if defined TIZEN_CONNMAN_USE_BLACKLIST
-static connman_bool_t is_allowed(struct connman_service *service)
-{
- connman_bool_t allowed;
- const char *security = NULL;
-
- if (!service)
- return false;
-
- security = security2string(service->security);
- if (!security)
- return false;
-
- /* check if service is existed in blacklist */
- allowed = __connman_agent_request_blacklist_check(service->name,
- security, service->eap);
- if (allowed == false) {
- DBG("service %p is not allowed", service);
- service->autoconnect = false;
- }
-
- return allowed;
-}
-#endif
-
struct preferred_tech_data {
GList *preferred_list;
enum connman_service_type type;
@@ -4376,11 +4351,6 @@ static bool auto_connect_service(GList *services,
CONNMAN_SERVICE_STATE_IDLE)
continue;
-#if defined TIZEN_CONNMAN_USE_BLACKLIST
- if (is_allowed(service) == false)
- continue;
-#endif
-
if (autoconnecting && !active_sessions[service->type]) {
DBG("service %p type %s has no users", service,
__connman_service_type2string(service->type));
diff --git a/src/timeserver.c b/src/timeserver.c
index 90f648c2..1828ccda 100755
--- a/src/timeserver.c
+++ b/src/timeserver.c
@@ -193,21 +193,13 @@ GSList *__connman_timeserver_add_list(GSList *server_list,
GSList *__connman_timeserver_get_all(struct connman_service *service)
{
GSList *list = NULL;
-#if !defined TIZEN_ALWAYS_POWERED
struct connman_network *network;
-#endif
char **timeservers;
char **service_ts;
char **service_ts_config;
-#if !defined TIZEN_ALWAYS_POWERED
const char *service_gw;
-#endif
char **fallback_ts;
-#if !defined TIZEN_ALWAYS_POWERED
int index, i;
-#else
- int i;
-#endif
if (__connman_clock_timeupdates() == TIME_UPDATES_MANUAL)
return NULL;
@@ -226,7 +218,6 @@ GSList *__connman_timeserver_get_all(struct connman_service *service)
for (i = 0; service_ts && service_ts[i]; i++)
list = __connman_timeserver_add_list(list, service_ts[i]);
-#if !defined TIZEN_ALWAYS_POWERED
network = __connman_service_get_network(service);
if (network) {
index = connman_network_get_index(network);
@@ -237,7 +228,6 @@ GSList *__connman_timeserver_get_all(struct connman_service *service)
if (service_gw)
list = __connman_timeserver_add_list(list, service_gw);
}
-#endif
/* Then add Global Timeservers to the list */
timeservers = load_timeservers();
@@ -314,11 +304,6 @@ static void ts_recheck_enable(void)
*/
int __connman_timeserver_sync(struct connman_service *default_service)
{
-#if defined TIZEN_EXT && !defined TIZEN_CONNMAN_NTP
- /* Tizen updates time (ntp) by system service */
-
- return 0;
-#endif
struct connman_service *service;
if (default_service)