Deleted Added
full compact
auth.c (174870) auth.c (231994)
1/*-
2 * Copyright (c) 1996 - 2001 Brian Somers <brian@Awfulhak.org>
3 * based on work by Toshiharu OHNO <tony-o@iij.ad.jp>
4 * Internet Initiative Japan, Inc (IIJ)
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

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

20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 *
1/*-
2 * Copyright (c) 1996 - 2001 Brian Somers <brian@Awfulhak.org>
3 * based on work by Toshiharu OHNO <tony-o@iij.ad.jp>
4 * Internet Initiative Japan, Inc (IIJ)
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

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

20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 *
28 * $FreeBSD: head/usr.sbin/ppp/auth.c 174870 2007-12-22 19:29:32Z des $
28 * $FreeBSD: head/usr.sbin/ppp/auth.c 231994 2012-02-22 06:27:20Z kevlo $
29 */
30
31#include <sys/param.h>
32#include <netinet/in.h>
33#include <netinet/in_systm.h>
34#include <netinet/ip.h>
35#include <sys/socket.h>
36#include <sys/un.h>

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

121static int
122auth_CheckPasswd(const char *name, const char *data, const char *key)
123{
124 if (!strcmp(data, "*")) {
125#ifdef NOPAM
126 /* Then look up the real password database */
127 struct passwd *pw;
128 int result;
29 */
30
31#include <sys/param.h>
32#include <netinet/in.h>
33#include <netinet/in_systm.h>
34#include <netinet/ip.h>
35#include <sys/socket.h>
36#include <sys/un.h>

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

121static int
122auth_CheckPasswd(const char *name, const char *data, const char *key)
123{
124 if (!strcmp(data, "*")) {
125#ifdef NOPAM
126 /* Then look up the real password database */
127 struct passwd *pw;
128 int result;
129 char *cryptpw;
129
130
131 cryptpw = crypt(key, pw->pw_passwd);
130 result = (pw = getpwnam(name)) &&
132 result = (pw = getpwnam(name)) &&
131 !strcmp(crypt(key, pw->pw_passwd), pw->pw_passwd);
133 (cryptpw == NULL || !strcmp(cryptpw, pw->pw_passwd));
132 endpwent();
133 return result;
134#else /* !NOPAM */
135 /* Then consult with PAM. */
136 pam_handle_t *pamh;
137 int status;
138
139 struct pam_conv pamc = {

--- 340 unchanged lines hidden ---
134 endpwent();
135 return result;
136#else /* !NOPAM */
137 /* Then consult with PAM. */
138 pam_handle_t *pamh;
139 int status;
140
141 struct pam_conv pamc = {

--- 340 unchanged lines hidden ---