1
0

901-crypt_size_hack.patch 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. --- a/src/crypt/crypt_r.c
  2. +++ b/src/crypt/crypt_r.c
  3. @@ -19,12 +19,6 @@ char *__crypt_r(const char *key, const c
  4. if (salt[0] == '$' && salt[1] && salt[2]) {
  5. if (salt[1] == '1' && salt[2] == '$')
  6. return __crypt_md5(key, salt, output);
  7. - if (salt[1] == '2' && salt[3] == '$')
  8. - return __crypt_blowfish(key, salt, output);
  9. - if (salt[1] == '5' && salt[2] == '$')
  10. - return __crypt_sha256(key, salt, output);
  11. - if (salt[1] == '6' && salt[2] == '$')
  12. - return __crypt_sha512(key, salt, output);
  13. }
  14. return __crypt_des(key, salt, output);
  15. }
  16. --- a/src/crypt/crypt_sha512.c
  17. +++ b/src/crypt/crypt_sha512.c
  18. @@ -12,6 +12,7 @@
  19. #include <stdio.h>
  20. #include <string.h>
  21. #include <stdint.h>
  22. +#if 0
  23. /* public domain sha512 implementation based on fips180-3 */
  24. /* >=2^64 bits messages are not supported (about 2000 peta bytes) */
  25. @@ -369,3 +370,4 @@ char *__crypt_sha512(const char *key, co
  26. return "*";
  27. return p;
  28. }
  29. +#endif
  30. --- a/src/crypt/crypt_blowfish.c
  31. +++ b/src/crypt/crypt_blowfish.c
  32. @@ -50,6 +50,7 @@
  33. #include <string.h>
  34. #include <stdint.h>
  35. +#if 0
  36. typedef uint32_t BF_word;
  37. typedef int32_t BF_word_signed;
  38. @@ -796,3 +797,4 @@ char *__crypt_blowfish(const char *key,
  39. return "*";
  40. }
  41. +#endif
  42. --- a/src/crypt/crypt_sha256.c
  43. +++ b/src/crypt/crypt_sha256.c
  44. @@ -13,6 +13,7 @@
  45. #include <string.h>
  46. #include <stdint.h>
  47. +#if 0
  48. /* public domain sha256 implementation based on fips180-3 */
  49. struct sha256 {
  50. @@ -320,3 +321,4 @@ char *__crypt_sha256(const char *key, co
  51. return "*";
  52. return p;
  53. }
  54. +#endif