*
* @return true if @c path is a directory, false otherwise.
*/
-bool is_directory(const char* path) {
+bool is_path_directory(const char* path) {
if (path == NULL) {
return false;
}
*/
int any_can_execute_or_dir(const char* path) {
- if (is_directory(path)) {
+ if (is_path_directory(path)) {
/* That was easy... */
return ACL_SUCCESS;
}
return ACL_ERROR;
}
- if (!is_directory(path)) {
+ if (!is_path_directory(path)) {
return ACL_FAILURE;
}
return ACL_FAILURE;
}
- if (!is_regular_file(path) && !is_directory(path)) {
+ if (!is_regular_file(path) && !is_path_directory(path)) {
return ACL_FAILURE;
}
path_copy[PATH_MAX-1] = 0;
char* parent = dirname(path_copy);
- if (!is_directory(parent)) {
+ if (!is_path_directory(parent)) {
/* Make sure dirname() did what we think it did. */
return ACL_FAILURE;
}
acl_t acl = acl_get_file(path, ACL_TYPE_ACCESS);
if (acl == (acl_t)NULL) {
perror("apply_default_acl (acl_get_file)");
- return ACL_ERROR;
+ result = ACL_ERROR;
+ goto cleanup;
}
/* If it's a directory, inherit the parent's default. */
*/
bool apply_default_acl_recursive(const char *target, bool no_exec_mask) {
- if (!is_directory(target)) {
+ if (!is_path_directory(target)) {
return apply_default_acl(target, no_exec_mask);
}