Deleted Added
full compact
auth-passwd.c (303975) auth-passwd.c (322343)
1/* $OpenBSD: auth-passwd.c,v 1.44 2014/07/15 15:54:14 millert Exp $ */
2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
5 * All rights reserved
6 * Password authentication. This file contains the functions to check whether
7 * the password is valid for the user.
8 *

--- 52 unchanged lines hidden (view full) ---

61#ifdef HAVE_LOGIN_CAP
62extern login_cap_t *lc;
63#endif
64
65
66#define DAY (24L * 60 * 60) /* 1 day in seconds */
67#define TWO_WEEKS (2L * 7 * DAY) /* 2 weeks in seconds */
68
1/* $OpenBSD: auth-passwd.c,v 1.44 2014/07/15 15:54:14 millert Exp $ */
2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
5 * All rights reserved
6 * Password authentication. This file contains the functions to check whether
7 * the password is valid for the user.
8 *

--- 52 unchanged lines hidden (view full) ---

61#ifdef HAVE_LOGIN_CAP
62extern login_cap_t *lc;
63#endif
64
65
66#define DAY (24L * 60 * 60) /* 1 day in seconds */
67#define TWO_WEEKS (2L * 7 * DAY) /* 2 weeks in seconds */
68
69#define MAX_PASSWORD_LEN 1024
70
69void
70disable_forwarding(void)
71{
72 no_port_forwarding_flag = 1;
73 no_agent_forwarding_flag = 1;
74 no_x11_forwarding_flag = 1;
75}
76

--- 5 unchanged lines hidden (view full) ---

82auth_password(Authctxt *authctxt, const char *password)
83{
84 struct passwd * pw = authctxt->pw;
85 int result, ok = authctxt->valid;
86#if defined(USE_SHADOW) && defined(HAS_SHADOW_EXPIRE)
87 static int expire_checked = 0;
88#endif
89
71void
72disable_forwarding(void)
73{
74 no_port_forwarding_flag = 1;
75 no_agent_forwarding_flag = 1;
76 no_x11_forwarding_flag = 1;
77}
78

--- 5 unchanged lines hidden (view full) ---

84auth_password(Authctxt *authctxt, const char *password)
85{
86 struct passwd * pw = authctxt->pw;
87 int result, ok = authctxt->valid;
88#if defined(USE_SHADOW) && defined(HAS_SHADOW_EXPIRE)
89 static int expire_checked = 0;
90#endif
91
92 if (strlen(password) > MAX_PASSWORD_LEN)
93 return 0;
94
90#ifndef HAVE_CYGWIN
91 if (pw->pw_uid == 0 && options.permit_root_login != PERMIT_YES)
92 ok = 0;
93#endif
94 if (*password == '\0' && options.permit_empty_passwd == 0)
95 return 0;
96
97#ifdef KRB5

--- 119 unchanged lines hidden ---
95#ifndef HAVE_CYGWIN
96 if (pw->pw_uid == 0 && options.permit_root_login != PERMIT_YES)
97 ok = 0;
98#endif
99 if (*password == '\0' && options.permit_empty_passwd == 0)
100 return 0;
101
102#ifdef KRB5

--- 119 unchanged lines hidden ---