return AUL_SVC_RET_OK;
}
- ret = _svc_db_check_perm(info->uid, true);
- if (ret < 0) {
- _E("Permission denied. error(%d)", ret);
- ret = AUL_SVC_RET_EILLACC;
- goto err;
- }
-
return AUL_SVC_RET_OK;
err:
GSList *pkg_list = NULL;
GSList *iter = NULL;
-
- ret = _svc_db_check_perm(uid, true);
- if (ret < 0) {
- _E("permission error : %d", ret);
- return AUL_SVC_RET_EILLACC;
- }
-
ret = _svc_db_get_list_with_all_defapps(&pkg_list, uid);
if (ret < 0)
return ret;
if (op == NULL || defapp == NULL)
return AUL_SVC_RET_EINVAL;
- ret = _svc_db_check_perm(uid, false);
- if (ret < 0) {
- _E("permission error : %d", ret);
- return AUL_SVC_RET_EILLACC;
- }
-
ret = _svc_db_add_app(op, mime_type, uri, defapp, uid);
if (ret < 0)
return AUL_SVC_RET_ERROR;
if (defapp == NULL)
return AUL_SVC_RET_EINVAL;
- ret = _svc_db_check_perm(uid, false);
- if (ret < 0) {
- _E("permission error : %d", ret);
- return AUL_SVC_RET_EILLACC;
- }
-
ret = _svc_db_delete_with_pkgname(defapp, uid);
if (ret < 0)
{
int ret;
- ret = _svc_db_check_perm(uid, false);
- if (ret < 0) {
- _E("permission error : %d", ret);
- return AUL_SVC_RET_EILLACC;
- }
-
ret = _svc_db_delete_all(uid);
if (ret < 0)
API int aul_svc_is_defapp_for_uid(const char *pkg_name, uid_t uid)
{
- int ret;
-
- ret = _svc_db_check_perm(uid, true);
- if (ret < 0) {
- _E("permission error : %d", ret);
- return AUL_SVC_RET_EILLACC;
- }
-
return _svc_db_is_defapp(pkg_name, uid);
}
{
int ret;
- ret = _svc_db_check_perm(uid, false);
- if (ret < 0) {
- _E("Permission error: %d", ret);
- return AUL_SVC_RET_EILLACC;
- }
-
ret = _svc_db_add_alias_appid(alias_appid, appid, uid);
if (ret < 0)
return AUL_SVC_RET_ERROR;
{
int ret;
- ret = _svc_db_check_perm(uid, false);
- if (ret < 0) {
- _E("Permission error: %d", ret);
- return AUL_SVC_RET_EILLACC;
- }
-
ret = _svc_db_delete_alias_appid(alias_appid, uid);
if (ret < 0)
return AUL_SVC_RET_ERROR;
return AUL_SVC_RET_EINVAL;
}
- ret = _svc_db_check_perm(uid, true);
- if (ret < 0) {
- _E("Permission error: %d", ret);
- return AUL_SVC_RET_EILLACC;
- }
-
ret = _svc_db_foreach_alias_info(callback, uid, user_data);
if (ret < 0)
return AUL_SVC_RET_ERROR;
{
int ret;
- ret = _svc_db_check_perm(uid, false);
- if (ret < 0) {
- _E("Permission error: %d", ret);
- return AUL_SVC_RET_EILLACC;
- }
-
ret = _svc_db_enable_alias_info(appid, uid);
if (ret < 0)
return AUL_SVC_RET_ERROR;
{
int ret;
- ret = _svc_db_check_perm(uid, false);
- if (ret < 0) {
- _E("Permission error: %d", ret);
- return AUL_SVC_RET_EILLACC;
- }
-
ret = _svc_db_disable_alias_info(appid, uid);
if (ret < 0)
return AUL_SVC_RET_ERROR;
{
int ret;
- ret = _svc_db_check_perm(uid, true);
- if (ret < 0) {
- _E("Permission error: %d", ret);
- return AUL_SVC_RET_EILLACC;
- }
-
ret = _svc_db_get_appid_from_alias_info(alias_appid, appid, uid);
if (ret < 0)
return AUL_SVC_RET_ERROR;
return AUL_SVC_RET_EINVAL;
}
- ret = _svc_db_check_perm(uid, true);
- if (ret < 0) {
- _E("Permission error: %d", ret);
- return AUL_SVC_RET_EILLACC;
- }
-
ret = _svc_db_foreach_alias_info_by_appid(callback, appid,
uid, user_data);
if (ret < 0)
return AUL_SVC_RET_EINVAL;
}
- ret = _svc_db_check_perm(uid, true);
- if (ret < 0) {
- _E("Permission error: %d", ret);
- return AUL_SVC_RET_EILLACC;
- }
-
ret = _svc_db_foreach_allowed_info(callback, uid, user_data);
if (ret < 0)
return AUL_SVC_RET_ERROR;
return AUL_SVC_RET_EINVAL;
}
- ret = _svc_db_check_perm(uid, true);
- if (ret < 0) {
- _E("Permission error: %d", ret);
- return AUL_SVC_RET_EILLACC;
- }
-
ret = _svc_db_foreach_allowed_info_by_appid(callback, appid,
uid, user_data);
if (ret < 0)