]> git.pld-linux.org Git - packages/pure-ftpd.git/blob - pure-ftpd-mysql.patch
- up to 1.0.30
[packages/pure-ftpd.git] / pure-ftpd-mysql.patch
1 commit 63b772af295acf572b25118c0bd62735a3eb09b9
2 Author: Frank DENIS <github@pureftpd.org>
3 Date:   Sat Apr 2 17:40:53 2011 +0200
4
5     Use my_make_scrambled_password() instead of make_scrambled_password()
6     if available.
7     make_scrambled_password() is not exported anymore in Fedora, but as
8     Arkadiusz Miskiewicz pointed out, my_make_scrambled_password() recently is.
9
10 diff --git a/configure.ac b/configure.ac
11 index 4b7afe7..937c15f 100644
12 --- a/configure.ac
13 +++ b/configure.ac
14 @@ -1216,10 +1216,10 @@ AC_ARG_WITH(mysql,
15        }
16        ]])],[],[
17          AC_MSG_RESULT(no)
18 -        AC_MSG_ERROR(Your MySQL client libraries aren't properly installed)      
19 +        AC_MSG_ERROR(Your MySQL client libraries aren't properly installed)
20      ],[])
21      AC_MSG_RESULT(yes)
22 -    AC_CHECK_FUNCS(mysql_real_escape_string)
23 +    AC_CHECK_FUNCS(mysql_real_escape_string my_make_scrambled_password)
24    fi ])
25  
26  AC_ARG_WITH(pgsql,
27 diff --git a/src/log_mysql.c b/src/log_mysql.c
28 index c6202fe..2d9eafd 100644
29 --- a/src/log_mysql.c
30 +++ b/src/log_mysql.c
31 @@ -451,7 +451,12 @@ void pw_mysql_check(AuthResult * const result,
32  # if MYSQL_VERSION_ID >= 40100 && MYSQL_VERSION_ID < 40101
33          make_scrambled_password(scrambled_password, password, 1, NULL);
34  # else
35 +#  ifdef HAVE_MY_MAKE_SCRAMBLED_PASSWORD
36 +        my_make_scrambled_password(scrambled_password, password,
37 +                                   strlen(password));
38 +#  else
39          make_scrambled_password(scrambled_password, password);
40 +#  endif
41  # endif
42  #endif
43          if (strcmp(scrambled_password, spwd) == 0) {
This page took 0.309167 seconds and 3 git commands to generate.