summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
3dec492)
Added uid field to app_inst_req structure.
Change-Id: Ida0204549bb4818bcd401b5d62c7e13f7dbc04b2
Signed-off-by: Sebastian Grabowski <s.grabowski@samsung.com>
} catch (std::bad_alloc& ex) {
return SECURITY_MANAGER_ERROR_MEMORY;
}
} catch (std::bad_alloc& ex) {
return SECURITY_MANAGER_ERROR_MEMORY;
}
return SECURITY_MANAGER_SUCCESS;
}
return SECURITY_MANAGER_SUCCESS;
}
+int security_manager_app_inst_req_set_uid(app_inst_req *p_req,
+ const uid_t uid)
+{
+ if (!p_req)
+ return SECURITY_MANAGER_ERROR_INPUT_PARAM;
+
+ p_req->uid = uid;
+
+ return SECURITY_MANAGER_SUCCESS;
+}
+
+SECURITY_MANAGER_API
int security_manager_app_inst_req_set_app_id(app_inst_req *p_req, const char *app_id)
{
if (!p_req || !app_id)
int security_manager_app_inst_req_set_app_id(app_inst_req *p_req, const char *app_id)
{
if (!p_req || !app_id)
Serialization::Serialize(send, p_req->pkgId);
Serialization::Serialize(send, p_req->privileges);
Serialization::Serialize(send, p_req->appPaths);
Serialization::Serialize(send, p_req->pkgId);
Serialization::Serialize(send, p_req->privileges);
Serialization::Serialize(send, p_req->appPaths);
+ Serialization::Serialize(send, p_req->uid);
//send buffer to server
int retval = sendToServer(SERVICE_SOCKET, send.Pop(), recv);
//send buffer to server
int retval = sendToServer(SERVICE_SOCKET, send.Pop(), recv);
#ifndef _SECURITY_MANAGER_PROTOCOLS_
#define _SECURITY_MANAGER_PROTOCOLS_
#ifndef _SECURITY_MANAGER_PROTOCOLS_
#define _SECURITY_MANAGER_PROTOCOLS_
#include <vector>
#include <string>
#include <vector>
#include <string>
std::string pkgId;
std::vector<std::string> privileges;
std::vector<std::pair<std::string, int>> appPaths;
std::string pkgId;
std::vector<std::string> privileges;
std::vector<std::pair<std::string, int>> appPaths;
};
namespace SecurityManager {
};
namespace SecurityManager {
int security_manager_app_inst_req_add_path(app_inst_req *p_req, const char *path, const int path_type);
/*
int security_manager_app_inst_req_add_path(app_inst_req *p_req, const char *path, const int path_type);
/*
+ * This function is used to set up user identifier in app_inst_req structure.
+ * This field simplifies support for online and offline modes.
+ *
+ * \param[in] Pointer handling app_inst_req structure
+ * \param[in] User identifier (UID)
+ * \return API return code or error code
+ */
+int security_manager_app_inst_req_set_uid(app_inst_req *p_req,
+ const uid_t uid);
+
+/*
* This function is used to install application based on
* using filled up app_inst_req data structure
*
* This function is used to install application based on
* using filled up app_inst_req data structure
*
Deserialization::Deserialize(buffer, req.pkgId);
Deserialization::Deserialize(buffer, req.privileges);
Deserialization::Deserialize(buffer, req.appPaths);
Deserialization::Deserialize(buffer, req.pkgId);
Deserialization::Deserialize(buffer, req.privileges);
Deserialization::Deserialize(buffer, req.appPaths);
+ Deserialization::Deserialize(buffer, req.uid);
+
+ if ((!uid) && (req.uid))
+ uid = req.uid;
checkGlobalUser(uid, uidstr);
if(!installRequestAuthCheck(req, uid)) {
checkGlobalUser(uid, uidstr);
if(!installRequestAuthCheck(req, uid)) {