+ if (tag == desired_tag) {
+ /* We found the right tag. Update the permset. */
+ int s_result = acl_set_permset(entry, permset);
+ if (s_result == -1) {
+ perror("remove_access_tag_perm (acl_set_permset)");
+ return -1;
+ }
+
+ int sf_result = acl_set_file(path, ACL_TYPE_ACCESS, acl);
+ if (sf_result == -1) {
+ perror("remove_access_tag_perm (acl_set_file)");
+ return -1;
+ }
+
+ return 1;
+ }
+
+ result = acl_get_entry(acl, ACL_NEXT_ENTRY, &entry);