[PATCH] New configure option --disable-libcrypt.

Florian Weimer fweimer@redhat.com
Tue Apr 17 10:21:00 GMT 2018


On 04/16/2018 05:56 PM, Zack Weinberg wrote:

> Let me see if I understand what you have in mind:  In
> --disable-libcrypt mode, we would preserve _XOPEN_CRYPT, with value 1,
> and the prototype for crypt in unistd.h.

My main proposal is preserving the prototype for crypt, under 
_GNU_SOURCE if necessary (without defining _XOPEN_CRYPT).

I just don't see value in the friction caused by dropping the definition.

> We would also preserve the
> prototypes for encrypt and setkey, but maybe with
> __attribute__((deprecated)).

I'm less concerned about these two functions.  We can do there whatever 
we think is best from a standard compliance perspective, I think.  There 
simply aren't enough users to make a difference, I think.  This is very 
different for the crypt function.

> We just wouldn't provide crypt.h or libcrypt.

Exactly.

> It's not a conformance violation for us to continue
> defining _XOPEN_CRYPT as 1 because, as long as you get libcrypt from
> _somewhere_, it will work at runtime.  Is that right?

Right.

It could still be a conformance violation for setkey/encrypt because 
current libxcrypt (at least the version in Fedora) does not provide the 
functions anymore for linking:

$ eu-readelf --symbols=.dynsym /lib64/libcrypt.so.1 | grep encrypt
    38: 000000000000b330     20 FUNC    GLOBAL DEFAULT       12 
encrypt_r@GLIBC_2.2.5
    52: 000000000000b360     16 FUNC    GLOBAL DEFAULT       12 
encrypt@GLIBC_2.2.5

Thanks,
Florian



More information about the Libc-alpha mailing list