Remove some features and modify service file 16/76016/1 accepted/tizen/common/20160624.132425 accepted/tizen/ivi/20160624.064339 accepted/tizen/mobile/20160624.064052 accepted/tizen/tv/20160624.064037 accepted/tizen/wearable/20160624.064357 submit/tizen/20160624.012559
authorhyunuktak <hyunuk.tak@samsung.com>
Wed, 22 Jun 2016 10:38:56 +0000 (19:38 +0900)
committerhyunuktak <hyunuk.tak@samsung.com>
Wed, 22 Jun 2016 10:39:05 +0000 (19:39 +0900)
Change-Id: Id3697d995e4db5d6f03cdf182825d5f61136e235
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
packaging/connman.spec
plugins/loopback.c
src/agent-connman.c
src/connman.h
src/connman.service.in
src/main.c
src/service.c
src/timeserver.c

index fcad6f7..c66307f 100755 (executable)
@@ -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
index cfb33a8..44100c6 100755 (executable)
@@ -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
index 04f95df..177cbe0 100755 (executable)
@@ -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;
index 26aa7e5..e3296a7 100755 (executable)
@@ -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,
index 1df1670..ae7cbea 100755 (executable)
@@ -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
index 2d91c2f..513bd58 100755 (executable)
@@ -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();
index 056213f..69fefe7 100755 (executable)
@@ -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));
index 90f648c..1828ccd 100755 (executable)
@@ -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)