From: sinikang Date: Mon, 9 Sep 2019 06:26:22 +0000 (+0900) Subject: Change privlevel and privilege of non-resettable device IDs X-Git-Tag: submit/tizen/20191016.084917~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F05%2F213605%2F11;p=platform%2Fcore%2Fapi%2Ftelephony.git Change privlevel and privilege of non-resettable device IDs - IMEI, MEID and ICCID are not getting by 3rd party application anymore. - The partner privlevel application can read these information with new privilege as http://tizen.org/privilege/securesysteminfo - For an application with api-version lower than 5.5, having public level singing and having http://tizen.org/privilege/telephony privilege, a pseudo value will be returned instead of permission denied error. Change-Id: Ic6e42d060b20aef8091f1ba42ecfcafdec321e5a Signed-off-by: sinikang --- diff --git a/doc/telephony_doc.h b/doc/telephony_doc.h index 978b040..e51ab72 100644 --- a/doc/telephony_doc.h +++ b/doc/telephony_doc.h @@ -120,7 +120,7 @@ * \#include * * @section CAPI_TELEPHONY_INFORMATION_MODEM_OVERVIEW Overview - * The Telephony Modem Information API allows you to access, but not change the information about IMEI. + * The Telephony Modem Information API allows you to access, but not change the information. * @section CAPI_TELEPHONY_INFORMATION_MODEM_FEATURE Related Features * This API is related with the following feature:\n * - http://tizen.org/feature/network.telephony diff --git a/include/telephony_modem.h b/include/telephony_modem.h index 1ef8d01..c717025 100644 --- a/include/telephony_modem.h +++ b/include/telephony_modem.h @@ -46,15 +46,21 @@ typedef enum { } telephony_modem_power_status_e; /** + * @partner * @brief Gets the IMEI (International Mobile Station Equipment Identity) of a mobile phone. * @details The IMEI number is used by a GSM network to identify valid devices * and therefore can be used for stopping a stolen phone from accessing that network. * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - * @privlevel public - * @privilege %http://tizen.org/privilege/telephony + * @privlevel partner + * @privilege %http://tizen.org/privilege/securesysteminfo * * @remarks You must release @c imei using free() on success case. + * @remarks Since 5.5, this function requires partner level privilege. + * @remarks Before 5.5, this function required the http://tizen.org/privilege/telephony privilege. Since 5.5, it requires the http://tizen.org/privilege/securesysteminfo privilege. + * @remarks To avoid unexpected behavior of old version applications which have the http://tizen.org/privilege/telephony privilege, there is an exception in handling the 'permission denied' error. + * @remarks For an application with api-version 5.5 or higher, if the application doesn't have http://tizen.org/privilege/securesysteminfo privilege, this function returns #TELEPHONY_ERROR_PERMISSION_DENIED. + * @remarks For an application with api-version lower than 5.5, if the application has http://tizen.org/privilege/telephony privilege, this function returns a pseudo value with #TELEPHONY_ERROR_NONE instead of #TELEPHONY_ERROR_PERMISSION_DENIED. The returned value is not reliable data, it can't confirm the device's identification. * * @param[in] handle The handle from telephony_init() * @param[out] imei The International Mobile Station Equipment Identity @@ -93,13 +99,19 @@ int telephony_modem_get_power_status(telephony_h handle, telephony_modem_power_s /** + * @partner * @brief Gets the MEID (Mobile Equipment Identifier) of a mobile phone (for CDMA). * * @since_tizen 3.0 - * @privlevel public - * @privilege %http://tizen.org/privilege/telephony + * @privlevel partner + * @privilege %http://tizen.org/privilege/securesysteminfo * * @remarks You must release @c meid using free() on success case. + * @remarks Since 5.5, this function requires partner level privilege. + * @remarks Before 5.5, this function required the http://tizen.org/privilege/telephony privilege. Since 5.5, it requires the http://tizen.org/privilege/securesysteminfo privilege. + * @remarks To avoid unexpected behavior of old version applications which have the http://tizen.org/privilege/telephony privilege, there is an exception in handling the 'permission denied' error. + * @remarks For an application with api-version 5.5 or higher, if the application doesn't have http://tizen.org/privilege/securesysteminfo privilege, this function returns #TELEPHONY_ERROR_PERMISSION_DENIED. + * @remarks For an application with api-version lower than 5.5, if the application has http://tizen.org/privilege/telephony privilege, this function returns a pseudo value with #TELEPHONY_ERROR_NONE instead of #TELEPHONY_ERROR_PERMISSION_DENIED. The returned value is not reliable data, it can't confirm the device's identification. * * @param[in] handle The handle from telephony_init() * @param[out] meid The Mobile Equipment Identifier diff --git a/include/telephony_sim.h b/include/telephony_sim.h index feb3d8b..1f4111e 100644 --- a/include/telephony_sim.h +++ b/include/telephony_sim.h @@ -69,14 +69,20 @@ typedef enum { /** + * @partner * @brief Gets the Integrated Circuit Card IDentification (ICC-ID). * @details The Integrated Circuit Card Identification number internationally identifies SIM cards. * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - * @privlevel public - * @privilege %http://tizen.org/privilege/telephony + * @privlevel partner + * @privilege %http://tizen.org/privilege/securesysteminfo * * @remarks You must release @c icc_id using free() on success case. + * @remarks Since 5.5, this function requires partner level privilege. + * @remarks Before 5.5, this function required the http://tizen.org/privilege/telephony privilege. Since 5.5, it requires the http://tizen.org/privilege/securesysteminfo privilege. + * @remarks To avoid unexpected behavior of old version applications which have the http://tizen.org/privilege/telephony privilege, there is an exception in handling the 'permission denied' error. + * @remarks For an application with api-version 5.5 or higher, if the application doesn't have http://tizen.org/privilege/securesysteminfo privilege, this function returns #TELEPHONY_ERROR_PERMISSION_DENIED. + * @remarks For an application with api-version lower than 5.5, if the application has http://tizen.org/privilege/telephony privilege, this function returns a pseudo value with #TELEPHONY_ERROR_NONE instead of #TELEPHONY_ERROR_PERMISSION_DENIED. The returned value is not reliable data, it can't confirm the device's identification. * * @param[in] handle The handle from telephony_init() * @param[out] icc_id The Integrated Circuit Card Identification diff --git a/packaging/capi-telephony.spec b/packaging/capi-telephony.spec index 37d44d1..f674ad8 100644 --- a/packaging/capi-telephony.spec +++ b/packaging/capi-telephony.spec @@ -1,6 +1,6 @@ Name: capi-telephony Summary: Telephony Core API -Version: 0.1.80 +Version: 0.1.81 Release: 1 Group: System/Libraries License: Apache-2.0 @@ -11,7 +11,7 @@ BuildRequires: pkgconfig(tapi) BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(capi-base-common) BuildRequires: pkgconfig(openssl1.1) -BuildRequires: pkgconfig(capi-system-info) +BuildRequires: pkgconfig(capi-system-info) Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig