Bug 69771 - crypt may return EPERM and/or EINVAL
Summary: crypt may return EPERM and/or EINVAL
Status: RESOLVED CODE_FIX
Alias: None
Product: Documentation
Classification: Unclassified
Component: man-pages (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: documentation_man-pages@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-31 19:40 UTC by KOSAKI Motohiro
Modified: 2014-02-26 17:02 UTC (History)
1 user (show)

See Also:
Kernel Version:
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description KOSAKI Motohiro 2014-01-31 19:40:34 UTC
http://man7.org/linux/man-pages/man3/crypt.3.html

crypt(3) man page only has a description about ENOSYS. However current glibc may return EPERM and EINVAL too.
I'd suggest to add following description

EPERM: If /proc/sys/crypto/fips_enabled is turned on and try to use weak crypt type, such as DES.
EINVAL: salt argument has wrong format.


Thanks.
Comment 1 Michael Kerrisk 2014-02-26 16:34:09 UTC
Thanks, for the report Motohiro. I added these texts:

       EINVAL salt has the wrong format.

       EPERM  /proc/sys/crypto/fips_enabled has a nonzero value, and an
              attempt  was  made to use a weak encryption type, such as
              DES.

Okay?

Just for future reports: to help me verify details, pointers to the relevant source files would save me doing some hunting. (I did find them after a little searching, in this case)
Comment 2 KOSAKI Motohiro 2014-02-26 17:02:58 UTC
>Thanks, for the report Motohiro. I added these texts:
>
>       EINVAL salt has the wrong format.
>
>       EPERM  /proc/sys/crypto/fips_enabled has a nonzero value, and an
>              attempt  was  made to use a weak encryption type, such as
>              DES.
>
>Okay?

Yes, thanks.


>Just for future reports: to help me verify details, pointers to the relevant
>>source files would save me doing some hunting. (I did find them after a
>little >searching, in this case)

Oops. Sorry about that. Yes, I'll do that.

Note You need to log in before you can comment on or make changes to this bug.