return 0;
}
+int smack_set_self_label(char *label)
+{
+ int fd;
+
+ fd = open(SELF_LABEL_FILE, O_WRONLY);
+ if (fd < 0)
+ return -1;
+
+ if (write(fd, label, strlen(label)) < 0) {
+ close(fd);
+ return -1;
+ }
+
+ close(fd);
+ return 0;
+}
+
static int accesses_apply(struct smack_accesses *handle, int clear)
{
char buf[LOAD_LEN + 1];
*/
int smack_new_label_from_socket(int fd, char **label);
+/*!
+ * Set Smack label for callers process. Requires CAP_MAC_ADMIN.
+ *
+ * @param label new label for callers process
+ */
+int smack_set_self_label(char *label);
+
#ifdef __cplusplus
}
#endif