auth-passwd.c (147005) | auth-passwd.c (149753) |
---|---|
1/* 2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * All rights reserved 5 * Password authentication. This file contains the functions to check whether 6 * the password is valid for the user. 7 * 8 * As far as I am concerned, the code I have written for this software --- 22 unchanged lines hidden (view full) --- 31 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 32 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 33 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 34 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 35 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 36 */ 37 38#include "includes.h" | 1/* 2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * All rights reserved 5 * Password authentication. This file contains the functions to check whether 6 * the password is valid for the user. 7 * 8 * As far as I am concerned, the code I have written for this software --- 22 unchanged lines hidden (view full) --- 31 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 32 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 33 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 34 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 35 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 36 */ 37 38#include "includes.h" |
39RCSID("$OpenBSD: auth-passwd.c,v 1.33 2005/01/24 11:47:13 dtucker Exp $"); 40RCSID("$FreeBSD: head/crypto/openssh/auth-passwd.c 147005 2005-06-05 15:46:09Z des $"); | 39RCSID("$OpenBSD: auth-passwd.c,v 1.34 2005/07/19 15:32:26 otto Exp $"); 40RCSID("$FreeBSD: head/crypto/openssh/auth-passwd.c 149753 2005-09-03 07:04:25Z des $"); |
41 42#include "packet.h" 43#include "buffer.h" 44#include "log.h" 45#include "servconf.h" 46#include "auth.h" 47#include "auth-options.h" 48 --- 110 unchanged lines hidden (view full) --- 159sys_auth_passwd(Authctxt *authctxt, const char *password) 160{ 161 struct passwd *pw = authctxt->pw; 162 auth_session_t *as; 163 static int expire_checked = 0; 164 165 as = auth_usercheck(pw->pw_name, authctxt->style, "auth-ssh", 166 (char *)password); | 41 42#include "packet.h" 43#include "buffer.h" 44#include "log.h" 45#include "servconf.h" 46#include "auth.h" 47#include "auth-options.h" 48 --- 110 unchanged lines hidden (view full) --- 159sys_auth_passwd(Authctxt *authctxt, const char *password) 160{ 161 struct passwd *pw = authctxt->pw; 162 auth_session_t *as; 163 static int expire_checked = 0; 164 165 as = auth_usercheck(pw->pw_name, authctxt->style, "auth-ssh", 166 (char *)password); |
167 if (as == NULL) 168 return (0); |
|
167 if (auth_getstate(as) & AUTH_PWEXPIRED) { 168 auth_close(as); 169 disable_forwarding(); 170 authctxt->force_pwchange = 1; 171 return (1); 172 } else { 173 if (!expire_checked) { 174 expire_checked = 1; --- 30 unchanged lines hidden --- | 169 if (auth_getstate(as) & AUTH_PWEXPIRED) { 170 auth_close(as); 171 disable_forwarding(); 172 authctxt->force_pwchange = 1; 173 return (1); 174 } else { 175 if (!expire_checked) { 176 expire_checked = 1; --- 30 unchanged lines hidden --- |