In wearable, the acManagerPolicy is always Permitted. This is temporary commit. 82/96582/2 accepted/tizen/common/20161115.200258 accepted/tizen/mobile/20161111.001952 accepted/tizen/mobile/20161114.004003 accepted/tizen/tv/20161111.002009 accepted/tizen/tv/20161114.004027 accepted/tizen/wearable/20161111.002029 accepted/tizen/wearable/20161114.004058 submit/tizen/20161110.072951 submit/tizen/20161111.015320
authorsegwon <segwon.han@samsung.com>
Wed, 9 Nov 2016 10:46:42 +0000 (19:46 +0900)
committersegwon <segwon.han@samsung.com>
Wed, 9 Nov 2016 11:10:27 +0000 (20:10 +0900)
Signed-off-by: segwon <segwon.han@samsung.com>
Change-Id: I882e135cf9105b15af22730e25de20ef225df3e8

daemon/CMakeLists.txt
daemon/service_provider/RemoteAppControlServiceProvider.cpp

index aedb920..3c35923 100755 (executable)
@@ -16,6 +16,11 @@ FILE(GLOB DAEMON_SRCS ${DAEMON_SRCS} ../msf_tizen_client/src/*.cpp)
 SET(provider_deps "glib-2.0 dlog json-glib-1.0 iotcon capi-appfw-app-manager iotcon vconf capi-network-bluetooth capi-network-wifi-direct capi-appfw-application bundle capi-network-connection cynara-creds-gdbus cynara-client cynara-session capi-appfw-package-manager sqlite3 syspopup-caller")
 SET(provider_deps "${provider_deps} openssl libwebsockets libcurl nsd-dns-sd")
 
+# Wearable profile
+IF("${PROFILE}" STREQUAL "wearable")
+       ADD_DEFINITIONS("-D_WEARABLE_")
+ENDIF("${PROFILE}" STREQUAL "wearable")
+
 # Mobile profile
 IF("${PROFILE}" STREQUAL "mobile")
        ADD_DEFINITIONS("-D_MOBILE_")
index cf5560a..725d240 100755 (executable)
@@ -236,7 +236,9 @@ static int __access_control(iotcon_request_h request, iotcon_attributes_h attrib
 
                ACManagerPolicy acManagerPolicy = ACMANAGER_POLICY_U;
                IF_FAIL_RETURN_TAG(AddACLDevice(macAddress, deviceName, ip.c_str(), &acManagerPolicy) == ACLResult_OK, CONV_ERROR_INVALID_OPERATION, _E, "AddACLDevice failed");
-
+#if defined(_WEARABLE_)
+               acManagerPolicy = ACMANAGER_POLICY_P;
+#endif
                if (acManagerPolicy == ACMANAGER_POLICY_P) {
                        _D("PERMITTED");
                        policy = CONV_ACCESS_CONTROL_PERMITTED;
@@ -315,7 +317,7 @@ static int __app_control_launch(iotcon_request_h request, iotcon_attributes_h at
 
        _D("Device IP : %s, Mac : %s", ip.c_str(), macAddress);
        ACManagerPolicy acManagerPolicy = ACMANAGER_POLICY_U;
-
+#if !defined(_WEARABLE_)
        IF_FAIL_RETURN_TAG(GetACLState(macAddress, &acManagerPolicy) == ACLResult_OK, CONV_ERROR_INVALID_OPERATION, _E, "ACL check failed");
        if (acManagerPolicy == ACMANAGER_POLICY_P) {
                _D("PERMITTED");
@@ -323,7 +325,7 @@ static int __app_control_launch(iotcon_request_h request, iotcon_attributes_h at
                _D("Device is not permitted %d", acManagerPolicy);
                return CONV_ERROR_INVALID_OPERATION;
        }
-
+#endif
        app_control_h app_control;
        int reply = 0;
        char *appctl_char;