#define _XOPEN_SOURCE 500
#define _GNU_SOURCE
-#include <errno.h>
-#include <fcntl.h> /* AT_FOO constants */
-#include <ftw.h> /* nftw() et al. */
-#include <getopt.h>
-#include <stdbool.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
+#include <fcntl.h> /* AT_FOO constants */
+#include <ftw.h> /* nftw() et al. */
+#include <getopt.h> /* getopt_long() */
+#include <stdbool.h> /* the "bool" type */
+#include <stdio.h> /* perror() */
+#include <stdlib.h> /* EXIT_FAILURE, EXIT_SUCCESS */
+#include <unistd.h> /* faccessat() */
#include "libadacl.h"
+#define NFTW_ERROR -1
+
/**
* @brief Determine whether or not the given path is accessible.
int info,
struct FTW *ftw) {
- if (apply_default_acl(target, sp, false)) {
+ if (apply_default_acl_ex(target, sp, false)) {
return FTW_CONTINUE;
}
else {
int info,
struct FTW *ftw) {
- if (apply_default_acl(target, sp, true)) {
+ if (apply_default_acl_ex(target, sp, true)) {
return FTW_CONTINUE;
}
else {
}
else {
/* It's either a normal file, or we're not operating recursively. */
- reapp_result = apply_default_acl(target, NULL, no_exec_mask);
+ reapp_result = apply_default_acl(target, no_exec_mask);
}
if (!reapp_result) {