[008-make_scrambled_password.dpatch] (closes: Bug#356064, Bug#346192, Bug#346194)
* Adjust config parser data type for _Port to int, thanks to Lehel
Bernadt <lehel@pmc-services.hu> [009-port-int.dpatch] (closes: Bug#356147)
+ * Provide an Apache authentication method, thanks to Andreas Barth
+ <aba@not.so.argh.org> [010-enctype-apache.dpatch] (closes: Bug#287547)
--
--- /dev/null
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 010-enctype-apache.dpatch by Andreas Barth <aba@not.so.argh.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Provide an Apache authentication method
+
+@DPATCH@
+diff -urNad mod-auth-mysql~/DIRECTIVES mod-auth-mysql/DIRECTIVES
+--- mod-auth-mysql~/DIRECTIVES 2008-05-14 16:59:28.000000000 +0200
++++ mod-auth-mysql/DIRECTIVES 2008-05-15 09:49:06.000000000 +0200
+@@ -203,6 +203,10 @@
+
+ MySQL
+ The hashing scheme used by the MySQL PASSWORD() function.
++
++ Apache
++ The hashing scheme used by htpasswd utility. Compatible to
++ authuserfile.
+
+ AuthMySQL_Encryption_Types <type_list>
+ Synonym for Auth_MySQL_Encryption_Types.
+diff -urNad mod-auth-mysql~/mod_auth_mysql.c mod-auth-mysql/mod_auth_mysql.c
+--- mod-auth-mysql~/mod_auth_mysql.c 2008-05-14 18:46:21.000000000 +0200
++++ mod-auth-mysql/mod_auth_mysql.c 2008-05-15 09:49:06.000000000 +0200
+@@ -102,6 +102,7 @@
+ #define CRYPT_ENCRYPTION_FLAG 1<<5
+ #endif
+ #define SHA1SUM_ENCRYPTION_FLAG 1<<6
++#define APACHE_ENCRYPTION_FLAG 1<<7
+
+ static int check_no_encryption(const char *passwd, char *enc_passwd)
+ {
+@@ -235,6 +236,11 @@
+ return (!strcmp(scrambled_passwd, enc_passwd));
+ }
+
++static int check_apache_encryption(const char *passwd, char *enc_passwd)
++{
++ return (!ap_validate_password(passwd, enc_passwd));
++}
++
+ typedef struct {
+ char *name;
+ int (*check_function)(const char *passwd, char *enc_passwd);
+@@ -253,6 +259,7 @@
+ { "Crypt", check_crypt_encryption, CRYPT_ENCRYPTION_FLAG },
+ { "PHP_MD5", check_PHP_MD5_encryption, PHP_MD5_ENCRYPTION_FLAG },
+ { "SHA1Sum", check_SHA1Sum_encryption, SHA1SUM_ENCRYPTION_FLAG},
++ { "Apache", check_apache_encryption, APACHE_ENCRYPTION_FLAG },
+ /* add additional encryption types below */
+ { NULL, NULL, 0 }
+ };