208 lines
4.3 KiB
HTML
208 lines
4.3 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of CRYPT_CHECKSALT</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>CRYPT_CHECKSALT</H1>
|
|
Section: C Library Functions (3)<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
<BR>BSD mandoc<BR>
|
|
libxcrypt
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
<B>crypt_checksalt</B>
|
|
|
|
- validate a crypt setting string
|
|
|
|
<A NAME="lbAC"> </A>
|
|
<H2>LIBRARY</H2>
|
|
|
|
Lb libcrypt
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
In crypt.h
|
|
|
|
Ft int
|
|
|
|
Fo crypt_checksalt
|
|
|
|
Fa const char *setting
|
|
|
|
Fc <A NAME="lbAE"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
|
|
|
|
<B></B>
|
|
|
|
|
|
checks the
|
|
<I>setting</I>
|
|
|
|
string against the system configuration
|
|
and reports whether the hashing method and parameters it specifies
|
|
are acceptable.
|
|
It is intended to be used by programs
|
|
such as
|
|
<A HREF="/cgi-bin/man/man2html?1+login">login</A>(1)
|
|
|
|
|
|
to determine whether the user's passphrase should be re-hashed
|
|
using the currently preferred hashing method.
|
|
<A NAME="lbAF"> </A>
|
|
<H2>RETURN VALUES</H2>
|
|
|
|
The return value is 0 if there is nothing wrong with this setting.
|
|
Otherwise, it is one of the following constants:
|
|
<DL COMPACT>
|
|
<P>
|
|
|
|
<DT id="1"><B>CRYPT_SALT_OK</B>
|
|
|
|
|
|
<DD>
|
|
<I>setting</I>
|
|
|
|
is a fully correct setting string.
|
|
This constant is guaranteed to equal 0.
|
|
<DT id="2"><B>CRYPT_SALT_INVALID</B>
|
|
|
|
|
|
<DD>
|
|
<I>setting</I>
|
|
|
|
is not a valid setting string; either it specifies a hashing method
|
|
that is not known to this version of libxcrypt,
|
|
or it specifies invalid parameters for the method.
|
|
<DT id="3"><B>CRYPT_SALT_METHOD_DISABLED (Not implemented, yet)</B>
|
|
|
|
|
|
<DD>
|
|
<I>setting</I>
|
|
|
|
specifies a hashing method that is no longer allowed to be used at all;
|
|
<B>crypt</B>
|
|
|
|
will fail if passed this
|
|
<I>setting</I>
|
|
|
|
|
|
Manual intervention will be required to reactivate the user's account.
|
|
<DT id="4"><B>CRYPT_SALT_METHOD_LEGACY (Not implemented, yet)</B>
|
|
|
|
|
|
<DD>
|
|
<I>setting</I>
|
|
|
|
specifies a hashing method that is no longer considered strong enough
|
|
for use with new passphrases.
|
|
<B>crypt</B>
|
|
|
|
will still authenticate a passphrase against this setting,
|
|
but if authentication succeeds,
|
|
the passphrase should be re-hashed using the currently preferred method.
|
|
<DT id="5"><B>CRYPT_SALT_TOO_CHEAP (Not implemented, yet)</B>
|
|
|
|
|
|
<DD>
|
|
<I>setting</I>
|
|
|
|
specifies cost parameters that are considered too cheap for use with
|
|
new passphrases.
|
|
<B>crypt</B>
|
|
|
|
will still authenticate a passphrase against this setting,
|
|
but if authentication succeeds,
|
|
the passphrase should be re-hashed using the currently preferred method.
|
|
</DL>
|
|
<P>
|
|
|
|
<A NAME="lbAG"> </A>
|
|
<H2>FEATURE TEST MACROS</H2>
|
|
|
|
In crypt.h
|
|
|
|
will define the macro
|
|
<B>CRYPT_CHECKSALT_AVAILABLE</B>
|
|
|
|
if
|
|
<B></B>
|
|
|
|
|
|
is available in the current version of libxcrypt.
|
|
<A NAME="lbAH"> </A>
|
|
<H2>BUGS</H2>
|
|
|
|
Since full configurability is not yet implemented, the current
|
|
implementation will only ever return
|
|
<B>CRYPT_SALT_OK (0)</B>
|
|
|
|
or
|
|
<B>CRYPT_SALT_INVALID</B>
|
|
|
|
when invoked.
|
|
<A NAME="lbAI"> </A>
|
|
<H2>PORTABILITY NOTES</H2>
|
|
|
|
The function
|
|
<B></B>
|
|
|
|
|
|
is not part of any standard.
|
|
It was added to libxcrypt in version 4.3.0.
|
|
<A NAME="lbAJ"> </A>
|
|
<H2>ATTRIBUTES</H2>
|
|
|
|
For an explanation of the terms used in this section, see
|
|
<A HREF="/cgi-bin/man/man2html?7+attributes">attributes</A>(7).
|
|
|
|
|
|
<TABLE BORDER>
|
|
<TR VALIGN=top><TD><B>Interface</B></TD><TD><B>Attribute</B></TD><TD><B>Value</B><BR></TD></TR>
|
|
<TR VALIGN=top><TD>
|
|
<B></B>
|
|
|
|
|
|
</TD><TD>Thread safety</TD><TD>MT-Safe<BR></TD></TR>
|
|
</TABLE>
|
|
|
|
<P>
|
|
<A NAME="lbAK"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<A HREF="/cgi-bin/man/man2html?3+crypt">crypt</A>(3),
|
|
|
|
|
|
crypt_gensalt3,
|
|
|
|
|
|
<A HREF="/cgi-bin/man/man2html?5+crypt">crypt</A>(5)
|
|
|
|
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="6"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="7"><A HREF="#lbAC">LIBRARY</A><DD>
|
|
<DT id="8"><A HREF="#lbAD">SYNOPSIS</A><DD>
|
|
<DT id="9"><A HREF="#lbAE">DESCRIPTION</A><DD>
|
|
<DT id="10"><A HREF="#lbAF">RETURN VALUES</A><DD>
|
|
<DT id="11"><A HREF="#lbAG">FEATURE TEST MACROS</A><DD>
|
|
<DT id="12"><A HREF="#lbAH">BUGS</A><DD>
|
|
<DT id="13"><A HREF="#lbAI">PORTABILITY NOTES</A><DD>
|
|
<DT id="14"><A HREF="#lbAJ">ATTRIBUTES</A><DD>
|
|
<DT id="15"><A HREF="#lbAK">SEE ALSO</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:38 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|