int db_id = -1;
GVariant *account_serialized = marshal_account(account_data);
+ uid_t uid = -1;
+ if (pkgmgr_installer_info_get_target_uid(&uid) < 0) {
+ ACCOUNT_ERROR("pkgmgr_installer_info_get_target_uid() fail");
+ return ACCOUNT_ERROR_DB_FAILED;
+ }
+
_INFO("3. Before account_manager_call_account_add_sync");
- bool is_success = account_manager_call_account_add_sync(acc_mgr, account_serialized, (int)getuid(), &db_id, NULL, &error);
+ bool is_success = account_manager_call_account_add_sync(acc_mgr, account_serialized, (int)uid, &db_id, NULL, &error);
_account_manager_release_instance();
ACCOUNT_CATCH_ERROR((is_success != false), {}, _account_get_error_code(is_success, error), "Failed to get dbus.");
return ACCOUNT_ERROR_PERMISSION_DENIED;
}
+ uid_t uid = -1;
+ if (pkgmgr_installer_info_get_target_uid(&uid) < 0) {
+ ACCOUNT_ERROR("pkgmgr_installer_info_get_target_uid() fail");
+ return ACCOUNT_ERROR_DB_FAILED;
+ }
+
_INFO("2. Before account_manager_call_account_query_account_by_account_id_sync");
GVariant *account_serialized_old = NULL;
- bool is_success = account_manager_call_account_query_account_by_account_id_sync(acc_mgr, account_db_id, (int)getuid(), &account_serialized_old, NULL, &error);
+ bool is_success = account_manager_call_account_query_account_by_account_id_sync(acc_mgr, account_db_id, (int)uid, &account_serialized_old, NULL, &error);
if (!is_success) {
error_code = _account_get_error_code(is_success, error);
g_clear_error(&error);
_INFO("3. Before account_manager_call_account_delete_from_db_by_id_sync");
- is_success = account_manager_call_account_delete_from_db_by_id_sync(acc_mgr, account_db_id, (int)getuid(), NULL, &error);
+ is_success = account_manager_call_account_delete_from_db_by_id_sync(acc_mgr, account_db_id, (int)uid, NULL, &error);
_account_manager_release_instance();
if (!is_success) {
return ACCOUNT_ERROR_PERMISSION_DENIED;
}
+ uid_t uid = -1;
+ if (pkgmgr_installer_info_get_target_uid(&uid) < 0) {
+ ACCOUNT_ERROR("pkgmgr_installer_info_get_target_uid() fail");
+ return ACCOUNT_ERROR_DB_FAILED;
+ }
+
GVariant *account_list_variant = NULL;
- bool is_success = account_manager_call_account_query_account_by_user_name_sync(acc_mgr, user_name, (int)getuid(), &account_list_variant, NULL, &error);
+ bool is_success = account_manager_call_account_query_account_by_user_name_sync(acc_mgr, user_name, (int)uid, &account_list_variant, NULL, &error);
error_code = _account_get_error_code(is_success, error);
g_clear_error(&error);
return ACCOUNT_ERROR_NO_DATA;
}
- is_success = account_manager_call_account_delete_from_db_by_user_name_sync(acc_mgr, user_name, package_name, (int)getuid(), NULL, &error);
+ is_success = account_manager_call_account_delete_from_db_by_user_name_sync(acc_mgr, user_name, package_name, (int)uid, NULL, &error);
_account_manager_release_instance();
if (!is_success) {
/*
//First get account list of user_name, used for gSSO DB deletion
GVariant* account_list_variant = NULL;
- bool is_success = account_manager_call_account_query_account_by_package_name_sync(acc_mgr, account_db_path, package_name, (int)getuid(), &account_list_variant, NULL, &error);
+ bool is_success = account_manager_call_account_query_account_by_package_name_sync(acc_mgr, account_db_path, package_name, (int)uid, &account_list_variant, NULL, &error);
error_code = _account_get_error_code(is_success, error);
if (error_code != ACCOUNT_ERROR_NONE)
return ACCOUNT_ERROR_NO_DATA;
}
*/
- bool is_success = account_manager_call_account_delete_from_db_by_package_name_sync(acc_mgr, package_name, permission, (int)getuid(), NULL, &error);
+
+ uid_t uid = -1;
+ if (pkgmgr_installer_info_get_target_uid(&uid) < 0) {
+ ACCOUNT_ERROR("pkgmgr_installer_info_get_target_uid() fail");
+ return ACCOUNT_ERROR_DB_FAILED;
+ }
+
+ bool is_success = account_manager_call_account_delete_from_db_by_package_name_sync(acc_mgr, package_name, permission, (int)uid, NULL, &error);
_account_manager_release_instance();
if (!is_success) {
return ACCOUNT_ERROR_PERMISSION_DENIED;
}
+ uid_t uid = -1;
+ if (pkgmgr_installer_info_get_target_uid(&uid) < 0) {
+ ACCOUNT_ERROR("pkgmgr_installer_info_get_target_uid() fail");
+ return ACCOUNT_ERROR_DB_FAILED;
+ }
+
_INFO("2. Before account_manager_call_account_query_account_by_account_id_sync");
GVariant *account_serialized_old = NULL;
- bool is_success = account_manager_call_account_query_account_by_account_id_sync(acc_mgr, account_id, (int)getuid(), &account_serialized_old, NULL, &error);
+ bool is_success = account_manager_call_account_query_account_by_account_id_sync(acc_mgr, account_id, (int)uid, &account_serialized_old, NULL, &error);
if (!is_success) {
error_code = _account_get_error_code(is_success, error);
_INFO("3. Before account_manager_call_account_update_to_db_by_id_sync");
GVariant *account_serialized = marshal_account((account_s *)account);
- is_success = account_manager_call_account_update_to_db_by_id_sync(acc_mgr, account_serialized, account_id, (int)getuid(), NULL, &error);
+ is_success = account_manager_call_account_update_to_db_by_id_sync(acc_mgr, account_serialized, account_id, (int)uid, NULL, &error);
_account_manager_release_instance();
if (!is_success) {
uid_t uid = -1;
if (pkgmgr_installer_info_get_target_uid(&uid) < 0) {
_ERR("pkgmgr_installer_info_get_target_uid() fail");
- return ACCOUNT_ERROR_DB_NOT_OPENED;
+ return ACCOUNT_ERROR_DB_FAILED;
}
+
bool is_success = account_manager_call_account_query_account_by_account_id_sync(acc_mgr, account_id, (int)uid, &account_serialized_old, NULL, &error);
if (!is_success) {
}
_INFO("before call update() : account_id[%d]", account_id);
- is_success = account_manager_call_account_update_to_db_by_id_ex_sync(acc_mgr, account_serialized, account_id, (int)getuid(), NULL, &error);
+ is_success = account_manager_call_account_update_to_db_by_id_ex_sync(acc_mgr, account_serialized, account_id, (int)uid, NULL, &error);
_INFO("after call update() : is_success=%d", is_success);
_account_manager_release_instance();
return ACCOUNT_ERROR_PERMISSION_DENIED;
}
+ uid_t uid = -1;
+ if (pkgmgr_installer_info_get_target_uid(&uid) < 0) {
+ ACCOUNT_ERROR("pkgmgr_installer_info_get_target_uid() fail");
+ return ACCOUNT_ERROR_DB_FAILED;
+ }
+
GVariant *account_serialized_old = NULL;
account_s *account_data = (account_s *)account;
- bool is_success = account_manager_call_account_query_account_by_account_id_sync(acc_mgr, account_data->id, (int)getuid(), &account_serialized_old, NULL, &error);
+ bool is_success = account_manager_call_account_query_account_by_account_id_sync(acc_mgr, account_data->id, (int)uid, &account_serialized_old, NULL, &error);
if (!is_success) {
error_code = _account_get_error_code(is_success, error);
g_clear_error(&error);
GVariant *account_serialized = marshal_account(account_data);
- is_success = account_manager_call_account_update_to_db_by_user_name_sync(acc_mgr, account_serialized, user_name, package_name, (int)getuid(), NULL, &error);
+ is_success = account_manager_call_account_update_to_db_by_user_name_sync(acc_mgr, account_serialized, user_name, package_name, (int)uid, NULL, &error);
_account_manager_release_instance();
if (!is_success) {
return ACCOUNT_ERROR_PERMISSION_DENIED;
}
+ uid_t uid = -1;
+ if (pkgmgr_installer_info_get_target_uid(&uid) < 0) {
+ ACCOUNT_ERROR("pkgmgr_installer_info_get_target_uid() fail");
+ return ACCOUNT_ERROR_DB_FAILED;
+ }
+
GVariant *account_list_variant = NULL;
- bool is_success = account_manager_call_account_query_all_sync(acc_mgr, (int)getuid(), &account_list_variant, NULL, &error);
+ bool is_success = account_manager_call_account_query_all_sync(acc_mgr, (int)uid, &account_list_variant, NULL, &error);
_account_manager_release_instance();
int error_code = _account_get_error_code(is_success, error);
return ACCOUNT_ERROR_PERMISSION_DENIED;
}
+ uid_t uid = -1;
+ if (pkgmgr_installer_info_get_target_uid(&uid) < 0) {
+ ACCOUNT_ERROR("pkgmgr_installer_info_get_target_uid() fail");
+ return ACCOUNT_ERROR_DB_FAILED;
+ }
+
GVariant *account_variant = NULL;
- bool is_success = account_manager_call_account_query_account_by_account_id_sync(acc_mgr, account_db_id, (int)getuid(), &account_variant, NULL, &error);
+ bool is_success = account_manager_call_account_query_account_by_account_id_sync(acc_mgr, account_db_id, (int)uid, &account_variant, NULL, &error);
_account_manager_release_instance();
int error_code = _account_get_error_code(is_success, error);
return ACCOUNT_ERROR_PERMISSION_DENIED;
}
+ uid_t uid = -1;
+ if (pkgmgr_installer_info_get_target_uid(&uid) < 0) {
+ ACCOUNT_ERROR("pkgmgr_installer_info_get_target_uid() fail");
+ return ACCOUNT_ERROR_DB_FAILED;
+ }
+
GVariant *account_list_variant = NULL;
- bool is_success = account_manager_call_account_query_account_by_user_name_sync(acc_mgr, user_name, (int)getuid(), &account_list_variant, NULL, &error);
+ bool is_success = account_manager_call_account_query_account_by_user_name_sync(acc_mgr, user_name, (int)uid, &account_list_variant, NULL, &error);
_account_manager_release_instance();
int error_code = _account_get_error_code(is_success, error);
uid_t uid = -1;
if (pkgmgr_installer_info_get_target_uid(&uid) < 0) {
_ERR("pkgmgr_installer_info_get_target_uid() fail");
- return ACCOUNT_ERROR_DB_NOT_OPENED;
+ return ACCOUNT_ERROR_DB_FAILED;
}
- bool is_success = account_manager_call_account_query_account_by_package_name_sync(acc_mgr, package_name, (int)getuid(), &account_list_variant, NULL, &error);
+ bool is_success = account_manager_call_account_query_account_by_package_name_sync(acc_mgr, package_name, (int)uid, &account_list_variant, NULL, &error);
_account_manager_release_instance();
int error_code = _account_get_error_code(is_success, error);
return ACCOUNT_ERROR_PERMISSION_DENIED;
}
+ uid_t uid = -1;
+ if (pkgmgr_installer_info_get_target_uid(&uid) < 0) {
+ ACCOUNT_ERROR("pkgmgr_installer_info_get_target_uid() fail");
+ return ACCOUNT_ERROR_DB_FAILED;
+ }
+
GVariant *account_list_variant = NULL;
- bool is_success = account_manager_call_account_query_account_by_capability_sync(acc_mgr, capability_type, capability_value, (int)getuid(), &account_list_variant, NULL, &error);
+ bool is_success = account_manager_call_account_query_account_by_capability_sync(acc_mgr, capability_type, capability_value, (int)uid, &account_list_variant, NULL, &error);
_account_manager_release_instance();
int error_code = _account_get_error_code(is_success, error);
return ACCOUNT_ERROR_PERMISSION_DENIED;
}
+ uid_t uid = -1;
+ if (pkgmgr_installer_info_get_target_uid(&uid) < 0) {
+ ACCOUNT_ERROR("pkgmgr_installer_info_get_target_uid() fail");
+ return ACCOUNT_ERROR_DB_FAILED;
+ }
+
GVariant *account_list_variant = NULL;
- bool is_success = account_manager_call_account_query_account_by_capability_type_sync(acc_mgr, capability_type, (int)getuid(), &account_list_variant, NULL, &error);
+ bool is_success = account_manager_call_account_query_account_by_capability_type_sync(acc_mgr, capability_type, (int)uid, &account_list_variant, NULL, &error);
_account_manager_release_instance();
int error_code = _account_get_error_code(is_success, error);
return ACCOUNT_ERROR_PERMISSION_DENIED;
}
+ uid_t uid = -1;
+ if (pkgmgr_installer_info_get_target_uid(&uid) < 0) {
+ ACCOUNT_ERROR("pkgmgr_installer_info_get_target_uid() fail");
+ return ACCOUNT_ERROR_DB_FAILED;
+ }
+
GVariant *capability_list_variant = NULL;
- bool is_success = account_manager_call_account_query_capability_by_account_id_sync(acc_mgr, account_id, (int)getuid(), &capability_list_variant, NULL, &error);
+ bool is_success = account_manager_call_account_query_capability_by_account_id_sync(acc_mgr, account_id, (int)uid, &capability_list_variant, NULL, &error);
_account_manager_release_instance();
int error_code = _account_get_error_code(is_success, error);
return ACCOUNT_ERROR_PERMISSION_DENIED;
}
+ uid_t uid = -1;
+ if (pkgmgr_installer_info_get_target_uid(&uid) < 0) {
+ ACCOUNT_ERROR("pkgmgr_installer_info_get_target_uid() fail");
+ return ACCOUNT_ERROR_DB_FAILED;
+ }
+
int temp_count = -1;
- bool is_success = account_manager_call_account_get_total_count_from_db_sync(acc_mgr, include_hidden, (int)getuid(), &temp_count, NULL, &error);
+ bool is_success = account_manager_call_account_get_total_count_from_db_sync(acc_mgr, include_hidden, (int)uid, &temp_count, NULL, &error);
_account_manager_release_instance();
int error_code = _account_get_error_code(is_success, error);
return ACCOUNT_ERROR_PERMISSION_DENIED;
}
- bool is_success = account_manager_call_account_update_sync_status_by_id_sync(acc_mgr, account_db_id, sync_status, (int)getuid(), NULL, &error);
+ uid_t uid = -1;
+ if (pkgmgr_installer_info_get_target_uid(&uid) < 0) {
+ ACCOUNT_ERROR("pkgmgr_installer_info_get_target_uid() fail");
+ return ACCOUNT_ERROR_DB_FAILED;
+ }
+
+ bool is_success = account_manager_call_account_update_sync_status_by_id_sync(acc_mgr, account_db_id, sync_status, (int)uid, NULL, &error);
_account_manager_release_instance();
error_code = _account_get_error_code(is_success, error);
return ACCOUNT_ERROR_PERMISSION_DENIED;
}
+ uid_t uid = -1;
+ if (pkgmgr_installer_info_get_target_uid(&uid) < 0) {
+ ACCOUNT_ERROR("pkgmgr_installer_info_get_target_uid() fail");
+ return ACCOUNT_ERROR_DB_FAILED;
+ }
+
GVariant *feature_list_variant = NULL;
- bool is_success = account_manager_call_account_type_query_provider_feature_by_app_id_sync(acc_mgr, app_id, (int)getuid(), &feature_list_variant, NULL, &error);
+ bool is_success = account_manager_call_account_type_query_provider_feature_by_app_id_sync(acc_mgr, app_id, (int)uid, &feature_list_variant, NULL, &error);
_account_manager_release_instance();
_INFO("account_manager_call_account_type_query_provider_feature_by_app_id_sync end=[%d]", is_success);
return false;
}
- bool is_success = account_manager_call_account_type_query_supported_feature_sync(acc_mgr, app_id, capability, (int)getuid(), &is_supported, NULL, &error);
+ uid_t uid = -1;
+ if (pkgmgr_installer_info_get_target_uid(&uid) < 0) {
+ ACCOUNT_ERROR("pkgmgr_installer_info_get_target_uid() fail");
+ return ACCOUNT_ERROR_DB_FAILED;
+ }
+
+ bool is_success = account_manager_call_account_type_query_supported_feature_sync(acc_mgr, app_id, capability, (int)uid, &is_supported, NULL, &error);
_account_manager_release_instance();
_INFO("account_manager_call_account_type_query_supported_feature_sync end=[%d]", is_success);
return ACCOUNT_ERROR_INVALID_PARAMETER;
}
- bool is_success = account_manager_call_account_type_update_to_db_by_app_id_sync(acc_mgr, account_type_variant, app_id, (int)getuid(), NULL, &error);
+ uid_t uid = -1;
+ if (pkgmgr_installer_info_get_target_uid(&uid) < 0) {
+ ACCOUNT_ERROR("pkgmgr_installer_info_get_target_uid() fail");
+ return ACCOUNT_ERROR_DB_FAILED;
+ }
+
+ bool is_success = account_manager_call_account_type_update_to_db_by_app_id_sync(acc_mgr, account_type_variant, app_id, (int)uid, NULL, &error);
_account_manager_release_instance();
error_code = _account_get_error_code(is_success, error);
uid_t uid = -1;
if (pkgmgr_installer_info_get_target_uid(&uid) < 0) {
_ERR("pkgmgr_installer_info_get_target_uid() fail");
- return ACCOUNT_ERROR_DB_NOT_OPENED;
+ return ACCOUNT_ERROR_DB_FAILED;
}
+
bool is_success = account_manager_call_account_type_delete_by_app_id_sync(acc_mgr, app_id, (int)uid, NULL, &error);
_account_manager_release_instance();
return ACCOUNT_ERROR_PERMISSION_DENIED;
}
+ uid_t uid = -1;
+ if (pkgmgr_installer_info_get_target_uid(&uid) < 0) {
+ ACCOUNT_ERROR("pkgmgr_installer_info_get_target_uid() fail");
+ return ACCOUNT_ERROR_DB_FAILED;
+ }
+
GVariant *label_list_variant = NULL;
- bool is_success = account_manager_call_account_type_query_label_by_app_id_sync(acc_mgr, app_id, (int)getuid(), &label_list_variant, NULL, &error);
+ bool is_success = account_manager_call_account_type_query_label_by_app_id_sync(acc_mgr, app_id, (int)uid, &label_list_variant, NULL, &error);
_account_manager_release_instance();
int ret = _account_get_error_code(is_success, error);
return ACCOUNT_ERROR_PERMISSION_DENIED;
}
+ uid_t uid = -1;
+ if (pkgmgr_installer_info_get_target_uid(&uid) < 0) {
+ ACCOUNT_ERROR("pkgmgr_installer_info_get_target_uid() fail");
+ return ACCOUNT_ERROR_DB_FAILED;
+ }
+
GVariant *account_type_variant = NULL;
account_type_s *in_data = (account_type_s *)*account_type;
- bool is_success = account_manager_call_account_type_query_by_app_id_sync(acc_mgr, app_id, (int)getuid(), &account_type_variant, NULL, &error);
+ bool is_success = account_manager_call_account_type_query_by_app_id_sync(acc_mgr, app_id, (int)uid, &account_type_variant, NULL, &error);
_account_manager_release_instance();
int ret = _account_get_error_code(is_success, error);
return ACCOUNT_ERROR_PERMISSION_DENIED;
}
+ uid_t uid = -1;
+ if (pkgmgr_installer_info_get_target_uid(&uid) < 0) {
+ ACCOUNT_ERROR("pkgmgr_installer_info_get_target_uid() fail");
+ return ACCOUNT_ERROR_DB_FAILED;
+ }
+
GVariant *account_type_list_variant = NULL;
_INFO("before account_type_query_all_sync()");
- bool is_success = account_manager_call_account_type_query_all_sync(acc_mgr, (int)getuid(), &account_type_list_variant, NULL, &error);
+ bool is_success = account_manager_call_account_type_query_all_sync(acc_mgr, (int)uid, &account_type_list_variant, NULL, &error);
_account_manager_release_instance();
_INFO("after account_type_query_all_sync()");
return ACCOUNT_ERROR_PERMISSION_DENIED;
}
+ uid_t uid = -1;
+ if (pkgmgr_installer_info_get_target_uid(&uid) < 0) {
+ ACCOUNT_ERROR("pkgmgr_installer_info_get_target_uid() fail");
+ return ACCOUNT_ERROR_DB_FAILED;
+ }
+
char *label_temp = NULL;
_INFO("before account_type_query_label_by_locale_sync()");
- bool is_success = account_manager_call_account_type_query_label_by_locale_sync(acc_mgr, app_id, locale, (int)getuid(), &label_temp, NULL, &error);
+ bool is_success = account_manager_call_account_type_query_label_by_locale_sync(acc_mgr, app_id, locale, (int)uid, &label_temp, NULL, &error);
_account_manager_release_instance();
_INFO("after account_type_query_label_by_locale_sync() : is_success=%d", is_success);
return ACCOUNT_ERROR_PERMISSION_DENIED;
}
+ uid_t uid = -1;
+ if (pkgmgr_installer_info_get_target_uid(&uid) < 0) {
+ ACCOUNT_ERROR("pkgmgr_installer_info_get_target_uid() fail");
+ return ACCOUNT_ERROR_DB_FAILED;
+ }
+
GVariant *account_type_list_variant = NULL;
- bool is_success = account_manager_call_account_type_query_by_provider_feature_sync(acc_mgr, key, (int)getuid(), &account_type_list_variant, NULL, &error);
+ bool is_success = account_manager_call_account_type_query_by_provider_feature_sync(acc_mgr, key, (int)uid, &account_type_list_variant, NULL, &error);
_account_manager_release_instance();
int ret = _account_get_error_code(is_success, error);
return ACCOUNT_ERROR_PERMISSION_DENIED;
}
- bool is_success = account_manager_call_account_type_query_app_id_exist_sync(acc_mgr, app_id, (int)getuid(), NULL, &error);
+ uid_t uid = -1;
+ if (pkgmgr_installer_info_get_target_uid(&uid) < 0) {
+ ACCOUNT_ERROR("pkgmgr_installer_info_get_target_uid() fail");
+ return ACCOUNT_ERROR_DB_FAILED;
+ }
+
+ bool is_success = account_manager_call_account_type_query_app_id_exist_sync(acc_mgr, app_id, (int)uid, NULL, &error);
_account_manager_release_instance();
error_code = _account_get_error_code(is_success, error);