summaryrefslogtreecommitdiffstats
path: root/source/lib/ms_fnmatch.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-05-02 23:32:09 +0000
committerJeremy Allison <jra@samba.org>2001-05-02 23:32:09 +0000
commit47b4d82536c09bffe3a0d9917fa31d935f1be7d8 (patch)
treebac13b9413440dcea87e8804c7d02dcd38842738 /source/lib/ms_fnmatch.c
parentacf32f277d1a45f49fa3bf6af82850e35df9ae5a (diff)
downloadsamba-47b4d82536c09bffe3a0d9917fa31d935f1be7d8.tar.gz
samba-47b4d82536c09bffe3a0d9917fa31d935f1be7d8.tar.xz
samba-47b4d82536c09bffe3a0d9917fa31d935f1be7d8.zip
Had to add a "pam password change" parameter (defaults to "off") and inlined
the pam password change code to ensure that existing and working password chat scripts don't break with 2.2.1. PAM password changing has to be explicitly requested. Allowed wildcards in pam password change matching (matches password chat script matching). Had to add const (sorry Tim :-) to ms_fnmatch() to stop warnings. Don't worry - the const changes are isolated and don't cause any other warnings :-). Jeremy.
Diffstat (limited to 'source/lib/ms_fnmatch.c')
-rw-r--r--source/lib/ms_fnmatch.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/lib/ms_fnmatch.c b/source/lib/ms_fnmatch.c
index b4591c7dbc4..72f61c021c3 100644
--- a/source/lib/ms_fnmatch.c
+++ b/source/lib/ms_fnmatch.c
@@ -37,9 +37,9 @@
bugger. we need a separate wildcard routine for older versions
of the protocol. This is not yet perfect, but its a lot
better thaan what we had */
-static int ms_fnmatch_lanman_core(char *pattern, char *string)
+static int ms_fnmatch_lanman_core(const char *pattern, const char *string)
{
- char *p = pattern, *n = string;
+ const char *p = pattern, *n = string;
char c;
if (strcmp(p,"?")==0 && strcmp(n,".")==0) goto match;
@@ -118,7 +118,7 @@ next:
return 0;
}
-static int ms_fnmatch_lanman1(char *pattern, char *string)
+static int ms_fnmatch_lanman1(const char *pattern, const char *string)
{
if (!strpbrk(pattern, "?*<>\"")) {
if (strcmp(string,"..") == 0) string = ".";
@@ -142,9 +142,9 @@ static int ms_fnmatch_lanman1(char *pattern, char *string)
Returns 0 on match, -1 on fail.
*/
-int ms_fnmatch(char *pattern, char *string)
+int ms_fnmatch(const char *pattern, const char *string)
{
- char *p = pattern, *n = string;
+ const char *p = pattern, *n = string;
char c;
extern int Protocol;