forked from pool/glibc
089d1e31ae
- use symbol version OW_CRYPT_1.0 for the Owl extensions (crypt_r[an], crypt_gensalt.*) - refactor sha2 gensalt patch - document sha2 hashes in man page - fix signature of sha2 functions OBS-URL: https://build.opensuse.org/request/show/79998 OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=96
54 lines
1.4 KiB
Diff
54 lines
1.4 KiB
Diff
Index: crypt_blowfish-1.2/wrapper.c
|
|
===================================================================
|
|
--- crypt_blowfish-1.2/wrapper.c
|
|
+++ crypt_blowfish-1.2/wrapper.c
|
|
@@ -38,6 +38,7 @@
|
|
#define CRYPT_GENSALT_OUTPUT_SIZE (7 + 22 + 1)
|
|
|
|
#if defined(__GLIBC__) && defined(_LIBC)
|
|
+#include <shlib-compat.h>
|
|
#define __SKIP_GNU
|
|
#endif
|
|
#include "ow-crypt.h"
|
|
@@ -291,14 +292,34 @@ char *__crypt_gensalt(const char *prefix
|
|
}
|
|
|
|
#if defined(__GLIBC__) && defined(_LIBC)
|
|
-weak_alias(__crypt_rn, crypt_rn)
|
|
-weak_alias(__crypt_ra, crypt_ra)
|
|
weak_alias(__crypt_r, crypt_r)
|
|
weak_alias(__crypt, crypt)
|
|
-weak_alias(__crypt_gensalt_rn, crypt_gensalt_rn)
|
|
-weak_alias(__crypt_gensalt_ra, crypt_gensalt_ra)
|
|
-weak_alias(__crypt_gensalt, crypt_gensalt)
|
|
-weak_alias(crypt, fcrypt)
|
|
+weak_alias(__crypt, fcrypt)
|
|
+#if SHARED
|
|
+#if 1 // Owl has crypt_gensalt as GLIBC_2_0 so keep for compatibility
|
|
+#define ow_compat_symbol(name) \
|
|
+ compat_symbol(libcrypt, _compat_##name, name, GLIBC_2_0); \
|
|
+ weak_alias(__##name, _compat_##name)
|
|
+#else
|
|
+#define ow_compat_symbol(name)
|
|
+#endif
|
|
+
|
|
+#define ow_versioned(name) \
|
|
+ ow_compat_symbol(name) \
|
|
+ versioned_symbol(libcrypt, _owl_##name, name, OW_CRYPT_1_0);
|
|
+#else
|
|
+#define ow_versioned(name)
|
|
+#endif // SHARED
|
|
+
|
|
+#define ow_symbol(name) \
|
|
+ ow_versioned(name) \
|
|
+ weak_alias(__##name, _owl_##name) \
|
|
+
|
|
+ow_symbol(crypt_rn)
|
|
+ow_symbol(crypt_ra)
|
|
+ow_symbol(crypt_gensalt)
|
|
+ow_symbol(crypt_gensalt_rn)
|
|
+ow_symbol(crypt_gensalt_ra)
|
|
#endif
|
|
|
|
#ifdef TEST
|