summaryrefslogtreecommitdiffstats
path: root/source/lib/ms_fnmatch.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-05-02 23:32:19 +0000
committerJeremy Allison <jra@samba.org>2001-05-02 23:32:19 +0000
commit05fe1233deb648f8c77218b9a4e277bade5bd831 (patch)
treedff3fc21d7249ef14e29107cd7f7a7b95ea6e626 /source/lib/ms_fnmatch.c
parentc92f869b7edc27bd7534eaf903431524d9c2e1d2 (diff)
downloadsamba-05fe1233deb648f8c77218b9a4e277bade5bd831.tar.gz
samba-05fe1233deb648f8c77218b9a4e277bade5bd831.tar.xz
samba-05fe1233deb648f8c77218b9a4e277bade5bd831.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 4b1545bda1b..87e40049e05 100644
--- a/source/lib/ms_fnmatch.c
+++ b/source/lib/ms_fnmatch.c
@@ -30,9 +30,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;
@@ -111,7 +111,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 = ".";
@@ -135,9 +135,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;