Multi-user Architecture

From Tizen Wiki
Jump to: navigation, search

New Feature of Tizen 3.0

What is a Multiuser system ?

A multiuser system is designed to allow multiple users to use it by limiting the access rights of each to ensure the integrity of their data.

We have several categories of Multiuser systems : In Tizen IVI we have the case of

Use Case : IVI profile
The system can be used at the same time by several users but they could share the same display.

  • SingleSeat system

This system is using by one user at a given time. But multiple user can use the system. That could be the use case of some specific shared phone.

Multi User use cases

Tizen is not an OS designed for a Desktop. The use of Tizen multiuser facilities will vary for each platform but in order to help platform designer we have listed some multiuser use cases for key Tizen services:

More to follow

Delta between Tizen 2 and Tizen 3

On tizen 2.X, the system is oriented toward a single user model. The application management uses a single user APP (UID 5000).

All applications are associated to the single user APP.

It was necessary to remove all references to this specific user and add multiuser management.

  1. Many pathes were hardcoded and pointed the APP user directories
  2. Each app (Native or WebApp) was launched by the user APP
  3. Each app (Native or WebApp) was installed by the user ROOT
  4. All applications were installed in the same place and registered in one database.

Changes related pages

Hardcoded paths

All hardcoded paths were replaced by function calls. This functions called are provided by Tizen-platform-config.

For more information,

Application Framework

For this part, we needed to extend the application Framework. Indeed we need add the user management:

  • In the launching process by introducing a new process amd_session_agent.

It aims at launching application for a user in the user environement.

  • In the installation process by splitting all three main database that used in the application Framework

By adding the database (app_info.db...) in each User Home directory.
This kind of management permits to manage easily the user account removal.

For more information ,

CAPI

The CAPI between Tizen 2 & Tizen 3 remains mostly unchanged. Except for theses methods:

