summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhyunuktak <hyunuk.tak@samsung.com>2016-06-22 10:38:56 (GMT)
committerhyunuktak <hyunuk.tak@samsung.com>2016-06-22 10:39:05 (GMT)
commit267b65463cd3fd93a1ed245b527fca14fe469f07 (patch)
tree153f1a5ecc553869505307462724bbb39b6357db
parente0c6508191296071b1f84adc9a9dbb3ac6d530ad (diff)
downloadconnman-267b65463cd3fd93a1ed245b527fca14fe469f07.zip
connman-267b65463cd3fd93a1ed245b527fca14fe469f07.tar.gz
connman-267b65463cd3fd93a1ed245b527fca14fe469f07.tar.bz2
Change-Id: Id3697d995e4db5d6f03cdf182825d5f61136e235 Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
-rwxr-xr-xpackaging/connman.spec14
-rwxr-xr-xplugins/loopback.c31
-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
8 files changed, 5 insertions, 172 deletions
diff --git a/packaging/connman.spec b/packaging/connman.spec
index fcad6f7..c66307f 100755
--- a/packaging/connman.spec
+++ b/packaging/connman.spec
@@ -100,20 +100,6 @@ CFLAGS+=" -DTIZEN_TV_EXT"
%if %{with connman_vpnd}
VPN_CFLAGS+=" -DTIZEN_EXT -lsmack -Werror"
-
-%if 0%{?sec_product_feature_telephony_disable} == 1
- CFLAGS+=" -DTIZEN_CONNMAN_NTP"
-%endif
-%if 0%{?sec_product_feature_security_fstek_enable} == 1
- CFLAGS+=" -DTIZEN_CONNMAN_USE_BLACKLIST"
-%endif
-%if 0%{?sec_product_feature_profile_wearable}
- CFLAGS+=" -DTIZEN_WEARABLE"
-%endif
-
-%if 0%{?sec_product_feature_wlan_always_powered}
- CFLAGS+=" -DTIZEN_ALWAYS_POWERED"
-%endif
%endif
chmod +x bootstrap
diff --git a/plugins/loopback.c b/plugins/loopback.c
index cfb33a8..44100c6 100755
--- a/plugins/loopback.c
+++ b/plugins/loopback.c
@@ -68,36 +68,6 @@ static int setup_hostname(void)
#if defined TIZEN_EXT
FILE *fp = NULL;
-
-#if defined TIZEN_WEARABLE
-#define BT_MAC "/csa/bluetooth/.bd_addr"
- {
- gchar* dev_id = "GearS2";
- char bt_mac[HOST_NAME_MAX + 1];
- char addr[5] = {0, };
-
- fp = fopen(BT_MAC, "r");
- if(!fp){
- connman_error("Failed to get current hostname");
- strncpy(system_hostname, dev_id, strlen(dev_id));
- goto host_name_end;
- }
-
- // get the last line's address
- while (fgets(bt_mac, HOST_NAME_MAX, fp)) {}
-
- if (strlen(bt_mac) == 6) {
- addr[0] = bt_mac[2];
- addr[1] = bt_mac[3];
- addr[2] = bt_mac[4];
- addr[3] = bt_mac[5];
- g_sprintf(system_hostname, "%s-%s", dev_id, addr);
- } else
- strncpy(system_hostname, dev_id, strlen(dev_id));
-
- fclose(fp);
- }
-#else
#define WIFI_MAC "/opt/etc/.mac.info"
{
char* rv = 0;
@@ -124,7 +94,6 @@ static int setup_hostname(void)
g_free(dev_id);
fclose(fp);
}
-#endif
host_name_end :
#else
diff --git a/src/agent-connman.c b/src/agent-connman.c
index 04f95df..177cbe0 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 26aa7e5..e3296a7 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 1df1670..ae7cbea 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 2d91c2f..513bd58 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 056213f..69fefe7 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 90f648c..1828ccd 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)