merge back from tizen_2.1_smack
[framework/security/security-server.git] / src / include / security-server.h
index b927c89..6e960ca 100644 (file)
@@ -1012,6 +1012,27 @@ char * security_server_get_smacklabel_cookie(const char *cookie);
  */
 char * security_server_get_smacklabel_sockfd(int fd);
 
+/*
+ * This function will give permissions "rwxat" from
+ * (subject) customer_label to caller process (object).
+ * Object label will be extracted from socket.
+ * */
+int security_server_app_give_access(const char* customer_label, int customer_pid);
+
+/*
+ * This function allows middleware to check priviliges of process with specified PID.
+ * Service is able to check proces acces to the specified object label with specified
+ * access rights.
+ * 
+ * \param[in] PID number of process to be checked
+ * \param[in] SMACK object label
+ * \param[in] SMACK access rights to be checked
+ *
+ * \return Privilege confirm or error code
+ * SECURITY_SERVER_SUCCESS - on succes
+ */
+int security_server_check_privilege_by_pid(int pid, const char *object, const char *access_rights);
+
 #ifdef __cplusplus
 }
 #endif