Slp-pkgmgr	
int pkgmgr_client_usr_install(pkgmgr_client *pc, const char *pkg_type, const char *descriptor_path, const char *pkg_path, const char *optional_file, pkgmgr_mode mode, pkgmgr_handler event_cb, void *data, uid_t uid);	int pkgmgr_client_install(pkgmgr_client *pc, const char *pkg_type, const char *descriptor_path, const char *pkg_path, const char *optional_file, pkgmgr_mode mode, pkgmgr_handler event_cb, void *data);
int pkgmgr_client_usr_reinstall(pkgmgr_client * pc, const char *pkg_type, const char *pkgid, const char *optional_file, pkgmgr_mode mode, pkgmgr_handler event_cb, void *data, uid_t uid);	int pkgmgr_client_reinstall(pkgmgr_client * pc, const char *pkg_type, const char *pkgid, const char *optional_file, pkgmgr_mode mode,  pkgmgr_handler event_cb, void *data);
int pkgmgr_client_usr_uninstall(pkgmgr_client *pc, const char *pkg_type, const char *pkgid, pkgmgr_mode mode, pkgmgr_handler event_cb, void *data, uid_t uid);	int pkgmgr_client_uninstall(pkgmgr_client *pc, const char *pkg_type, const char *pkgid, pkgmgr_mode mode, pkgmgr_handler event_cb, void *data);
int pkgmgr_client_usr_move(pkgmgr_client *pc, const char *pkg_type, const char *pkgid, pkgmgr_move_type move_type, pkgmgr_mode mode);	int pkgmgr_client_move(pkgmgr_client *pc, const char *pkg_type, const char *pkgid, pkgmgr_move_type move_type, pkgmgr_mode mode);
int pkgmgr_client_usr_activate(pkgmgr_client *pc, const char *pkg_type, const char *pkgid, uid_t uid);	int pkgmgr_client_activate(pkgmgr_client *pc, const char *pkg_type, const char *pkgid);
int pkgmgr_client_usr_deactivate(pkgmgr_client *pc, const char *pkg_type, const char *pkgid, uid_t uid);	int pkgmgr_client_deactivate(pkgmgr_client *pc, const char *pkg_type, const char *pkgid);
int pkgmgr_client_usr_activate_app(pkgmgr_client *pc, const char *appid, uid_t uid);	int pkgmgr_client_activate_app(pkgmgr_client *pc, const char *appid);
int pkgmgr_client_usr_activate_appv(pkgmgr_client * pc, const char *appid, char *const argv[], uid_t uid);	int pkgmgr_client_activate_appv(pkgmgr_client * pc, const char *appid, char *const argv[]);
int pkgmgr_client_usr_deactivate_app(pkgmgr_client *pc, const char *appid, uid_t uid);	int pkgmgr_client_deactivate_app(pkgmgr_client *pc, const char *appid);
int pkgmgr_client_usr_clear_user_data(pkgmgr_client *pc, const char *pkg_type, const char *appid, pkgmgr_mode mode, uid_t uid);	int pkgmgr_client_clear_user_data(pkgmgr_client *pc, const char *pkg_type, const char *appid, pkgmgr_mode mode);
int pkgmgr_client_usr_request_service(pkgmgr_request_service_type service_type, int service_mode, pkgmgr_client * pc, const char *pkg_type, const char *pkgid, uid_t uid, const char *custom_info, pkgmgr_handler event_cb, void *data);	int pkgmgr_client_request_service(pkgmgr_request_service_type service_type, int service_mode, pkgmgr_client * pc, const char *pkg_type, const char *pkgid, const char *custom_info, pkgmgr_handler event_cb, void *data);
int pkgmgr_client_usr_get_size(pkgmgr_client * pc, const char *pkgid, pkgmgr_getsize_type get_type, pkgmgr_handler event_cb, void *data, uid_t uid);	int pkgmgr_client_get_size(pkgmgr_client * pc, const char *pkgid, pkgmgr_getsize_type get_type, pkgmgr_handler event_cb, void *data);
pkgmgr_info * pkgmgr_info_usr_new(const char *pkg_type, const char *pkgid, uid_t uid);	pkgmgr_info * pkgmgr_info_new(const char *pkg_type, const char *pkgid);
int pkgmgr_pkginfo_get_usr_list(pkgmgr_info_pkg_list_cb pkg_list_cb, void *user_data, uid_t uid);	int pkgmgr_pkginfo_get_list(pkgmgr_info_pkg_list_cb pkg_list_cb, void *user_data);
int pkgmgr_pkginfo_get_usr_pkginfo(const char *pkgid, uid_t uid,pkgmgr_pkginfo_h *handle);	int pkgmgr_pkginfo_get_pkginfo(const char *pkgid,pkgmgr_pkginfo_h *handle);
int pkgmgr_appinfo_get_usr_list(pkgmgr_pkginfo_h handle, pkgmgr_app_component component, pkgmgr_info_app_list_cb app_func, void *user_data, uid_t uid);	int pkgmgr_appinfo_get_list(pkgmgr_pkginfo_h handle, pkgmgr_app_component component, pkgmgr_info_app_list_cb app_func, void *user_data);


ail	
ail_error_e ail_filter_list_usr_appinfo_foreach(ail_filter_h filter, ail_list_appinfo_cb appinfo_func, void *user_data, uid_t uid);	ail_error_e ail_filter_list_appinfo_foreach(ail_filter_h filter, ail_list_appinfo_cb appinfo_func, void *user_data);
ail_error_e ail_filter_count_usr_appinfo(ail_filter_h filter, int *count, uid_t uid);	ail_error_e ail_filter_count_appinfo(ail_filter_h filter, int *count);
ail_error_e ail_package_get_usr_appinfo(const char *package, uid_t uid, ail_appinfo_h *handle) __attribute__((deprecated));	ail_error_e ail_package_get_appinfo(const char *package, ail_appinfo_h *handle) __attribute__((deprecated));
ail_error_e ail_get_usr_appinfo(const char *appid, uid_t uid, ail_appinfo_h *handle);	ail_error_e ail_get_appinfo(const char *appid, ail_appinfo_h *handle);
ail_error_e ail_appinfo_get_usr_str(const ail_appinfo_h handle, const char *property, uid_t uid, char **str);	ail_error_e ail_appinfo_get_str(const ail_appinfo_h handle, const char *property, char **str);
ail_error_e ail_usr_desktop_add(const char *appid, uid_t uid);	ail_error_e ail_desktop_add(const char *appid);
ail_error_e ail_usr_desktop_update(const char *appid, uid_t uid);	ail_error_e ail_desktop_update(const char *appid);
ail_error_e ail_usr_desktop_remove(const char *appid, uid_t uid);	ail_error_e ail_desktop_remove(const char *appid);
ail_error_e ail_usr_desktop_clean(const char *pkgid, uid_t uid);	ail_error_e ail_desktop_clean(const char *pkgid);
ail_error_e ail_usr_desktop_fota(const char *appid, uid_t uid);	ail_error_e ail_desktop_fota(const char *appid);
ail_error_e ail_desktop_appinfo_modify_usr_str(const char *appid, uid_t uid, const char *property, const char *value, bool broadcast);	ail_error_e ail_desktop_appinfo_modify_str(const char *appid, const char *property, const char *value, bool broadcast);


