diff options
author | Todd C. Miller <Todd.Miller@courtesan.com> | 1996-06-04 23:57:30 +0000 |
---|---|---|
committer | Todd C. Miller <Todd.Miller@courtesan.com> | 1996-06-04 23:57:30 +0000 |
commit | ddc99c3aa03f52192f38a98f9742f3cc5b123d60 (patch) | |
tree | 4bef85bf5a93f36cc05084f71acd8ceb0175f2d1 /parse.c | |
parent | 12ba000682ce67563f7eef0b475befb7f0ffdc10 (diff) | |
download | sudo-ddc99c3aa03f52192f38a98f9742f3cc5b123d60.tar.gz |
now always uses fnmatch to match args
Diffstat (limited to 'parse.c')
-rw-r--r-- | parse.c | 12 |
1 files changed, 3 insertions, 9 deletions
@@ -428,15 +428,9 @@ static int compare_args(user_args, sudoers_args) char **ua, **sa; for (ua=user_args, sa=sudoers_args; *ua && *sa; ua++, sa++) { - /* only do wildcard match if there are meta chars */ - /* XXX - is this really any faster than fnmatch() for all? */ - if (has_meta(*sa)) { - if (fnmatch(*sa, *ua, FNM_PATHNAME)) - return(FALSE); - } else { - if (strcmp(*sa, *ua)) - return(FALSE); - } + /* Match and honor wildcards */ + if (fnmatch(*sa, *ua, FNM_PATHNAME) != 0) + return(FALSE); } /* |