Lines Matching defs:label

59 int mac_smack_read(const char *path, SmackAttr attr, char **label) {
62 assert(label);
67 return getxattr_malloc(path, smack_attr_to_string(attr), label, true);
70 int mac_smack_read_fd(int fd, SmackAttr attr, char **label) {
73 assert(label);
78 return fgetxattr_malloc(fd, smack_attr_to_string(attr), label);
81 int mac_smack_apply(const char *path, SmackAttr attr, const char *label) {
90 if (label)
91 r = lsetxattr(path, smack_attr_to_string(attr), label, strlen(label), 0);
100 int mac_smack_apply_fd(int fd, SmackAttr attr, const char *label) {
109 if (label)
110 r = fsetxattr(fd, smack_attr_to_string(attr), label, strlen(label), 0);
119 int mac_smack_apply_pid(pid_t pid, const char *label) {
123 assert(label);
129 r = write_string_file(p, label, 0);
153 const char *label;
162 label = SMACK_STAR_LABEL;
164 label = SMACK_FLOOR_LABEL;
166 label = SMACK_STAR_LABEL;
170 r = lsetxattr(path, "security.SMACK64", label, strlen(label), 0);
185 r = log_debug_errno(errno, "Unable to fix SMACK label of %s: %m", path);
193 _cleanup_free_ char *label = NULL;
198 r = mac_smack_read(src, SMACK_ATTR_ACCESS, &label);
202 r = mac_smack_apply(dest, SMACK_ATTR_ACCESS, label);
214 int mac_smack_read(const char *path, SmackAttr attr, char **label) {
218 int mac_smack_read_fd(int fd, SmackAttr attr, char **label) {
222 int mac_smack_apply(const char *path, SmackAttr attr, const char *label) {
226 int mac_smack_apply_fd(int fd, SmackAttr attr, const char *label) {
230 int mac_smack_apply_pid(pid_t pid, const char *label) {