]> gitweb.michael.orlitzky.com - apply-default-acl.git/blobdiff - src/apply-default-acl.c
src: add prototypes for all functions.
[apply-default-acl.git] / src / apply-default-acl.c
index 68de557b1511fbe90e117bab1175194d3b6069ea..7989c985ab8bbf4a8329a64bedab1b7330336f71 100644 (file)
  * else for big ones. */
 #define EXIT_ERROR 2
 
+/* Prototypes */
+bool path_accessible(const char* path);
+void usage(const char* program_name);
+
 
 /**
  * @brief Determine whether or not the given path is accessible.
@@ -73,7 +77,6 @@ void usage(const char* program_name) {
   printf("Flags:\n");
   printf(" -h, --help         Print this help message\n");
   printf(" -r, --recursive    Act on any given directories recursively\n");
-  printf(" -x, --no-exec-mask Apply execute permissions unconditionally\n");
 
   return;
 }
@@ -97,13 +100,11 @@ int main(int argc, char* argv[]) {
   }
 
   bool recursive = false;
-  bool no_exec_mask = false;
 
   struct option long_options[] = {
     /* These options set a flag. */
     {"help",      no_argument, NULL, 'h'},
     {"recursive", no_argument, NULL, 'r'},
-    {"no-exec-mask", no_argument, NULL, 'x'},
     {NULL,        0,           NULL, 0}
   };
 
@@ -117,9 +118,6 @@ int main(int argc, char* argv[]) {
     case 'r':
       recursive = true;
       break;
-    case 'x':
-      no_exec_mask = true;
-      break;
     default:
       usage(argv[0]);
       return EXIT_FAILURE;
@@ -144,7 +142,7 @@ int main(int argc, char* argv[]) {
       continue;
     }
 
-    reapp_result = apply_default_acl(target, no_exec_mask, recursive);
+    reapp_result = apply_default_acl(target, recursive);
 
     if (result == EXIT_SUCCESS && reapp_result == ACL_FAILURE) {
       /* We don't want to turn an error into a (less-severe) failure. */