{ "no-remove", 0, NULL, OPTVAL_NO_REMOVAL }, /* for preload RW */
{ "keep-rwdata", 0, NULL, OPTVAL_KEEP_RWDATA }, /* for preload RW */
{ "partial-rw", 0, NULL, OPTVAL_PARTIAL_RW }, /* for preload RO */
- { "migrate-extimg", 1, NULL, OPTVAL_MIGRATE_EXTIMG },
+ { "migrate-extimg", 1, NULL, OPTVAL_MIGRATE_EXTIMG },
{ 0, 0, 0, 0 } /* sentinel */
};
};
static uid_t g_target_uid;
+static pkgmgr_privilege_level g_privilege_level = PM_PRIVILEGE_UNKNOWN;
static const char *__get_signal_name(pkgmgr_installer *pi, const char *key,
const char *pkg_type)
return -1;
}
- r = send(fd, data, len, 0);
+ r = send(fd, data, len, MSG_NOSIGNAL);
if (r < 0) {
ERR("failed to send data: %d", errno);
close(fd);
return ret;
}
+API int pkgmgr_installer_set_privilege_level(pkgmgr_privilege_level level)
+{
+ g_privilege_level = level;
+
+ return 0;
+}
+
API int pkgmgr_installer_info_get_target_uid(uid_t *uid)
{
*uid = g_target_uid;
return 0;
}
+
+API int pkgmgr_installer_info_get_privilege_level(pkgmgr_privilege_level *level)
+{
+ *level = g_privilege_level;
+
+ return 0;
+}