}
- if (apply_default_acl_ex(target, sp, false) == ACL_ERROR) {
+ /* The apply_default_acl() function could make use of the stat
+ struct pointer sp, but for safety we choose to stat the result of
+ safe_open() ourselves. */
+ if (apply_default_acl(target, false) == ACL_ERROR) {
/* I guess we do want to bail out for serious/unexpected errors? */
return ACL_ERROR;
}
return ACL_ERROR;
}
- if (apply_default_acl_ex(target, sp, true) == ACL_ERROR) {
+ /* The apply_default_acl() function could make use of the stat
+ struct pointer sp, but for safety we choose to stat the result of
+ safe_open() ourselves. */
+ if (apply_default_acl(target, true) == ACL_ERROR) {
/* I guess we do want to bail out for serious/unexpected errors? */
return ACL_ERROR;
}
* typos, too.
*/
if (!path_accessible(target)) {
- fprintf(stderr, "%s: %s: No such file or directory\n", argv[0], target);
+ perror(target);
result = EXIT_FAILURE;
continue;
}