- /* Finally, add the permset to the access ACL. It's actually
- * important that we pass in the address of "new_acl" here, and not
- * "new_acl" itself. Why? The call to acl_create_entry() within
- * acl_set_entry() can allocate new memory for the entry.
- * Sometimes that can be done in-place, in which case everything
- * is cool and the new memory gets released when we call
- * acl_free(acl).
- *
- * But occasionally, the whole ACL structure will have to be moved
- * in order to allocate the extra space. When that happens,
- * acl_create_entry() modifies the pointer it was passed (in this
- * case, &acl) to point to the new location. We want to call
- * acl_free() on the new location, and since acl_free() gets
- * called right here, we need acl_create_entry() to update the
- * value of "new_acl". To do that, it needs the address of "new_acl".
- */
-
- if (acl_set_entry(&new_acl, entry) == ACL_ERROR) {
- perror("apply_default_acl_ex (acl_set_entry)");
+ if (acl_update_entry(new_acl, entry) == ACL_ERROR) {
+ perror("apply_default_acl_ex (acl_update_entry)");