Name: privilege-info
-Summary: Privilege Management
+Summary: Privilege Information
Version: 0.0.1
Release: 1
Group: System/Libraries
BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(capi-base-common)
BuildRequires: pkgconfig(security-privilege-manager)
+BuildRequires: pkgconfig(cynara-client)
+BuildRequires: pkgconfig(cynara-session)
+BuildRequires: pkgconfig(libsmack)
+BuildRequires: pkgconfig(libtzplatform-config)
%description
-Privilege Information
+Provides Privilege Information(Privilege Info) API
%package -n privilege-info-devel
Summary: Privilege Info API (Development)
The Privilege Info API provides functions to get privilege information (DEV)
%package -n tc-privilege-info
-Summary: tc-privilege-info
+Summary: Privilege Info TC
Requires: %{name} = %{version}-%{release}
%description -n tc-privilege-info
-tc-privilege-info
+Privilege Info API Internal Test
%prep
%setup -q
%build
-%if "%{?tizen_profile_name}" == "wearable"
- __PROFILE_TYPE="WEARABLE"
-%else
- __PROFILE_TYPE="MOBILE"
-%endif
-
export CFLAGS="$CFLAGS -DTIZEN_ENGINEER_MODE"
export CXXFLAGS="$CXXFLAGS -DTIZEN_ENGINEER_MODE"
export FFLAGS="$FFLAGS -DTIZEN_ENGINEER_MODE"
echo cmake . -DPREFIX=%{_prefix} \
- -DEXEC_PREFIX=%{_exec_prefix} \
-DLIBDIR=%{_libdir} \
-DINCLUDEDIR=%{_includedir} \
-DCMAKE_BUILD_TYPE=%{build_type} \
-DVERSION=%{version} \
- -DDPL_LOG="ON" \
- -DDATADIR=%{_datadir} \
- -DPROFILE_TYPE="${__PROFILE_TYPE}"
+ -DTZ_SYS_RO_PACKAGES=%TZ_SYS_RO_PACKAGES \
+ -DTZ_SYS_RO_APP=%TZ_SYS_RO_APP
cmake . -DPREFIX=%{_prefix} \
- -DEXEC_PREFIX=%{_exec_prefix} \
-DLIBDIR=%{_libdir} \
-DINCLUDEDIR=%{_includedir} \
-DCMAKE_BUILD_TYPE=%{build_type} \
-DVERSION=%{version} \
- -DDPL_LOG="ON" \
- -DDATADIR=%{_datadir} \
- -DPROFILE_TYPE="${__PROFILE_TYPE}"
+ -DTZ_SYS_RO_PACKAGES=%TZ_SYS_RO_PACKAGES \
+ -DTZ_SYS_RO_APP=%TZ_SYS_RO_APP
make %{?jobs:-j%jobs}
%make_install
+#%post -n privilege-info -p /sbin/ldconfig
+#%postun -n privilege-info -p /sbin/ldconfig
+
+%post -n tc-privilege-info
+tpk-backend -y org.tizen.test-privilege-info --preload
+cyad -s -k MANIFESTS -c User::App::org.tizen.test-privilege-info -u '*' -p http://tizen.org/privilege/contact.read -t DENY
+
%files -n privilege-info
%{_libdir}/libprivilege-info.so.*
%{_datadir}/license/privilege-info
%{_libdir}/pkgconfig/privilege-info.pc
%files -n tc-privilege-info
+%manifest test/org.tizen.test-privilege-info.manifest
+%{TZ_SYS_RO_APP}/org.tizen.test-privilege-info/bin/tc-privilege-info-app-privacy
+%{TZ_SYS_RO_PACKAGES}/org.tizen.test-privilege-info.xml
%{_bindir}/tc-privilege-info
+
%clean
rm -rf %{buildroot}
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/include)
-SET(requires glib-2.0 dlog security-privilege-manager)
+SET(requires glib-2.0 dlog security-privilege-manager cynara-client cynara-session libsmack)
INCLUDE(FindPkgConfig)
pkg_check_modules(${PACKAGE_NAME} REQUIRED ${requires})
FOREACH(flag ${${PACKAGE_NAME}_CFLAGS})
/**
* @brief Gets the display name of the given privilege.
* @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
- * @remarks @a display_name must be released with free() by you.
+ * @remarks @a display_name must be released using free().
* @param [in] api_version The version of API
* @param [in] privilege The privilege
* @param [out] display_name The display name of the privilege
* @retval #PRVINFO_ERROR_INVALID_PARAMETER Invalid function parameter
* @retval #PRVINFO_ERROR_INTERNAL_ERROR Unknown error
*/
-int privilege_info_get_display_name(const char* api_version, const char* privilege, char **display_name);
+int privilege_info_get_display_name(const char *api_version, const char *privilege, char **display_name);
/**
* @brief Gets the display name of the given privilege.
* @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
- * @remarks @a display_name must be released with free() by you.
+ * @remarks @a display_name must be released using free().
* @remarks package_type must be one of followings: PRVINFO_PACKAGE_TYPE_NATIVE, PRVINFO_PACKAGE_TYPE_WEB
* @param [in] package_type The type of application package
* @param [in] api_version The version of API
* @retval #PRVINFO_ERROR_INVALID_PARAMETER Invalid function parameter
* @retval #PRVINFO_ERROR_INTERNAL_ERROR Unknown error
*/
-int privilege_info_get_display_name_by_pkgtype(const char* package_type, const char* api_version, const char* privilege, char **display_name);
+int privilege_info_get_display_name_by_pkgtype(const char *package_type, const char *api_version, const char *privilege, char **display_name);
/**
* @brief Gets the description of the given privilege.
* @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
- * @remarks @a description must be released with free() by you.
+ * @remarks @a description must be released using free().
* @param [in] api_version The version of API
* @param [in] privilege The privilege
* @param [out] description The description of the privilege
* @retval #PRVINFO_ERROR_INVALID_PARAMETER Invalid function parameter
* @retval #PRVINFO_ERROR_INTERNAL_ERROR Unknown error
*/
-int privilege_info_get_description(const char* api_version, const char *privilege, char **description);
+int privilege_info_get_description(const char *api_version, const char *privilege, char **description);
/**
* @brief Gets the description of the given privilege.
* @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
- * @remarks @a description must be released with free() by you.
+ * @remarks @a description must be released using free().
* @remarks package_type must be one of followings: PRVINFO_PACKAGE_TYPE_NATIVE, PRVINFO_PACKAGE_TYPE_WEB
* @param [in] package_type The type of application package
* @param [in] api_version The version of API
* @retval #PRVINFO_ERROR_INVALID_PARAMETER Invalid function parameter
* @retval #PRVINFO_ERROR_INTERNAL_ERROR Unknown error
*/
-int privilege_info_get_description_by_pkgtype(const char* package_type, const char* api_version, const char *privilege, char **description);
+int privilege_info_get_description_by_pkgtype(const char *package_type, const char *api_version, const char *privilege, char **description);
+
+/**
+ * @brief Gets the display name of the privacy group in which the given privilege is included.
+ * @since_tizen 3.0
+ * @remarks @a privacy_name must be released using free().
+ * @remarks @a privilege must be privacy related, otherwise #PRVINFO_ERROR_INVALID_PARAMETER is returned.
+ * @param [in] privilege The privilege
+ * @param [out] privacy_name The privacy group's display name that the given privilege is included in
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #PRVINFO_ERROR_NONE Successful
+ * @retval #PRVINFO_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #PRVINFO_ERROR_INVALID_PARAMETER Invalid function parameter
+ * @retval #PRVINFO_ERROR_INTERNAL_ERROR Unknown error
+ */
+int privilege_info_get_privacy_display_name(const char *privilege, char **privacy_name);
+
+/**
+ * @brief Gets the status of the given privacy related privilege.
+ * @since_tizen 3.0
+ * @remarks @a privilege must be privacy related, otherwise #PRVINFO_ERROR_INVALID_PARAMETER is returned.
+ * @remarks In case of errors, @a status is set to true.
+ * @param [in] privilege The privilege
+ * @param [out] status true if the privilege is on and false if the privilege is off.
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #PRVINFO_ERROR_NONE Successful
+ * @retval #PRVINFO_ERROR_INVALID_PARAMETER Invalid function parameter
+ * @retval #PRVINFO_ERROR_INTERNAL_ERROR Unknown error
+ */
+int privilege_info_get_privacy_privilege_status(const char *privilege, bool *status);
/**
* @}
*/
#include <libintl.h>
#include <dlog.h>
#include <privilege_db_manager.h>
+#include <cynara-session.h>
+#include <cynara-client.h>
+#include <unistd.h>
+#include <sys/smack.h>
#include "privilege_information.h"
#ifdef LOG_TAG
#undef LOG_TAG
#define LOG_TAG "PRIVILEGE_INFO"
#endif
+#define UIDMAXLEN 10
+
#define TryReturn(condition, expr, returnValue, ...) \
if (!(condition)) { \
expr; \
PRVINFO_ERROR_NO_MATCHING_PRIVILEGE = TIZEN_ERROR_PRIVILEGE_INFORMATION | 0x01
} privilege_info_internal_error_e;
-int privilege_info_get_string_id(const char* package_type_string, int display, const char* api_version, const char *privilege, char **string_id)
+int privilege_info_get_string_id(const char *package_type_string, int display, const char *api_version, const char *privilege, char **string_id)
{
TryReturn(api_version != NULL, , PRVINFO_ERROR_INVALID_PARAMETER, "[PRVINFO_ERROR_INVALID_PARAMETER] api_version is NULL");
TryReturn(privilege != NULL, , PRVINFO_ERROR_INVALID_PARAMETER, "[PRVINFO_ERROR_INVALID_PARAMETER] privilege is NULL");
}
PI_API
-int privilege_info_get_display_name(const char* api_version, const char* privilege, char** display_name)
+int privilege_info_get_display_name(const char *api_version, const char *privilege, char **display_name)
{
int ret = 0;
char* string_id = NULL;
PI_API
-int privilege_info_get_description(const char* api_version, const char* privilege, char** description)
+int privilege_info_get_description(const char *api_version, const char *privilege, char **description)
{
int ret = 0;
char* string_id = NULL;
}
PI_API
-int privilege_info_get_display_name_by_pkgtype(const const char* package_type, const char* api_version, const char* privilege, char** display_name)
+int privilege_info_get_display_name_by_pkgtype(const char *package_type, const char *api_version, const char *privilege, char **display_name)
{
int ret = 0;
char* string_id = NULL;
}
PI_API
-int privilege_info_get_description_by_pkgtype(const char* package_type, const char* api_version, const char* privilege, char** description)
+int privilege_info_get_description_by_pkgtype(const char *package_type, const char *api_version, const char *privilege, char **description)
{
int ret = 0;
char* string_id = NULL;
return PRVINFO_ERROR_NONE;
}
+PI_API
+int privilege_info_get_privacy_display_name(const char *privilege, char **privacy_display_name)
+{
+ TryReturn(privilege != NULL, , PRVINFO_ERROR_INVALID_PARAMETER, "[PRVINFO_ERROR_INVALID_PARAMETER] privilege is NULL");
+ TryReturn(privilege_db_manager_is('p', privilege) == 1, , PRVINFO_ERROR_INVALID_PARAMETER, "[PRVINFO_ERROR_INVALID_PARAMETER] privilege does not exist or is not a privacy related");
+
+ char* privacy_id = NULL;
+ char* privacy_display_string_id = NULL;
+
+ TryReturn(privilege_db_manager_get_privacy_by_privilege(privilege, &privacy_id) == PRIVILEGE_DB_MANAGER_ERR_NONE, , PRVINFO_ERROR_INTERNAL_ERROR, "[PRVINFO_ERROR_INTERNAL_ERROR] privilege_db_manager_get_privacy_by_privilege failed");
+ TryReturn(privacy_id != NULL, , PRVINFO_ERROR_INTERNAL_ERROR, "[PRVINFO_ERROR_INTERNAL_ERROR] privilege_db_manager_get_privacy_by_privilege failed");
+
+ TryReturn(privilege_db_manager_get_privacy_display(privacy_id, &privacy_display_string_id) == PRIVILEGE_DB_MANAGER_ERR_NONE, free(privacy_id), PRVINFO_ERROR_INTERNAL_ERROR, "[PRVINFO_ERROR_INTERNAL_ERROR] privilege_db_manager_get_privacy_display failed");
+ TryReturn(privilege_info_get_string_by_string_id(privacy_display_string_id, privacy_display_name) == PRVINFO_ERROR_NONE, free(privacy_id); free(privacy_display_string_id), PRVINFO_ERROR_OUT_OF_MEMORY, "[PRVINFO_ERROR_OUT_OF_MEMORY] Memory allocation failed.");
+ TryReturn(*privacy_display_name != NULL, free(privacy_id), PRVINFO_ERROR_INTERNAL_ERROR, "[PRVINFO_ERROR_INTERNAL_ERROR] privilege_db_manager_get_privacy_display failed");
+
+ free(privacy_id);
+ return PRVINFO_ERROR_NONE;
+}
+
+PI_API
+int privilege_info_get_privacy_privilege_status(const char *privilege, bool *status)
+{
+ TryReturn(privilege != NULL, *status = true, PRVINFO_ERROR_INVALID_PARAMETER, "[PRVINFO_ERROR_INVALID_PARAMETER] privilege is NULL");
+ TryReturn(privilege_db_manager_is('p', privilege) == 1, *status = true, PRVINFO_ERROR_INVALID_PARAMETER, "[PRVINFO_ERROR_INVALID_PARAMETER] privilege does not exist or is not a privacy related");
+
+ char* smack_label = NULL;
+ TryReturn(smack_new_label_from_self(&smack_label) != -1, *status = true, PRVINFO_ERROR_INTERNAL_ERROR, "[PRVINFO_ERROR_INTERNAL_ERROR] smack_new_label_from_self() failed.");
+
+ cynara *cynara = NULL;
+ TryReturn(cynara_initialize(&cynara, NULL) == CYNARA_API_SUCCESS, *status = true; cynara = NULL, PRVINFO_ERROR_INTERNAL_ERROR, "[PRVINFO_ERROR_INTERNAL_ERROR] cynara_initialize() failed.");
+
+ char *session = NULL;
+ session = cynara_session_from_pid(getpid());
+ TryReturn(session != NULL, *status = true; cynara_finish(cynara), PRVINFO_ERROR_INTERNAL_ERROR, "[PRVINFO_ERROR_INTERNAL_ERROR] cynara_session_from_pid() failed");
+
+ char uid[UIDMAXLEN];
+ int result = snprintf(uid, UIDMAXLEN, "%d", getuid());
+ TryReturn(uid != NULL && result > 0, *status = true; free(session); cynara_finish(cynara), PRVINFO_ERROR_INTERNAL_ERROR, "[PRVINFO_ERROR_INTERNAL_ERROR] snprintf() for uid failed.");
+
+ result = cynara_check(cynara, smack_label, session, uid, privilege);
+ int ret = PRVINFO_ERROR_NONE;
+ free(session);
+ cynara_finish(cynara);
+
+ LOGD("result of cynara_check(cynara %s, session, %s, %s) result = %d", smack_label, uid, privilege, result);
+ if (result == CYNARA_API_ACCESS_DENIED) {
+ *status = false;
+ } else if (result == CYNARA_API_ACCESS_ALLOWED) {
+ *status = true;
+ } else {
+ *status = true;
+ LOGE("[PRVINFO_ERROR_INTERNAL_ERROR] cynara_check() failed. ret = %d", result);
+ ret = PRVINFO_ERROR_INTERNAL_ERROR;
+ }
+
+ return ret;
+}
+
PROJECT(${PACKAGE_NAME})
SET(TC1_NAME tc-privilege-info)
+SET(TC2_NAME tc-privilege-info-app-privacy)
+
SET(TC1_SRCS ${PROJECT_SOURCE_DIR}/tc_privilege_info.c)
+SET(TC2_SRCS ${PROJECT_SOURCE_DIR}/tc_privilege_info_app_privacy.c)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/include)
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
ENDFOREACH(flag)
-
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fPIC -Wall -fvisibility=hidden -D_WITH_SYSTEMD_")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} ${PACKAGE_NAME_CFLAGS}")
-
+
ADD_EXECUTABLE(${TC1_NAME} ${TC1_SRCS})
+ADD_EXECUTABLE(${TC2_NAME} ${TC2_SRCS})
TARGET_LINK_LIBRARIES(${TC1_NAME} "privilege-info")
+TARGET_LINK_LIBRARIES(${TC2_NAME} "privilege-info")
+
+INSTALL(TARGETS ${TC1_NAME} DESTINATION /usr/bin)
+INSTALL(TARGETS ${TC2_NAME} DESTINATION ${TZ_SYS_RO_APP}/org.tizen.test-privilege-info/bin/)
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/test/org.tizen.test-privilege-info.xml DESTINATION ${TZ_SYS_RO_PACKAGES})
-INSTALL(TARGETS ${TC1_NAME} DESTINATION /usr/bin)
\ No newline at end of file
--- /dev/null
+<manifest>
+ <request>
+ <domain name="_" />
+ </request>
+</manifest>
+
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="3.0" package="org.tizen.test-privilege-info" version="1.0.1" install-location="internal-only">
+ <ui-application appid="org.tizen.test-privilege-info" exec="tc-privilege-info-app-privacy" nodisplay="true" multiple="false" type ="capp" taskmanage="false" component-type="svcapp">
+ <label>org.tizen.test-privilege-info</label>
+ </ui-application>
+ <privileges>
+ <privilege>http://tizen.org/privilege/account.read</privilege>
+ <privilege>http://tizen.org/privilege/contact.read</privilege>
+ </privileges>
+</manifest>
+
+
__change_color_to_origin();
}
+static void __check_get_privacy_display_name_result(privilege_info_error_e expected_result, privilege_info_error_e result, const char* privacy_display)
+{
+ printf("expectd result %s, result = %s\n", __get_result_string(expected_result), __get_result_string(result));
+
+ if (expected_result != result) {
+ printf("not matched\n");
+ __change_color_to_red();
+ printf("test fail\n");
+ fail_cnt++;
+ } else {
+ printf("matched\n");
+ if (privacy_display != NULL)
+ printf("privacy_display_name = %s\n", privacy_display);
+ else
+ printf("privacy_display_name is NULL.\n");
+ __change_color_to_green();
+ printf("test success\n");
+ success_cnt++;
+ }
+ __change_color_to_origin();
+}
+
static void __test_privilege_info_get_display_name()
{
int ret;
free(description);
}
+static void __test_privilege_info_get_privacy_display_name()
+{
+ int ret;
+ char* privacy_display_name = NULL;
+
+ printf("-----------------------------------------------------------\n");
+ printf("Invalid parameter\n");
+ printf("no input privilege\n");
+ ret = privilege_info_get_privacy_display_name(NULL, &privacy_display_name);
+ __check_get_privacy_display_name_result(PRVINFO_ERROR_INVALID_PARAMETER, ret, privacy_display_name);
+
+ if (privacy_display_name != NULL) {
+ free(privacy_display_name);
+ privacy_display_name = NULL;
+ }
+
+ printf("-----------------------------------------------------------\n");
+ printf("Not a privacy related privilege\n");
+ printf("privilege: http://tizen.org/privilege/internet\n");
+ ret = privilege_info_get_privacy_display_name("http://tizen.org/privilege/internet", &privacy_display_name);
+ __check_get_privacy_display_name_result(PRVINFO_ERROR_INVALID_PARAMETER, ret, privacy_display_name);
+
+ if (privacy_display_name != NULL) {
+ free(privacy_display_name);
+ privacy_display_name = NULL;
+ }
+
+ printf("-----------------------------------------------------------\n");
+ printf("Not existing privilege\n");
+ printf("privilege: http://tizen.org/privilege/wrong.privilege.name\n");
+ ret = privilege_info_get_privacy_display_name("http://tizen.org/privilege/wrong.privilege.name", &privacy_display_name);
+ __check_get_privacy_display_name_result(PRVINFO_ERROR_INVALID_PARAMETER, ret, privacy_display_name);
+
+ if (privacy_display_name != NULL) {
+ free(privacy_display_name);
+ privacy_display_name = NULL;
+ }
+
+ printf("-----------------------------------------------------------\n");
+ printf("Privacy related privilege\n");
+ printf("privilege: http://tizen.org/privilege/account.read\n");
+ ret = privilege_info_get_privacy_display_name("http://tizen.org/privilege/account.read", &privacy_display_name);
+ __check_get_privacy_display_name_result(PRVINFO_ERROR_NONE, ret, privacy_display_name);
+
+ free(privacy_display_name);
+}
+
int main()
{
__change_color_to_yellow();
__change_color_to_origin();
__test_privilege_info_get_description_by_pkgtype();
+ __change_color_to_yellow();
+ printf("Test function : privilege_info_get_privacy_display_name\n");
+ __change_color_to_origin();
+ __test_privilege_info_get_privacy_display_name();
+
__change_color_to_green();
printf("Test Complete\n");
printf("success : %d, ", success_cnt);
--- /dev/null
+#include <stdio.h>
+#include <dlog.h>
+#include <stdbool.h>
+#include <privilege_information.h>
+
+#ifdef LOG_TAG
+#undef LOG_TAG
+#define LOG_TAG "PRIVILEGE_INFO_TEST_APP"
+#endif
+
+
+static int fail_cnt = 0;
+static int success_cnt = 0;
+
+static const char *__get_result_string(privilege_info_error_e ret)
+{
+ if (ret == PRVINFO_ERROR_NONE)
+ return "PRVINFO_ERROR_NONE";
+ else if (ret == PRVINFO_ERROR_INVALID_PARAMETER)
+ return "PRVINFO_ERROR_INVALID_PARAMETER";
+ else if (ret == PRVINFO_ERROR_INTERNAL_ERROR)
+ return "PRVINFO_ERROR_INTERNAL_ERROR";
+ else if (ret == PRVINFO_ERROR_OUT_OF_MEMORY)
+ return "PRVINFO_ERROR_UNDECLARED_PRIVILEGE";
+ else
+ return "FAIL";
+}
+
+static void __check_result(privilege_info_error_e expected_result, privilege_info_error_e result, bool expected_status, bool status)
+{
+ LOGD("expected result = %s, result = %s", __get_result_string(expected_result), __get_result_string(result));
+ LOGD("expected status = %s, status = %s", expected_status ? "true" : "false", status ? "true" : "false");
+
+ if (expected_result != result) {
+ LOGD("test fail");
+ fail_cnt++;
+ } else {
+ if (expected_status != status) {
+ LOGD("test fail");
+ fail_cnt++;
+ } else {
+ LOGD("test success");
+ success_cnt++;
+ }
+ }
+}
+
+static void __test_privilege_info_get_privacy_privilege_status()
+{
+ int ret = PRVINFO_ERROR_NONE;
+ bool status;
+
+ LOGD("-----------------------------------------------------------");
+ LOGD("privilege : http://tizen.org/privilege/account.read");
+ LOGD("expected result : PRVINFO_ERROR_NONE");
+ ret = privilege_info_get_privacy_privilege_status("http://tizen.org/privilege/account.read", &status);
+ __check_result(PRVINFO_ERROR_NONE, ret, true, status);
+ LOGD("-----------------------------------------------------------");
+
+ LOGD("privilege : http://tizen.org/privilege/contact.read");
+ LOGD("expected result : PRVINFO_ERROR_NONE");
+ ret = privilege_info_get_privacy_privilege_status("http://tizen.org/privilege/contact.read", &status);
+ __check_result(PRVINFO_ERROR_NONE, ret, false, status);
+ LOGD("-----------------------------------------------------------");
+
+ LOGD("privilege : http://tizen.org/privilege/aaaaa");
+ LOGD("expected result : PRVINFO_ERROR_INVALID_PARAMETER");
+ ret = privilege_info_get_privacy_privilege_status("http://tizen.org/privilege/aaaaa", &status);
+ __check_result(PRVINFO_ERROR_INVALID_PARAMETER, ret, true, status);
+ LOGD("-----------------------------------------------------------");
+
+}
+
+int main()
+{
+ LOGD("Test function : privilege_info_get_privacy_privilege_status");
+ __test_privilege_info_get_privacy_privilege_status();
+
+ LOGD("====================================");
+ LOGD("Test Complete");
+ LOGD("success : %d, ", success_cnt);
+ LOGD("fail : %d", fail_cnt);
+ LOGD("====================================");
+
+ return 0;
+}