- /* Our return value. */
- int result = ACL_SUCCESS;
-
- acl_entry_t entry;
- int ge_result = acl_get_entry(acl, ACL_FIRST_ENTRY, &entry);
-
- while (ge_result == ACL_SUCCESS) {
- int d_result = acl_delete_entry(acl, entry);
- if (d_result == ACL_ERROR) {
- perror("wipe_acls (acl_delete_entry)");
- result = ACL_ERROR;
- goto cleanup;
- }
-
- ge_result = acl_get_entry(acl, ACL_NEXT_ENTRY, &entry);
- }
-
- /* Catches the first acl_get_entry as well as the ones at the end of
- the loop. */
- if (ge_result == ACL_ERROR) {
- perror("wipe_acls (acl_get_entry)");
- result = ACL_ERROR;
- goto cleanup;
- }
-
- int sf_result = acl_set_fd(fd, acl);
- if (sf_result == ACL_ERROR) {