Our dummy crypt_set_format() needs to be exported, otherwise it will
be resolved at link time instead of load time, preventing the real
crypt_set_format() in libcrypt from replacing it when present.
PR: 288677
Fixes: 0c381b7f0570
Differential D51746
libutil: Fix login_setcryptfmt() des on Tue, Aug 5, 5:15 PM. Authored by Tags None Referenced Files
Details
Our dummy crypt_set_format() needs to be exported, otherwise it will PR: 288677
Diff Detail
Event TimelineComment Actions Why did you put the symbol into the private namespace? It is supposed to participate in interposing with libcrypt, and apps binaries would record a reference to the symbol, am I right? I believe it must be guaranteed to be stable (as in stable ABI). libcrypt is not versioned, so the interposing mechanism there is somewhat strengthened, but ok. Comment Actions The stub does not need to be public. Its only purpose is to avoid forcing programs that link with libutil but don't use login_setcryptfmt() to also link with libcrypt. An alternate solution would be to drop the stub and have login_setcryptfmt() use dlfunc() to find crypt_set_format(). |