[RFC] FIPS compliance and other crypt(3) improvements

Alexandre Oliva aoliva@redhat.com
Wed May 23 11:18:00 GMT 2012


On May 18, 2012, Roland McGrath <roland@hack.frob.com> wrote:

>> On May 15, 2012, Roland McGrath <roland@hack.frob.com> wrote:
>> 
>> > ENOSYS is the error code for a function that is entirely unimplemented.
>> 
>> It's the only POSIX-documented error code for crypt.  That's why I went
>> with it.

> It's a general part of POSIX that functions can return different errno
> codes than the ones listed.

Aha!  Ok, then.  The description for ENOSYS under crypt still fit, but
given your comment, I'm now going with EINVAL for this case.

> I'm not at all convinced that sysconf is the right place for such an
> extension.

Okiedokie, I've dropped the sysconf change, and implemented
fips_enabled_p using identical logic in a new fips-private.h header in
sysdeps.

I also used bool rather than int for newly-introduced return types.

Here are the two revised patches, down from three, because I'm not
longer changing sysconf.  How are these?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: crypt-badsalt-bz811753.patch
Type: text/x-diff
Size: 6058 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20120523/3078b435/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: crypt-fipsalgo-bz811753.patch
Type: text/x-diff
Size: 4106 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20120523/3078b435/attachment-0001.bin>
-------------- next part --------------


-- 
Alexandre Oliva, freedom fighter    http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/   FSF Latin America board member
Free Software Evangelist      Red Hat Brazil Compiler Engineer


More information about the Libc-alpha mailing list