diff options
author | Andrew Tridgell <tridge@samba.org> | 1998-05-14 04:31:03 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1998-05-14 04:31:03 +0000 |
commit | 5a96ee059968da5fd2ba4fbd6321bb3ee76b3c9d (patch) | |
tree | 21b9e7770a44a0c67a98a2403fd1068668c191ee | |
parent | 0cea42440ffc9edab56710ab0baaff9454a86fea (diff) | |
download | rsync-5a96ee059968da5fd2ba4fbd6321bb3ee76b3c9d.tar.gz rsync-5a96ee059968da5fd2ba4fbd6321bb3ee76b3c9d.tar.bz2 rsync-5a96ee059968da5fd2ba4fbd6321bb3ee76b3c9d.zip |
make host access controls case insensitive
-rw-r--r-- | access.c | 3 | ||||
-rw-r--r-- | util.c | 12 |
2 files changed, 15 insertions, 0 deletions
@@ -86,6 +86,9 @@ static int access_match(char *list, char *addr, char *host) if (!list2) out_of_memory("access_match"); + strlower(list2); + if (host) strlower(host); + for (tok=strtok(list2," ,\t"); tok; tok=strtok(NULL," ,\t")) { if (match_hostname(host, tok) || match_address(addr, tok)) { free(list2); @@ -531,3 +531,15 @@ void glob_expand(char **argv, int *argc, int maxargs) (*argc) += i; #endif } + + +/******************************************************************* + convert a string to lower case +********************************************************************/ +void strlower(char *s) +{ + while (*s) { + if (isupper(*s)) *s = tolower(*s); + s++; + } +} |