diff --git a/remove.c b/remove.c index 658ced5..2d6d22f 100644 --- a/remove.c +++ b/remove.c @@ -260,13 +260,13 @@ int func_remove(int argc, char *argv[], int mode) return(1); } - if (trustee_is_files_option(argv[i])) { + if (tool_is_files_option(argv[i])) { use_files = 1; i++; continue; } - if (trustee_is_subdirs_option(argv[i])) { + if (tool_is_subdirs_option(argv[i])) { use_subdirs = 1; i++; continue; diff --git a/revoke.c b/revoke.c index 9038bce..34511a1 100644 --- a/revoke.c +++ b/revoke.c @@ -315,13 +315,13 @@ int func_revoke(int argc, char *argv[], int mode) return(1); } - if (trustee_is_files_option(argv[i])) { + if (tool_is_files_option(argv[i])) { use_files = 1; i++; continue; } - if (trustee_is_subdirs_option(argv[i])) { + if (tool_is_subdirs_option(argv[i])) { use_subdirs = 1; i++; continue; diff --git a/slist.c b/slist.c index a66b21b..6f619c7 100644 --- a/slist.c +++ b/slist.c @@ -34,12 +34,6 @@ static int usage(void) return(0); } -static int is_help_arg(char *s) -{ - if (!s) return(0); - return(tool_strsame(s, "/?") || tool_strsame(s, "-?") || tool_strsame(s, "?")); -} - static unsigned long node_to_number(uint8 *addr) { unsigned long n = 0; @@ -76,7 +70,7 @@ int func_slist(int argc, char *argv[], int mode) strcpy(pattern, "*"); for (i = 1; i < argc; i++) { - if (is_help_arg(argv[i])) return(usage()); + if (tool_is_help_arg(argv[i])) return(usage()); if (argv[i][0] == '/' || argv[i][0] == '-') { if (tool_strsame(argv[i], "/C") || tool_strsame(argv[i], "/CONTINUE") || diff --git a/trustee.c b/trustee.c index 510d3f7..2327c7b 100644 --- a/trustee.c +++ b/trustee.c @@ -31,48 +31,6 @@ #define S_IFDIR 0040000 #endif -/* - * trustee_is_subdirs_option - * - * Purpose: - * Recognizes the GRANT/REMOVE/REVOKE option variants that request - * recursive processing of subdirectories. - * - * Parameters: - * s - command-line token to test. - * - * Returns: - * Non-zero when the token is a /SUBDIRS, /SUBDIRECTORIES or /S option, - * otherwise zero. - */ -int trustee_is_subdirs_option(char *s) -{ - if (!s) return(0); - return(tool_strsame(s, "/SUBDIRS") || tool_strsame(s, "-SUBDIRS") || - tool_strsame(s, "/SUBDIRECTORIES") || tool_strsame(s, "-SUBDIRECTORIES") || - tool_strsame(s, "/S") || tool_strsame(s, "-S")); -} - -/* - * trustee_is_files_option - * - * Purpose: - * Recognizes the option variants that request file entries in addition to - * directories for trustee operations. - * - * Parameters: - * s - command-line token to test. - * - * Returns: - * Non-zero for /FILES or /F variants, otherwise zero. - */ -int trustee_is_files_option(char *s) -{ - if (!s) return(0); - return(tool_strsame(s, "/FILES") || tool_strsame(s, "-FILES") || - tool_strsame(s, "/F") || tool_strsame(s, "-F")); -} - /* * trustee_parse_right_word * diff --git a/trustee.h b/trustee.h index 9d6d1e9..20147f5 100644 --- a/trustee.h +++ b/trustee.h @@ -43,8 +43,6 @@ TRUSTEE_RIGHT_DELETE | TRUSTEE_RIGHT_MODIFY | \ TRUSTEE_RIGHT_SEARCH | TRUSTEE_RIGHT_OWNER) -int trustee_is_subdirs_option(char *s); -int trustee_is_files_option(char *s); int trustee_parse_right_word(char *s, uint16 *rights); void trustee_rights_bracket(uint16 rights, char *out); uint32 trustee_lookup_object(char *name, uint16 *objtype, int objtype_given);