Pkgmgr-info	
int pkgmgr_parser_parse_usr_manifest_for_installation(const char *manifest, uid_t uid, char *const tagv[]);	int pkgmgr_parser_parse_manifest_for_installation(const char *manifest, char *const tagv[]);
int pkgmgr_parser_parse_usr_manifest_for_upgrade(const char *manifest, uid_t uid, char *const tagv[]);	int pkgmgr_parser_parse_manifest_for_upgrade(const char *manifest, char *const tagv[]);
int pkgmgr_parser_parse_usr_manifest_for_uninstallation(const char *manifest, uid_t uid, char *const tagv[]);	int pkgmgr_parser_parse_manifest_for_uninstallation(const char *manifest, char *const tagv[]);
int pkgmgr_parser_parse_usr_manifest_for_preload(uid_t uid);	int pkgmgr_parser_parse_manifest_for_preload(uid_t uid);
manifest_x *pkgmgr_parser_usr_process_manifest_xml(const char *manifest, uid_t uid);	manifest_x *pkgmgr_parser_process_manifest_xml(const char *manifest);
int pkgmgr_parser_create_usr_desktop_file(manifest_x *mfx, uid_t uid);	int pkgmgr_parser_create_desktop_file(manifest_x *mfx);
int pkgmgr_parser_insert_manifest_info_in_usr_db(manifest_x *mfx, uid_t uid);	int pkgmgr_parser_insert_manifest_info_in_db(manifest_x *mfx);
int pkgmgr_parser_update_manifest_info_in_usr_db(manifest_x *mfx, uid_t uid);	int pkgmgr_parser_update_manifest_info_in_db(manifest_x *mfx);
int pkgmgr_parser_delete_manifest_info_from_usr_db(manifest_x *mfx, uid_t uid);	int pkgmgr_parser_delete_manifest_info_from_db(manifest_x *mfx);
int pkgmgr_parser_update_preload_info_in_usr_db(uid_t uid);	int pkgmgr_parser_update_preload_info_in_db(uid_t uid);
int pkgmgrinfo_pkginfo_get_usr_list(pkgmgrinfo_pkg_list_cb pkg_list_cb, void *user_data, uid_t uid);	int pkgmgrinfo_pkginfo_get_list(pkgmgrinfo_pkg_list_cb pkg_list_cb, void *user_data);
int pkgmgrinfo_pkginfo_get_usr_pkginfo(const char *pkgid, uid_t uid, pkgmgrinfo_pkginfo_h *handle);	int pkgmgrinfo_pkginfo_get_pkginfo(const char *pkgid, pkgmgrinfo_pkginfo_h *handle);
int pkgmgrinfo_pkginfo_compare_usr_pkg_cert_info(const char *lhs_package_id, const char *rhs_package_id, uid_t uid, pkgmgrinfo_cert_compare_result_type_e *compare_result);	int pkgmgrinfo_pkginfo_compare_pkg_cert_info(const char *lhs_package_id, const char *rhs_package_id, pkgmgrinfo_cert_compare_result_type_e *compare_result);
int pkgmgrinfo_pkginfo_compare_usr_app_cert_info(const char *lhs_app_id, const char *rhs_app_id, uid_t uid, pkgmgrinfo_cert_compare_result_type_e *compare_result);	int pkgmgrinfo_pkginfo_compare_app_cert_info(const char *lhs_app_id, const char *rhs_app_id, pkgmgrinfo_cert_compare_result_type_e *compare_result);
int pkgmgrinfo_pkginfo_usr_filter_foreach_pkginfo(pkgmgrinfo_pkginfo_filter_h handle, pkgmgrinfo_pkg_list_cb pkg_cb, void *user_data, uid_t uid);	int pkgmgrinfo_pkginfo_filter_foreach_pkginfo(pkgmgrinfo_pkginfo_filter_h handle, pkgmgrinfo_pkg_list_cb pkg_cb, void *user_data);
int pkgmgrinfo_pkginfo_usr_filter_count(pkgmgrinfo_pkginfo_filter_h handle, int *count, uid_t uid);	int pkgmgrinfo_pkginfo_filter_count(pkgmgrinfo_pkginfo_filter_h handle, int *count);
int pkgmgrinfo_appinfo_get_usr_list(pkgmgrinfo_pkginfo_h handle, pkgmgrinfo_app_component component, pkgmgrinfo_app_list_cb app_func, void *user_data, uid_t uid);	int pkgmgrinfo_appinfo_get_list(pkgmgrinfo_pkginfo_h handle, pkgmgrinfo_app_component component, pkgmgrinfo_app_list_cb app_func, void *user_data);
int pkgmgrinfo_appinfo_get_usr_install_list(pkgmgrinfo_app_list_cb app_func, uid_t uid, void *user_data);	int pkgmgrinfo_appinfo_get_install_list(pkgmgrinfo_app_list_cb app_func, void *user_data);
int pkgmgrinfo_appinfo_get_usr_installed_list(pkgmgrinfo_app_list_cb app_func, uid_t uid, void *user_data);	int pkgmgrinfo_appinfo_get_installed_list(pkgmgrinfo_app_list_cb app_func, void *user_data);
int pkgmgrinfo_appinfo_get_usr_appinfo(const char *appid, uid_t uid, pkgmgrinfo_appinfo_h *handle);	int pkgmgrinfo_appinfo_get_appinfo(const char *appid, pkgmgrinfo_appinfo_h *handle);
int pkgmgrinfo_usr_appinfo_foreach_appcontrol(pkgmgrinfo_appinfo_h handle, pkgmgrinfo_app_control_list_cb appcontrol_func, void *user_data, uid_t uid);	int pkgmgrinfo_appinfo_foreach_appcontrol(pkgmgrinfo_appinfo_h handle, pkgmgrinfo_app_control_list_cb appcontrol_func, void *user_data);
int pkgmgrinfo_appinfo_usr_filter_foreach_appinfo(pkgmgrinfo_appinfo_filter_h handle, pkgmgrinfo_app_list_cb app_cb, void *user_data, uid_t uid);	int pkgmgrinfo_appinfo_filter_foreach_appinfo(pkgmgrinfo_appinfo_filter_h handle, pkgmgrinfo_app_list_cb app_cb, void *user_data);
int pkgmgrinfo_appinfo_usr_filter_count(pkgmgrinfo_appinfo_filter_h handle, int *count, uid_t uid);	int pkgmgrinfo_appinfo_filter_count(pkgmgrinfo_appinfo_filter_h handle, int *count);
int pkgmgrinfo_appinfo_usr_metadata_filter_foreach(pkgmgrinfo_appinfo_metadata_filter_h handle, pkgmgrinfo_app_list_cb app_cb, void *user_data, uid_t uid);	int pkgmgrinfo_appinfo_metadata_filter_foreach(pkgmgrinfo_appinfo_metadata_filter_h handle, pkgmgrinfo_app_list_cb app_cb, void *user_data);
int pkgmgrinfo_delete_usr_certinfo(const char *pkgid, uid_t uid);	 int pkgmgrinfo_delete_certinfo(const char *pkgid);
int pkgmgrinfo_appinfo_set_usr_guestmode_visibility(pkgmgrinfo_appinfo_h handle, uid_t uid, bool status);	 int pkgmgrinfo_appinfo_set_guestmode_visibility(pkgmgrinfo_appinfo_h handle, bool status);