diff options
author | Todd C. Miller <Todd.Miller@courtesan.com> | 1999-04-07 06:59:59 +0000 |
---|---|---|
committer | Todd C. Miller <Todd.Miller@courtesan.com> | 1999-04-07 06:59:59 +0000 |
commit | 7d9f8a10c8f45a0e8eece840986799f05d15ca26 (patch) | |
tree | 453f7a273d9cc20fb5c52abe31e4e84cfa133aea | |
parent | 2a6439e4c4c4430da41238efd4125175f0a47d0e (diff) | |
download | sudo-7d9f8a10c8f45a0e8eece840986799f05d15ca26.tar.gz |
Quiet -Wall
-rw-r--r-- | testsudoers.c | 41 |
1 files changed, 24 insertions, 17 deletions
diff --git a/testsudoers.c b/testsudoers.c index 18f881b49..8a712225e 100644 --- a/testsudoers.c +++ b/testsudoers.c @@ -55,7 +55,9 @@ #include <grp.h> #include <sys/param.h> #include <sys/types.h> +#include <sys/socket.h> #include <netinet/in.h> +#include <arpa/inet.h> #include <netdb.h> #include <sys/stat.h> #include <dirent.h> @@ -85,6 +87,28 @@ char **Argv, **NewArgv; int Argc, NewArgc; uid_t uid; +/* + * Prototypes for external functions + */ +void init_parser __P((void)); +void dumpaliases __P((void)); + +/* + * Returns TRUE if "s" has shell meta characters in it, + * else returns FALSE. + */ +int has_meta(s) + char *s; +{ + register char *t; + + for (t = s; *t; t++) { + if (*t == '\\' || *t == '?' || *t == '*' || *t == '[' || *t == ']') + return(TRUE); + } + return(FALSE); +} + /* * return TRUE if cmnd matches, in the sudo sense, @@ -341,20 +365,3 @@ int main(argc, argv) exit(0); } - - -/* - * Returns TRUE if "s" has shell meta characters in it, - * else returns FALSE. - */ -int has_meta(s) - char *s; -{ - register char *t; - - for (t = s; *t; t++) { - if (*t == '\\' || *t == '?' || *t == '*' || *t == '[' || *t == ']') - return(TRUE); - } - return(FALSE); -} |