From 1e738dbcb04eb5f9ac7a32028dcbb5751ee76fb9 Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Wed, 6 Aug 2003 22:10:28 +0000 Subject: I am reverting this change. --- libshouldbeinlibc/ChangeLog | 5 ----- libshouldbeinlibc/idvec-verify.c | 13 ++++++++++--- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/libshouldbeinlibc/ChangeLog b/libshouldbeinlibc/ChangeLog index c2580202..fd854f6b 100644 --- a/libshouldbeinlibc/ChangeLog +++ b/libshouldbeinlibc/ChangeLog @@ -1,8 +1,3 @@ -2003-08-06 Jeroen Dekkers - - * idvec-verify.c: Remove #pragma weak crypt. - (verify_passwd): Don't check if crypt exist. - 2003-08-03 Marco Gerards * idvec-verify.c: Include . diff --git a/libshouldbeinlibc/idvec-verify.c b/libshouldbeinlibc/idvec-verify.c index f8b2f449..55d20e2c 100644 --- a/libshouldbeinlibc/idvec-verify.c +++ b/libshouldbeinlibc/idvec-verify.c @@ -1,6 +1,6 @@ /* Verify user passwords - Copyright (C) 1996,97,98,99,2002,2003 Free Software Foundation, Inc. + Copyright (C) 1996,97,98,99,2002 Free Software Foundation, Inc. Written by Miles Bader This program is free software; you can redistribute it and/or @@ -30,6 +30,8 @@ #define SHADOW_PASSWORD_STRING "x" /* pw_passwd contents for shadow passwd */ +#pragma weak crypt + static error_t verify_id (); /* FWD */ /* Get a password from the user, returning it in malloced storage. */ @@ -68,8 +70,13 @@ verify_passwd (const char *password, if (sys_encrypted[0] == '\0') return 0; /* No password. */ - /* Encrypt the password entered by the user (SYS_ENCRYPTED is the salt). */ - encrypted = crypt (password, sys_encrypted); + if (crypt) + /* Encrypt the password entered by the user (SYS_ENCRYPTED is the salt). */ + encrypted = crypt (password, sys_encrypted); + else + /* No crypt on this system! Use plain-text passwords. */ + encrypted = password; + if (! encrypted) /* Crypt failed. */ return errno; -- cgit v1.2.3