diff options
-rwxr-xr-x | email-api/email-api-account.c | 16 | ||||
-rwxr-xr-x | email-api/email-api-init.c | 16 | ||||
-rwxr-xr-x | email-api/email-api-mail.c | 112 | ||||
-rwxr-xr-x | email-api/email-api-mailbox.c | 48 | ||||
-rwxr-xr-x | email-api/email-api-rule.c | 16 | ||||
-rwxr-xr-x | email-api/email-api-smime.c | 17 | ||||
-rwxr-xr-x | email-common-use/CMakeLists.txt | 4 | ||||
-rwxr-xr-x | email-common-use/email-utilities.c | 32 | ||||
-rwxr-xr-x | email-common-use/include/email-internal-types.h | 1 | ||||
-rwxr-xr-x | email-common-use/include/email-utilities.h | 2 | ||||
-rwxr-xr-x | email-daemon/main.c | 15 | ||||
-rw-r--r-- | email-ipc/email-proxy/email-proxy-socket.c | 28 | ||||
-rwxr-xr-x | packaging/email-service.spec | 1 |
13 files changed, 1 insertions, 307 deletions
diff --git a/email-api/email-api-account.c b/email-api/email-api-account.c index 5bc0ebc..7786f1e 100755 --- a/email-api/email-api-account.c +++ b/email-api/email-api-account.c @@ -317,14 +317,6 @@ EXPORT_API int email_get_account(int account_id, int pulloption, email_account_t EM_IF_NULL_RETURN_VALUE(account_id, EMAIL_ERROR_INVALID_PARAM); EM_IF_NULL_RETURN_VALUE(account, EMAIL_ERROR_INVALID_PARAM); -#ifdef __FEATURE_ACCESS_CONTROL__ - err = em_check_db_privilege_by_pid(getpid()); - if (err == EMAIL_ERROR_PERMISSION_DENIED) { - EM_DEBUG_LOG("permission denied"); - goto FINISH_OFF; - } -#endif - if (pulloption == GET_FULL_DATA) pulloption = EMAIL_ACC_GET_OPT_FULL_DATA; @@ -374,14 +366,6 @@ EXPORT_API int email_get_account_list(email_account_t** account_list, int* count EM_IF_NULL_RETURN_VALUE(account_list, EMAIL_ERROR_INVALID_PARAM); EM_IF_NULL_RETURN_VALUE(count, EMAIL_ERROR_INVALID_PARAM); -#ifdef __FEATURE_ACCESS_CONTROL__ - err = em_check_db_privilege_by_pid(getpid()); - if (err == EMAIL_ERROR_PERMISSION_DENIED) { - EM_DEBUG_LOG("permission denied"); - goto FINISH_OFF; - } -#endif - if (!emstorage_get_account_list(count, &temp_account_tbl , true, false, &err)) { EM_DEBUG_EXCEPTION("emstorage_get_account_list failed [%d]", err); diff --git a/email-api/email-api-init.c b/email-api/email-api-init.c index cfb2aa9..f6a1efd 100755 --- a/email-api/email-api-init.c +++ b/email-api/email-api-init.c @@ -45,14 +45,6 @@ EXPORT_API int email_open_db(void) EM_DEBUG_API_BEGIN (); int error = EMAIL_ERROR_NONE; -#ifdef __FEATURE_ACCESS_CONTROL__ - error = em_check_db_privilege_by_pid(getpid()); - if (error == EMAIL_ERROR_PERMISSION_DENIED) { - EM_DEBUG_EXCEPTION ("permission denied"); - return error; - } -#endif - if (emstorage_db_open(&error) == NULL) EM_DEBUG_EXCEPTION("emstorage_db_open failed [%d]", error); @@ -110,14 +102,6 @@ EXPORT_API int email_init_storage(void) EM_DEBUG_API_BEGIN (); int error = EMAIL_ERROR_NONE; -#ifdef __FEATURE_ACCESS_CONTROL__ - error = em_check_db_privilege_by_pid(getpid()); - if (error == EMAIL_ERROR_PERMISSION_DENIED) { - EM_DEBUG_LOG("permission denied"); - return error; - } -#endif - if (!emstorage_create_table(EMAIL_CREATE_DB_CHECK, &error)) { EM_DEBUG_EXCEPTION("emstorage_create_table failed [%d]", error); } diff --git a/email-api/email-api-mail.c b/email-api/email-api-mail.c index 579f082..80a3a18 100755 --- a/email-api/email-api-mail.c +++ b/email-api/email-api-mail.c @@ -485,14 +485,6 @@ EXPORT_API int email_count_mail(email_list_filter_t *input_filter_list, int inpu EM_IF_NULL_RETURN_VALUE(output_total_mail_count, EMAIL_ERROR_INVALID_PARAM); EM_IF_NULL_RETURN_VALUE(output_unseen_mail_count, EMAIL_ERROR_INVALID_PARAM); -#ifdef __FEATURE_ACCESS_CONTROL__ - err = em_check_db_privilege_by_pid(getpid()); - if (err == EMAIL_ERROR_PERMISSION_DENIED) { - EM_DEBUG_LOG("permission denied"); - goto FINISH_OFF; - } -#endif - if( (err = emstorage_write_conditional_clause_for_getting_mail_list(input_filter_list, input_filter_count, NULL, 0, -1, -1, &conditional_clause_string)) != EMAIL_ERROR_NONE) { EM_DEBUG_EXCEPTION("emstorage_write_conditional_clause_for_getting_mail_list failed[%d]", err); goto FINISH_OFF; @@ -756,14 +748,6 @@ EXPORT_API int email_query_mails(char *conditional_clause_string, email_mail_dat EM_IF_NULL_RETURN_VALUE(result_count, EMAIL_ERROR_INVALID_PARAM); EM_IF_NULL_RETURN_VALUE(conditional_clause_string, EMAIL_ERROR_INVALID_PARAM); -#ifdef __FEATURE_ACCESS_CONTROL__ - err = em_check_db_privilege_by_pid(getpid()); - if (err == EMAIL_ERROR_PERMISSION_DENIED) { - EM_DEBUG_LOG("permission denied"); - goto FINISH_OFF; - } -#endif - if (!emstorage_query_mail_tbl(conditional_clause_string, true, &result_mail_tbl, result_count, &err)) { EM_DEBUG_EXCEPTION("emstorage_query_mail_list failed [%d]", err); @@ -792,14 +776,6 @@ EXPORT_API int email_query_mail_list(char *input_conditional_clause_string, emai EM_IF_NULL_RETURN_VALUE(input_conditional_clause_string, EMAIL_ERROR_INVALID_PARAM); EM_IF_NULL_RETURN_VALUE(output_result_count, EMAIL_ERROR_INVALID_PARAM); -#ifdef __FEATURE_ACCESS_CONTROL__ - err = em_check_db_privilege_by_pid(getpid()); - if (err == EMAIL_ERROR_PERMISSION_DENIED) { - EM_DEBUG_LOG("permission denied"); - goto FINISH_OFF; - } -#endif - if (!emstorage_query_mail_list(input_conditional_clause_string, true, output_mail_list, output_result_count, &err)) { EM_DEBUG_EXCEPTION("emstorage_query_mail_list failed [%d]", err); goto FINISH_OFF; @@ -888,14 +864,6 @@ EXPORT_API int email_get_attachment_data_list(int input_mail_id, email_attachmen EM_DEBUG_API_BEGIN ("input_mail_id[%d] output_attachment_data[%p] output_attachment_count[%p]", input_mail_id, output_attachment_data, output_attachment_count); int err = EMAIL_ERROR_NONE; -#ifdef __FEATURE_ACCESS_CONTROL__ - err = em_check_db_privilege_by_pid(getpid()); - if (err == EMAIL_ERROR_PERMISSION_DENIED) { - EM_DEBUG_LOG("permission denied"); - return err; - } -#endif - if((err = emcore_get_attachment_data_list(input_mail_id, output_attachment_data, output_attachment_count)) != EMAIL_ERROR_NONE) { EM_DEBUG_EXCEPTION("emcore_get_attachment_data_list failed [%d]", err); } @@ -926,14 +894,6 @@ EXPORT_API int email_get_mail_list_ex(email_list_filter_t *input_filter_list, in EM_IF_NULL_RETURN_VALUE(output_mail_list, EMAIL_ERROR_INVALID_PARAM); EM_IF_NULL_RETURN_VALUE(output_result_count, EMAIL_ERROR_INVALID_PARAM); -#ifdef __FEATURE_ACCESS_CONTROL__ - err = em_check_db_privilege_by_pid(getpid()); - if (err == EMAIL_ERROR_PERMISSION_DENIED) { - EM_DEBUG_LOG("permission denied"); - goto FINISH_OFF; - } -#endif - if( (err = emstorage_write_conditional_clause_for_getting_mail_list(input_filter_list, input_filter_count, input_sorting_rule_list, input_sorting_rule_count, input_start_index, input_limit_count, &conditional_clause_string)) != EMAIL_ERROR_NONE) { EM_DEBUG_EXCEPTION("emstorage_write_conditional_clause_for_getting_mail_list failed[%d]", err); goto FINISH_OFF; @@ -981,14 +941,6 @@ EXPORT_API int email_get_mails(int account_id , int mailbox_id, int thread_id, i goto FINISH_OFF; } -#ifdef __FEATURE_ACCESS_CONTROL__ - err = em_check_db_privilege_by_pid(getpid()); - if (err == EMAIL_ERROR_PERMISSION_DENIED) { - EM_DEBUG_LOG("permission denied"); - goto FINISH_OFF; - } -#endif - if (!emstorage_get_mails(account_id, mailbox_id, NULL, thread_id, start_index, limit_count, sorting, true, &mail_tbl_list, result_count, &err)) { EM_DEBUG_EXCEPTION("emstorage_get_mails failed [%d]", err); @@ -1021,14 +973,6 @@ EXPORT_API int email_get_mail_list(int account_id , int mailbox_id, int thread_i return EMAIL_ERROR_INVALID_PARAM; } -#ifdef __FEATURE_ACCESS_CONTROL__ - err = em_check_db_privilege_by_pid(getpid()); - if (err == EMAIL_ERROR_PERMISSION_DENIED) { - EM_DEBUG_LOG("permission denied"); - goto FINISH_OFF; - } -#endif - if (!emstorage_get_mail_list(account_id, mailbox_id, NULL, thread_id, start_index, limit_count, 0, NULL, sorting, true, mail_list, result_count, &err)) { EM_DEBUG_EXCEPTION("emstorage_get_mail_list failed [%d]", err); @@ -1057,14 +1001,6 @@ EXPORT_API int email_get_mail_by_address(int account_id , int mailbox_id, email_ return err; } -#ifdef __FEATURE_ACCESS_CONTROL__ - err = em_check_db_privilege_by_pid(getpid()); - if (err == EMAIL_ERROR_PERMISSION_DENIED) { - EM_DEBUG_LOG("permission denied"); - goto FINISH_OFF; - } -#endif - if (!emstorage_get_mail_list(account_id, mailbox_id, addr_list, EMAIL_LIST_TYPE_NORMAL, start_index, limit_count, search_type, search_value, sorting, true, &mail_list_item, result_count, &err)) { EM_DEBUG_EXCEPTION("emstorage_get_mail_list failed [%d]", err); @@ -1086,14 +1022,6 @@ EXPORT_API int email_get_thread_information_by_thread_id(int thread_id, email_ma EM_IF_NULL_RETURN_VALUE(thread_info, EMAIL_ERROR_INVALID_PARAM); -#ifdef __FEATURE_ACCESS_CONTROL__ - err = em_check_db_privilege_by_pid(getpid()); - if (err == EMAIL_ERROR_PERMISSION_DENIED) { - EM_DEBUG_LOG("permission denied"); - goto FINISH_OFF; - } -#endif - if (!emstorage_get_thread_information(thread_id, &mail_table_data , true, &err)) { EM_DEBUG_EXCEPTION("emstorage_get_thread_information failed [%d]", err); goto FINISH_OFF; @@ -1122,14 +1050,6 @@ EXPORT_API int email_get_thread_information_ex(int thread_id, email_mail_list_it EM_IF_NULL_RETURN_VALUE(thread_info, EMAIL_ERROR_INVALID_PARAM); -#ifdef __FEATURE_ACCESS_CONTROL__ - err = em_check_db_privilege_by_pid(getpid()); - if (err == EMAIL_ERROR_PERMISSION_DENIED) { - EM_DEBUG_LOG("permission denied"); - goto FINISH_OFF; - } -#endif - if (!emstorage_get_thread_information(thread_id, &mail_table_data , true, &err)) { EM_DEBUG_EXCEPTION("emstorage_get_thread_information -- failed [%d]", err); goto FINISH_OFF; @@ -1181,14 +1101,6 @@ EXPORT_API int email_get_mail_data(int input_mail_id, email_mail_data_t **output EM_DEBUG_API_BEGIN ("input_mail_id[%d]", input_mail_id); int err = EMAIL_ERROR_NONE; -#ifdef __FEATURE_ACCESS_CONTROL__ - err = em_check_db_privilege_by_pid(getpid()); - if (err == EMAIL_ERROR_PERMISSION_DENIED) { - EM_DEBUG_LOG("permission denied"); - return err; - } -#endif - if ( ((err = emcore_get_mail_data(input_mail_id, output_mail_data)) != EMAIL_ERROR_NONE) || !output_mail_data) EM_DEBUG_EXCEPTION("emcore_get_mail_data failed [%d]", err); @@ -1644,14 +1556,6 @@ EXPORT_API int email_get_address_info_list(int mail_id, email_address_info_list_ return err; } -#ifdef __FEATURE_ACCESS_CONTROL__ - err = em_check_db_privilege_by_pid(getpid()); - if (err == EMAIL_ERROR_PERMISSION_DENIED) { - EM_DEBUG_LOG("permission denied"); - goto FINISH_OFF; - } -#endif - if ( !emcore_get_mail_address_info_list(mail_id, &temp_address_info_list, &err) ) { EM_DEBUG_EXCEPTION("emcore_get_mail_address_info_list failed [%d]", err); @@ -1698,14 +1602,6 @@ EXPORT_API int email_query_meeting_request(char *input_conditional_clause_string EM_IF_NULL_RETURN_VALUE(input_conditional_clause_string, EMAIL_ERROR_INVALID_PARAM); EM_IF_NULL_RETURN_VALUE(output_count, EMAIL_ERROR_INVALID_PARAM); -#ifdef __FEATURE_ACCESS_CONTROL__ - err = em_check_db_privilege_by_pid(getpid()); - if (err == EMAIL_ERROR_PERMISSION_DENIED) { - EM_DEBUG_LOG("permission denied"); - return err; - } -#endif - if ((err = emstorage_query_meeting_request(input_conditional_clause_string, output_meeting_req, output_count, true)) != EMAIL_ERROR_NONE) { EM_DEBUG_EXCEPTION("emstorage_query_meeting_request failed [%d]", err); } @@ -1729,14 +1625,6 @@ EXPORT_API int email_get_meeting_request(int mail_id, email_meeting_request_t ** return err; } -#ifdef __FEATURE_ACCESS_CONTROL__ - err = em_check_db_privilege_by_pid(getpid()); - if (err == EMAIL_ERROR_PERMISSION_DENIED) { - EM_DEBUG_LOG("permission denied"); - goto FINISH_OFF; - } -#endif - if ( !emstorage_get_meeting_request(mail_id, &temp_meeting_req, 1, &err) ) { EM_DEBUG_EXCEPTION("emstorage_get_meeting_request failed[%d]", err); diff --git a/email-api/email-api-mailbox.c b/email-api/email-api-mailbox.c index ccd01cf..09474b4 100755 --- a/email-api/email-api-mailbox.c +++ b/email-api/email-api-mailbox.c @@ -611,14 +611,6 @@ EXPORT_API int email_get_mailbox_list(int account_id, int mailbox_sync_type, ema EM_IF_ACCOUNT_ID_NULL(account_id, EMAIL_ERROR_INVALID_PARAM); EM_IF_NULL_RETURN_VALUE(count, EMAIL_ERROR_INVALID_PARAM); -#ifdef __FEATURE_ACCESS_CONTROL__ - err = em_check_db_privilege_by_pid(getpid()); - if (err == EMAIL_ERROR_PERMISSION_DENIED) { - EM_DEBUG_LOG("permission denied"); - goto FINISH_OFF; - } -#endif - if (!emstorage_get_mailbox_list(account_id, mailbox_sync_type, EMAIL_MAILBOX_SORT_BY_NAME_ASC, &mailbox_count, &mailbox_tbl_list, true, &err)) { EM_DEBUG_EXCEPTION("emstorage_get_mailbox failed [%d]", err); @@ -663,14 +655,6 @@ EXPORT_API int email_get_mailbox_list_ex(int account_id, int mailbox_sync_type, EM_IF_ACCOUNT_ID_NULL(account_id, EMAIL_ERROR_INVALID_PARAM); EM_IF_NULL_RETURN_VALUE(count, EMAIL_ERROR_INVALID_PARAM); -#ifdef __FEATURE_ACCESS_CONTROL__ - err = em_check_db_privilege_by_pid(getpid()); - if (err == EMAIL_ERROR_PERMISSION_DENIED) { - EM_DEBUG_LOG("permission denied"); - goto FINISH_OFF; - } -#endif - if (!emstorage_get_mailbox_list_ex(account_id, mailbox_sync_type, with_count, &mailbox_count, &mailbox_tbl_list, true, &err)) { EM_DEBUG_EXCEPTION("emstorage_get_mailbox_list_ex failed [%d]", err); @@ -714,14 +698,6 @@ EXPORT_API int email_get_mailbox_list_by_keyword(int account_id, char *keyword, EM_IF_NULL_RETURN_VALUE(mailbox_list, EMAIL_ERROR_INVALID_PARAM); EM_IF_NULL_RETURN_VALUE(count, EMAIL_ERROR_INVALID_PARAM); -#ifdef __FEATURE_ACCESS_CONTROL__ - err = em_check_db_privilege_by_pid(getpid()); - if (err == EMAIL_ERROR_PERMISSION_DENIED) { - EM_DEBUG_LOG("permission denied"); - goto FINISH_OFF; - } -#endif - if (!emstorage_get_mailbox_by_keyword(account_id, keyword, &mailbox_tbl_list, &mailbox_count, true, &err)) { EM_DEBUG_EXCEPTION("emstorage_get_mailbox_by_keyword failed [%d]", err); goto FINISH_OFF; @@ -765,14 +741,6 @@ EXPORT_API int email_get_mailbox_by_mailbox_type(int account_id, email_mailbox_t if(mailbox_type < EMAIL_MAILBOX_TYPE_INBOX || mailbox_type > EMAIL_MAILBOX_TYPE_USER_DEFINED) return EMAIL_ERROR_INVALID_PARAM; -#ifdef __FEATURE_ACCESS_CONTROL__ - err = em_check_db_privilege_by_pid(getpid()); - if (err == EMAIL_ERROR_PERMISSION_DENIED) { - EM_DEBUG_LOG("permission denied"); - goto FINISH_OFF; - } -#endif - if (!emstorage_get_mailbox_by_mailbox_type(account_id, mailbox_type, &local_mailbox, true, &err)) { EM_DEBUG_EXCEPTION("emstorage_get_mailbox_by_mailbox_type failed [%d]", err); @@ -803,14 +771,6 @@ EXPORT_API int email_get_mailbox_by_mailbox_id(int input_mailbox_id, email_mailb EM_IF_NULL_RETURN_VALUE(output_mailbox, EMAIL_ERROR_INVALID_PARAM); -#ifdef __FEATURE_ACCESS_CONTROL__ - err = em_check_db_privilege_by_pid(getpid()); - if (err == EMAIL_ERROR_PERMISSION_DENIED) { - EM_DEBUG_LOG("permission denied"); - return err; - } -#endif - if ( (err = emstorage_get_mailbox_by_id(input_mailbox_id, &local_mailbox)) != EMAIL_ERROR_NONE) { EM_DEBUG_EXCEPTION("emstorage_get_mailbox_by_id failed [%d]", err); return err; @@ -889,14 +849,6 @@ EXPORT_API int email_stamp_sync_time_of_mailbox(int input_mailbox_id) EM_IF_NULL_RETURN_VALUE(input_mailbox_id, EMAIL_ERROR_INVALID_PARAM); -#ifdef __FEATURE_ACCESS_CONTROL__ - err = em_check_db_privilege_by_pid(getpid()); - if (err == EMAIL_ERROR_PERMISSION_DENIED) { - EM_DEBUG_LOG("permission denied"); - return err; - } -#endif - err = emstorage_stamp_last_sync_time_of_mailbox(input_mailbox_id, 1); EM_DEBUG_API_END ("err[%d]", err); diff --git a/email-api/email-api-rule.c b/email-api/email-api-rule.c index 34a61f7..26f949d 100755 --- a/email-api/email-api-rule.c +++ b/email-api/email-api-rule.c @@ -46,14 +46,6 @@ EXPORT_API int email_get_rule(int filter_id, email_rule_t** filtering_set) EM_IF_NULL_RETURN_VALUE(filtering_set, EMAIL_ERROR_INVALID_PARAM); EM_IF_NULL_RETURN_VALUE(filter_id, EMAIL_ERROR_INVALID_PARAM); -#ifdef __FEATURE_ACCESS_CONTROL__ - err = em_check_db_privilege_by_pid(getpid()); - if (err == EMAIL_ERROR_PERMISSION_DENIED) { - EM_DEBUG_LOG("permission denied"); - goto FINISH_OFF; - } -#endif - if (!emstorage_get_rule_by_id(filter_id, (emstorage_rule_tbl_t**)filtering_set, true, &err)) { EM_DEBUG_EXCEPTION("emstorage_get_rule_by_id failed [%d]", err); @@ -77,14 +69,6 @@ EXPORT_API int email_get_rule_list(email_rule_t** filtering_set, int* count) EM_IF_NULL_RETURN_VALUE(filtering_set, EMAIL_ERROR_INVALID_PARAM); EM_IF_NULL_RETURN_VALUE(count, EMAIL_ERROR_INVALID_PARAM); -#ifdef __FEATURE_ACCESS_CONTROL__ - err = em_check_db_privilege_by_pid(getpid()); - if (err == EMAIL_ERROR_PERMISSION_DENIED) { - EM_DEBUG_LOG("permission denied"); - goto FINISH_OFF; - } -#endif - *count = 1000; if (!emstorage_get_rule(0, 0, 0, count, &is_completed, (emstorage_rule_tbl_t**)filtering_set, true, &err)) { diff --git a/email-api/email-api-smime.c b/email-api/email-api-smime.c index 96708dc..11090c4 100755 --- a/email-api/email-api-smime.c +++ b/email-api/email-api-smime.c @@ -154,16 +154,7 @@ EXPORT_API int email_get_certificate(char *email_address, email_certificate_t ** EM_IF_NULL_RETURN_VALUE(email_address, EMAIL_ERROR_INVALID_PARAM); EM_IF_NULL_RETURN_VALUE(certificate, EMAIL_ERROR_INVALID_PARAM); -#ifdef __FEATURE_ACCESS_CONTROL__ - err = em_check_db_privilege_by_pid(getpid()); - if (err == EMAIL_ERROR_PERMISSION_DENIED) { - EM_DEBUG_LOG("permission denied"); - return err; - } -#endif - SNPRINTF(temp_email_address, sizeof(temp_email_address), "<%s>", email_address); - if (!emstorage_get_certificate_by_email_address(temp_email_address, &cert, false, 0, &err)) { EM_DEBUG_EXCEPTION("emstorage_get_certificate_by_index failed - %d", err); return err; @@ -198,14 +189,6 @@ EXPORT_API int email_get_decrypt_message(int mail_id, email_mail_data_t **output goto FINISH_OFF; } -#ifdef __FEATURE_ACCESS_CONTROL__ - err = em_check_db_privilege_by_pid(getpid()); - if (err == EMAIL_ERROR_PERMISSION_DENIED) { - EM_DEBUG_LOG("permission denied"); - goto FINISH_OFF; - } -#endif - if ((err = emcore_get_mail_data(mail_id, &p_output_mail_data)) != EMAIL_ERROR_NONE) { EM_DEBUG_EXCEPTION("emcore_get_mail_data failed"); goto FINISH_OFF; diff --git a/email-common-use/CMakeLists.txt b/email-common-use/CMakeLists.txt index 0f9ebe5..aa262ee 100755 --- a/email-common-use/CMakeLists.txt +++ b/email-common-use/CMakeLists.txt @@ -28,9 +28,7 @@ INCLUDE_DIRECTORIES( ) INCLUDE(FindPkgConfig) -pkg_check_modules(common_pkgs REQUIRED glib-2.0 dlog dbus-1 vconf uw-imap-toolkit security-server libtzplatform-config) - -#pkg_check_modules(common_pkgs REQUIRED glib-2.0 dlog dbus-1 vconf contacts-service2 uw-imap-toolkit security-server libtzplatform-config) +pkg_check_modules(common_pkgs REQUIRED glib-2.0 dlog dbus-1 vconf uw-imap-toolkit libtzplatform-config) FOREACH(flag ${common_pkgs_CFLAGS}) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") diff --git a/email-common-use/email-utilities.c b/email-common-use/email-utilities.c index b5f36f5..8484849 100755 --- a/email-common-use/email-utilities.c +++ b/email-common-use/email-utilities.c @@ -36,7 +36,6 @@ #include <malloc.h> #include <pthread.h> #include <regex.h> -#include <security-server.h> #include "c-client.h" @@ -933,37 +932,6 @@ FINISH_OFF: return ret; } -INTERNAL_FUNC int em_check_socket_privilege_by_pid(int pid) -{ - EM_DEBUG_FUNC_BEGIN("pid [%d]", pid); - int smack_ret = 0; - - smack_ret = security_server_check_privilege_by_pid(pid, "email-service::write", "rw"); - if (smack_ret == SECURITY_SERVER_API_ERROR_ACCESS_DENIED) { - EM_DEBUG_EXCEPTION("SECURITY_SERVER_API_ERROR_ACCESS_DENIED"); - return EMAIL_ERROR_PERMISSION_DENIED; - } - - EM_DEBUG_FUNC_END(); - return EMAIL_ERROR_NONE; -} - -INTERNAL_FUNC int em_check_db_privilege_by_pid(int pid) -{ - EM_DEBUG_FUNC_BEGIN("pid [%d]", pid); - int smack_ret = 0; - - smack_ret = security_server_check_privilege_by_pid(pid, "email-service::db", "rw"); - if (smack_ret == SECURITY_SERVER_API_ERROR_ACCESS_DENIED) { - EM_DEBUG_EXCEPTION("SECURITY_SERVER_API_ERROR_ACCESS_DENIED"); - return EMAIL_ERROR_PERMISSION_DENIED; - } - - EM_DEBUG_FUNC_END(); - return EMAIL_ERROR_NONE; -} - - /* thread with task queue generic functions */ pthread_mutex_t g_mu = PTHREAD_MUTEX_INITIALIZER; diff --git a/email-common-use/include/email-internal-types.h b/email-common-use/include/email-internal-types.h index fe280f1..1ac6990 100755 --- a/email-common-use/include/email-internal-types.h +++ b/email-common-use/include/email-internal-types.h @@ -81,7 +81,6 @@ extern "C" /* #define __FEATURE_BLOCKING_MODE__ */ #define __FEATURE_BODY_SEARCH__ /* #define __FEATURE_USE_APPSYNC__ */ -/* #define __FEATURE_ACCESS_CONTROL__ */ /* #define __FEATURE_IMAP_QUOTA__ */ diff --git a/email-common-use/include/email-utilities.h b/email-common-use/include/email-utilities.h index 9a9ebf5..efbfddf 100755 --- a/email-common-use/include/email-utilities.h +++ b/email-common-use/include/email-utilities.h @@ -68,8 +68,6 @@ extern char* strcasestr(__const char *__haystack, __const char *__needle) INTERNAL_FUNC int em_get_account_server_type_by_account_id(int account_id, email_account_server_t* account_server_type, int flag, int *error); INTERNAL_FUNC int em_get_handle_for_activesync(int *handle, int *error); -INTERNAL_FUNC int em_check_socket_privilege_by_pid(int pid); -INTERNAL_FUNC int em_check_db_privilege_by_pid(int pid); /* thread handle definition */ typedef struct { diff --git a/email-daemon/main.c b/email-daemon/main.c index 5a01c29..1900f03 100755 --- a/email-daemon/main.c +++ b/email-daemon/main.c @@ -3223,21 +3223,6 @@ void stb_API_mapper(HIPC_API a_hAPI) int err = EMAIL_ERROR_NONE; int nAPIID = emipc_get_api_id(a_hAPI); -#ifdef __FEATURE_ACCESS_CONTROL__ - int nAPPID = emipc_get_app_id(a_hAPI); - err = em_check_socket_privilege_by_pid(nAPPID); - if (err == EMAIL_ERROR_PERMISSION_DENIED) { - EM_DEBUG_LOG("permission denied"); - if (!emipc_add_parameter(a_hAPI, ePARAMETER_OUT, &err, sizeof(int))) - EM_DEBUG_EXCEPTION("emipc_add_parameter failed"); - - if (!emipc_execute_stub_api(a_hAPI)) - EM_DEBUG_EXCEPTION("emipc_execute_stub_api failed"); - - return; - } -#endif - switch(nAPIID) { case _EMAIL_API_ADD_ACCOUNT: stb_create_account(a_hAPI); diff --git a/email-ipc/email-proxy/email-proxy-socket.c b/email-ipc/email-proxy/email-proxy-socket.c index 6d5fa5a..169a3b4 100644 --- a/email-ipc/email-proxy/email-proxy-socket.c +++ b/email-ipc/email-proxy/email-proxy-socket.c @@ -58,15 +58,6 @@ EXPORT_API bool emipc_start_proxy_socket() return false; } -#ifdef __FEATURE_ACCESS_CONTROL__ - int err = EMAIL_ERROR_NONE; - err = em_check_socket_privilege_by_pid(getpid()); - if (err == EMAIL_ERROR_PERMISSION_DENIED) { - EM_DEBUG_LOG("permission denied"); - return false; - } -#endif - ret = emipc_connect_email_socket(socket_fd); if (!ret) { EM_DEBUG_EXCEPTION("emipc_connect_email_socket failed"); @@ -104,15 +95,6 @@ EXPORT_API bool emipc_end_proxy_socket() /* close the socket of current thread */ if( tid == cur_socket->tid ) { -#ifdef __FEATURE_ACCESS_CONTROL__ - int err = EMAIL_ERROR_NONE; - err = em_check_socket_privilege_by_pid(cur_socket->pid); - if (err == EMAIL_ERROR_PERMISSION_DENIED) { - LEAVE_CRITICAL_SECTION(proxy_mutex); /*prevent 30968*/ - EM_DEBUG_LOG("permission denied"); - return false; - } -#endif emipc_close_email_socket(&cur_socket->socket_fd); EM_SAFE_FREE(cur_socket); GList *del = cur; @@ -142,16 +124,6 @@ EXPORT_API bool emipc_end_all_proxy_sockets() /* close all sockets of the pid */ if( pid == cur_socket->pid ) { -#ifdef __FEATURE_ACCESS_CONTROL__ - int err = EMAIL_ERROR_NONE; - err = em_check_socket_privilege_by_pid(cur_socket->pid); - if (err == EMAIL_ERROR_PERMISSION_DENIED) { - LEAVE_CRITICAL_SECTION(proxy_mutex); /*prevent 30967*/ - EM_DEBUG_LOG("permission denied"); - return false; - } -#endif - emipc_close_email_socket(&cur_socket->socket_fd); EM_SAFE_FREE(cur_socket); GList *del = cur; diff --git a/packaging/email-service.spec b/packaging/email-service.spec index d1a2d07..624ac9b 100755 --- a/packaging/email-service.spec +++ b/packaging/email-service.spec @@ -54,7 +54,6 @@ BuildRequires: pkgconfig(libwbxml2) BuildRequires: pkgconfig(msg-service) BuildRequires: pkgconfig(pmapi) BuildRequires: pkgconfig(libsmack) -BuildRequires: pkgconfig(security-server) BuildRequires: pkgconfig(deviced) BuildRequires: pkgconfig(icu-i18n) BuildRequires: pkgconfig(libtzplatform-config) |