walters / rpms / pam

Forked from rpms/pam 5 years ago
Clone
6ccbfce
diff -up Linux-PAM-1.2.0/modules/pam_unix/pam_unix.8.xml.no-fallback Linux-PAM-1.2.0/modules/pam_unix/pam_unix.8.xml
6ccbfce
--- Linux-PAM-1.2.0/modules/pam_unix/pam_unix.8.xml.no-fallback	2015-04-27 16:38:03.000000000 +0200
6ccbfce
+++ Linux-PAM-1.2.0/modules/pam_unix/pam_unix.8.xml	2015-05-15 15:54:21.524440864 +0200
6ccbfce
@@ -284,11 +284,10 @@
7f16b85
         <listitem>
7f16b85
           <para>
7f16b85
             When a user changes their password next,
7f16b85
-            encrypt it with the SHA256 algorithm. If the
7f16b85
-            SHA256 algorithm is not known to the <citerefentry>
7f16b85
+            encrypt it with the SHA256 algorithm. The
7f16b85
+            SHA256 algorithm must be supported by the <citerefentry>
7f16b85
 	    <refentrytitle>crypt</refentrytitle><manvolnum>3</manvolnum>
7f16b85
-            </citerefentry> function,
7f16b85
-            fall back to MD5.
7f16b85
+            </citerefentry> function.
7f16b85
           </para>
7f16b85
         </listitem>
7f16b85
       </varlistentry>
6ccbfce
@@ -299,11 +298,10 @@
7f16b85
         <listitem>
7f16b85
           <para>
7f16b85
             When a user changes their password next,
7f16b85
-            encrypt it with the SHA512 algorithm. If the
7f16b85
-            SHA512 algorithm is not known to the <citerefentry>
7f16b85
+            encrypt it with the SHA512 algorithm. The
7f16b85
+            SHA512 algorithm must be supported by the <citerefentry>
7f16b85
 	    <refentrytitle>crypt</refentrytitle><manvolnum>3</manvolnum>
7f16b85
-            </citerefentry> function,
7f16b85
-            fall back to MD5.
7f16b85
+            </citerefentry> function.
7f16b85
           </para>
7f16b85
         </listitem>
7f16b85
       </varlistentry>
6ccbfce
@@ -314,11 +312,10 @@
7f16b85
         <listitem>
7f16b85
           <para>
7f16b85
             When a user changes their password next,
7f16b85
-            encrypt it with the blowfish algorithm. If the
7f16b85
-            blowfish algorithm is not known to the <citerefentry>
7f16b85
+            encrypt it with the blowfish algorithm. The
7f16b85
+            blowfish algorithm must be supported by the <citerefentry>
7f16b85
 	    <refentrytitle>crypt</refentrytitle><manvolnum>3</manvolnum>
7f16b85
-            </citerefentry> function,
7f16b85
-            fall back to MD5.
7f16b85
+            </citerefentry> function.
7f16b85
           </para>
7f16b85
         </listitem>
7f16b85
       </varlistentry>
6ccbfce
diff -up Linux-PAM-1.2.0/modules/pam_unix/passverify.c.no-fallback Linux-PAM-1.2.0/modules/pam_unix/passverify.c
6ccbfce
--- Linux-PAM-1.2.0/modules/pam_unix/passverify.c.no-fallback	2015-05-15 15:54:21.525440887 +0200
6ccbfce
+++ Linux-PAM-1.2.0/modules/pam_unix/passverify.c	2015-05-15 15:57:23.138613273 +0200
6ccbfce
@@ -437,10 +437,9 @@ PAMH_ARG_DECL(char * create_password_has
6ccbfce
 	sp = crypt(password, salt);
6ccbfce
 #endif
7f16b85
 	if (!sp || strncmp(algoid, sp, strlen(algoid)) != 0) {
6ccbfce
-		/* libxcrypt/libc doesn't know the algorithm, use MD5 */
6ccbfce
+		/* libxcrypt/libc doesn't know the algorithm, error out */
7f16b85
 		pam_syslog(pamh, LOG_ERR,
7f16b85
-			   "Algo %s not supported by the crypto backend, "
7f16b85
-			   "falling back to MD5\n",
7f16b85
+			   "Algo %s not supported by the crypto backend.\n",
7f16b85
 			   on(UNIX_BLOWFISH_PASS, ctrl) ? "blowfish" :
7f16b85
 			   on(UNIX_SHA256_PASS, ctrl) ? "sha256" :
7f16b85
 			   on(UNIX_SHA512_PASS, ctrl) ? "sha512" : algoid);
6ccbfce
@@ -450,7 +449,7 @@ PAMH_ARG_DECL(char * create_password_has
6ccbfce
 #ifdef HAVE_CRYPT_R
6ccbfce
 		free(cdata);
6ccbfce
 #endif
7f16b85
-		return crypt_md5_wrapper(password);
7f16b85
+		return NULL;
7f16b85
 	}
6ccbfce
 	sp = x_strdup(sp);
6ccbfce
 #ifdef HAVE_CRYPT_R