]> git.sur5r.net Git - openldap/blobdiff - contrib/slapd-modules/passwd/apr1.c
Merge remote-tracking branch 'origin/mdb.master' into OPENLDAP_REL_ENG_2_4
[openldap] / contrib / slapd-modules / passwd / apr1.c
index 2078e57fa844027c309850793f244e988936e526..ce7b8c76322f4cccff24ab225d1fb2a7b42af52f 100644 (file)
@@ -1,3 +1,4 @@
+/* $OpenLDAP$ */\r
 /*\r
  * This file is derived from OpenLDAP Software. All of the modifications to\r
  * OpenLDAP Software represented in the following file were developed by\r
@@ -8,12 +9,14 @@
  * notice:\r
  *\r
  * Copyright 2011 Devin J. Pohly\r
+ * Portions Copyright 2011 Howard Chu\r
  * Redistribution and use in source and binary forms, with or without\r
  * modification, are permitted only as authorized by the OpenLDAP Public\r
  * License. \r
  *\r
  * A portion of this code is used in accordance with the Beer-ware License,\r
  * revision 42, as noted.\r
+ *\r
  */\r
 #include <lber.h>\r
 #include <lber_pvt.h>\r
@@ -109,7 +112,6 @@ static void do_phk_hash(
 }\r
 \r
 static int chk_phk(\r
-       const struct berval *scheme,\r
        const struct berval *magic,\r
        const struct berval *passwd,\r
        const struct berval *cred,\r
@@ -141,7 +143,6 @@ static int chk_phk(
        salt.bv_val = (char *) &orig_pass[sizeof(digest)];\r
        salt.bv_len = rc - sizeof(digest);\r
 \r
-       /* the only difference between this and straight PHK is the magic */\r
        do_phk_hash(cred, magic, &salt, digest);\r
 \r
        if (text)\r
@@ -159,7 +160,7 @@ static int chk_apr1(
        const struct berval *cred,\r
        const char **text)\r
 {\r
-       return chk_phk(scheme, &magic_apr1, passwd, cred, text);\r
+       return chk_phk(&magic_apr1, passwd, cred, text);\r
 }\r
 \r
 static int chk_bsdmd5(\r
@@ -168,7 +169,7 @@ static int chk_bsdmd5(
        const struct berval *cred,\r
        const char **text)\r
 {\r
-       return chk_phk(scheme, &magic_bsdmd5, passwd, cred, text);\r
+       return chk_phk(&magic_bsdmd5, passwd, cred, text);\r
 }\r
 \r
 static int hash_phk(\r