]> git.pld-linux.org Git - packages/proftpd.git/commitdiff
- removed old patch (only {crypt} support), added new patch (3 auth schemes
authoradasi <adasi@pld-linux.org>
Sat, 16 Aug 2003 19:13:08 +0000 (19:13 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
   for vmail-sql system).
 - Probably nobody's using it except for me, and I'm currently unable to check
   it, so I'll drop it if it's bad

Changed files:
    proftpd-vmail.patch -> 1.1
    proftpd-vmail_crypt.patch -> 1.2

proftpd-vmail.patch [new file with mode: 0644]
proftpd-vmail_crypt.patch [deleted file]

diff --git a/proftpd-vmail.patch b/proftpd-vmail.patch
new file mode 100644 (file)
index 0000000..cefeffc
--- /dev/null
@@ -0,0 +1,48 @@
+--- proftpd-1.2.5/contrib/mod_sql.c    Thu Jan  9 17:30:41 2003
++++ proftpd-1.2.5/contrib/mod_sql.c    Thu Jan  9 17:30:33 2003
+@@ -517,6 +517,26 @@
+ }
+ #endif
++static modret_t *check_auth_vmail(cmd_rec * cmd, const char *c_clear,
++                                 const char *c_hash)
++{
++  int success = 0;
++  char * tmphash;
++  tmphash=c_hash
++  while (!((*tmphash=='\0')||(*tmphash=='}'))) tmphash++;
++  if (*tmphash =='}') tmphash++;
++  if (*tmphash == '\0') return ERROR_INT(cmd,AUTH_BADPWD);
++  if (!strncmp(c_hash,"{plaintext}",11))
++    if (!strcmp(tmphash,c_clear)) return HANDLED(cmd);
++  if (!strncmp(c_hash,"{crypt-md5}",11))
++    if (!strcmp(tmphash,crypt(c_clear, tmphash))) return HANDLED(cmd);
++  // not sure about that
++  if (!strncmp(c_hash,"{crypt},7"))
++    if (!strcmp(tmphash,crypt(c_clear, tmphash))) return HANDLED(cmd);
++  // add other types (md5 etc.)  
++  return ERROR_INT(cmd,AUTH_BADPWD);
++}
++
+ /*
+  * support for general-purpose authentication schemes 
+  */
+@@ -528,6 +548,8 @@
+ #ifdef HAVE_OPENSSL
+ #define OPENSSL_AUTH_FLAG       1<<4
+ #endif
++#define VMAIL_AUTH_FLAG   1<<5
++
+ typedef modret_t *(*auth_func_ptr) (cmd_rec *, const char *, const char *);
+@@ -546,6 +568,9 @@
+ #ifdef HAVE_OPENSSL
+   {"OpenSSL", check_auth_openssl, OPENSSL_AUTH_FLAG},
+ #endif
++  {"VMail", check_auth_vmail, VMAIL_AUTH_FLAG},
++  // backwards compatibility, somebody's using it? 
++  {"VMail_Crypt", check_auth_vmail, VMAIL_AUTH_FLAG},
+   /*
+    * add additional encryption types below 
+    */
diff --git a/proftpd-vmail_crypt.patch b/proftpd-vmail_crypt.patch
deleted file mode 100644 (file)
index ac8de1c..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
---- proftpd-1.2.5/contrib/mod_sql.c    Thu Jan  9 17:30:41 2003
-+++ proftpd-1.2.5/contrib/mod_sql.c    Thu Jan  9 17:30:33 2003
-@@ -527,6 +527,19 @@
- }
- #endif
-+static modret_t *check_auth_vmail_crypt(cmd_rec * cmd, const char *c_clear,
-+                                const char *c_hash)
-+{
-+  int success = 0;
-+  while (!((*c_hash=='\0')||(*c_hash=='}'))) c_hash++;
-+  if (*c_hash =='}') c_hash++;
-+  if (*c_hash == '\0') return ERROR_INT(cmd,AUTH_BADPWD);
-+
-+  success = !strcmp((char *) crypt(c_clear, c_hash), c_hash);
-+
-+  return success ? HANDLED(cmd) : ERROR_INT(cmd,AUTH_BADPWD);
-+}
-+
- /*
-  * support for general-purpose authentication schemes 
-  */
-@@ -538,6 +551,7 @@
- #ifdef HAVE_OPENSSL
- #define OPENSSL_AUTH_FLAG       1<<4
- #endif
-+#define VMAILCRYPT_AUTH_FLAG  1<<5
- typedef modret_t *(*auth_func_ptr) (cmd_rec *, const char *, const char *);
-@@ -557,6 +571,7 @@
- #ifdef HAVE_OPENSSL
-   {"OpenSSL", check_auth_openssl, OPENSSL_AUTH_FLAG},
- #endif
-+  {"VMail_Crypt", check_auth_vmail_crypt, VMAILCRYPT_AUTH_FLAG},
-   /*
-    * add additional encryption types below 
-    */
This page took 0.176428 seconds and 4 git commands to generate.