- gsupplicant: fix stucking in scanning state when scan failed.
- Apply ASLR option.
- Add ""TIZEN_WEARABLE"" check in service file.
- change the dhcp client device name.
- default internet service: fix not cleared if pdp activation failed.
- Change Russia cert build feature.
- Update the Connman.service.in file.
- Remove connection retry when association fail.
Change-Id: I3ac8e49d0a3c229b298296f8e7cbf34845c2c90d
Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
@TPKP_GNUTLS_LIBS@ \
-lresolv -ldl -lrt
-src_connmand_LDFLAGS = -Wl,--export-dynamic \
+src_connmand_LDFLAGS = -Wl,--export-dynamic -pie \
-Wl,--version-script=$(srcdir)/src/connman.ver
if VPN
-DSCRIPTDIR=\""$(build_scriptdir)"\" \
-DSTORAGEDIR=\""$(storagedir)\"" \
-DVPN_STORAGEDIR=\""$(vpn_storagedir)\"" \
- -DCONFIGDIR=\""$(configdir)\""
+ -DCONFIGDIR=\""$(configdir)\"" \
+ -fPIE
if VPN
AM_CPPFLAGS = @TPKP_GNUTLS_CFLAGS@ -I$(builddir)/include -I$(srcdir)/gdbus
{
GSupplicantInterface *interface = user_data;
+/*Fixed : stucking in scanning state when scan failed*/
+#if defined TIZEN_EXT
+ GSupplicantInterfaceCallback scan_callback;
+#endif
+
if (iter)
supplicant_dbus_array_foreach(iter, scan_network_update,
interface);
+#if defined TIZEN_EXT
+ scan_callback = interface->scan_callback;
+#endif
+
if (interface->scan_callback)
interface->scan_callback(0, interface, interface->scan_data);
+#if defined TIZEN_EXT
+ if (interface->scan_callback == scan_callback) {
+#endif
interface->scan_callback = NULL;
interface->scan_data = NULL;
+#if defined TIZEN_EXT
+ }
+#endif
}
static GSupplicantInterface *interface_alloc(const char *path)
%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
%endif
chmod +x bootstrap
#include <config.h>
#endif
+#include <stdio.h>
+
#include <errno.h>
#include <unistd.h>
#include <limits.h>
#include <net/if.h>
#include <glib.h>
+#include <glib/gprintf.h>
+
#define CONNMAN_API_SUBJECT_TO_CHANGE
#include <connman/plugin.h>
memset(system_hostname, 0, sizeof(system_hostname));
- if (gethostname(system_hostname, HOST_NAME_MAX) < 0) {
- connman_error("Failed to get current hostname");
- return -EIO;
- }
+#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;
+ gchar* dev_id = "TIZEN";
+ char wifi_mac[HOST_NAME_MAX + 1];
+
+ fp = fopen(WIFI_MAC, "r");
+ if(!fp){
+ connman_error("Failed to get current hostname");
+ strncpy(system_hostname, dev_id, strlen(dev_id));
+ goto host_name_end;
+ }
+
+ rv = fgets(wifi_mac, HOST_NAME_MAX, fp);
+ if(!rv){
+ connman_error("Failed to get current hostname");
+ strncpy(system_hostname, dev_id, strlen(dev_id));
+ fclose(fp);
+ goto host_name_end;
+ }
+
+ dev_id = g_base64_encode((const guchar *)wifi_mac, strlen(wifi_mac));
+ g_sprintf(system_hostname, "TIZEN-%s", dev_id);
+ g_free(dev_id);
+ fclose(fp);
+ }
+#endif
- if (strlen(system_hostname) > 0 &&
- strcmp(system_hostname, "(none)") != 0)
- connman_info("System hostname is %s", system_hostname);
- else
- create_hostname();
+ host_name_end :
+#else
+ if (gethostname(system_hostname, HOST_NAME_MAX) < 0) {
+ connman_error("Failed to get current hostname");
+ return -EIO;
+ }
+#endif
+ if (strlen(system_hostname) > 0 &&
+ strcmp(system_hostname, "(none)") != 0)
+ connman_info("System hostname is %s", system_hostname);
+ else
+ create_hostname();
memset(name, 0, sizeof(name));
/* To avoid unnecessary repeated association in wpa_supplicant,
* "RemoveNetwork" should be made when Wi-Fi is disconnected */
if (wps != true && wifi->network && wifi->disconnecting == false) {
-#if 0 /* temporary disabled */
int err;
wifi->disconnecting = true;
disconnect_callback, wifi->network);
if (err < 0)
wifi->disconnecting = false;
-#endif
if (wifi->connected)
wifi->interface_disconnected_network = wifi->network;
[Unit]
Description=Connection service
-After=net-config.service
-DefaultDependencies=no
+Requires=dbus.socket
+After=dbus.socket
[Service]
Type=dbus
BusName=net.connman
+ExecStartPre=/usr/bin/dbus-send --system --dest=net.netconfig / net.netconfig.auto.activate
Restart=on-failure
-ExecStart=@sbindir@/connmand -n --noplugin vpn
-StandardOutput=null
-CapabilityBoundingSet=~CAP_MAC_ADMIN
+ExecStart=/usr/sbin/connmand -n
[Install]
WantedBy=multi-user.target
set_error(service, error);
+/* default internet service: fix not cleared if pdp activation*/
+#if defined TIZEN_EXT
+ /*
+ * If connection failed for default service(DefaultInternet),
+ * default_connecting_device should be cleared.
+ */
+ if (service->type == CONNMAN_SERVICE_TYPE_CELLULAR &&
+ service->error == CONNMAN_SERVICE_ERROR_CONNECT_FAILED)
+ __connman_service_disconnect_default(service);
+
+#endif
+
__connman_service_ipconfig_indicate_state(service,
CONNMAN_SERVICE_STATE_FAILURE,
CONNMAN_IPCONFIG_TYPE_IPV4);