libcrypt-util: use build-time check for crypt_preferred_method
After https://github.com/systemd/systemd/pull/16981 only the presence of crypt_gensalt_ra is checked, but there are cases where that function is available but crypt_preferred_method is not, and they are used in the same ifdef. Add a check for the latter as well.
This commit is contained in:
committed by
Lennart Poettering
parent
78d411cb97
commit
feee7f6288
@@ -40,7 +40,11 @@ int make_salt(char **ret) {
|
||||
|
||||
e = secure_getenv("SYSTEMD_CRYPT_PREFIX");
|
||||
if (!e)
|
||||
#if HAVE_CRYPT_PREFERRED_METHOD
|
||||
e = crypt_preferred_method();
|
||||
#else
|
||||
e = "$6$";
|
||||
#endif
|
||||
|
||||
log_debug("Generating salt for hash prefix: %s", e);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user