/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
* Copyright (c) 2000 Brian Fundakowski Feldman
* All rights reserved.
*
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
- * $FreeBSD$
*/
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
#include <sys/types.h>
#include <login_cap.h>
+#include <stdio.h>
+#include <stdlib.h>
#include <unistd.h>
-#pragma weak crypt_set_format
-int
-crypt_set_format(const char *f) {
- return (0);
-}
-
const char *
login_setcryptfmt(login_cap_t *lc, const char *def, const char *error) {
const char *cipher;
cipher = login_getcapstr(lc, "passwd_format", def, NULL);
+ if (getenv("CRYPT_DEBUG") != NULL)
+ fprintf(stderr, "login_setcryptfmt: "
+ "passwd_format = %s\n", cipher);
if (cipher == NULL)
return (error);
if (!crypt_set_format(cipher))