|
Bugzilla – Full Text Bug Listing |
| Summary: | fnmatch on MacOS X (and other BSD OSes) doesn't accept character classes | ||
|---|---|---|---|
| Product: | Sudo | Reporter: | bowman+sudo |
| Component: | Configure | Assignee: | Todd C. Miller <Todd.Miller> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | normal | ||
| Version: | 1.8.3 | ||
| Hardware: | Macintosh | ||
| OS: | MacOS X | ||
You should really file a bug with Apple. I added support for character classes in the BSD fnmatch and glob functions a few years ago in OpenBSD (and in the versions shipped with sudo). However, I've made a change to only run the regression tests in the compat dir when we are using the functions shipped with sudo and not against the system versions. That will quiet "make check" on MacOS X. |
The fnm_test fails because fnmatch on MacOS X 10.5 doesn't support character classes. The failure is: fnmatch: /bin/[[:opper:][:alnum:]]* /bin/ls 0: want 1, got 2 fnmatch: 5 tests run, 1 errors, 80% success rate From the MacOS X fnmatch(3) man page: STANDARDS The current implementation of the fnmatch() function does not conform to IEEE Std 1003.2 (``POSIX.2''). Collating symbol expressions, equivalence class expressions and character class expressions are not supported.