Resolve conflicts

This commit is contained in:
Kris Kennaway 2000-04-10 11:18:54 +00:00
parent 46c66b6f15
commit 0d845f9706
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=59121
13 changed files with 78 additions and 28 deletions

View File

@ -1,7 +1,7 @@
/* ftpcmd.y: yacc parser for the FTP daemon.
%%% portions-copyright-cmetz-96
Portions of this software are Copyright 1996-1997 by Craig Metz, All Rights
Portions of this software are Copyright 1996-1998 by Craig Metz, All Rights
Reserved. The Inner Net License Version 2 applies to these portions of
the software.
You should have received a copy of the license with this software. If
@ -21,6 +21,8 @@ you didn't get a copy, you may request one from <license@inner.net>.
PORT attack fixes from Hobbit.
Modified at NRL for OPIE 2.0.
Originally from BSD.
$FreeBSD$
*/
/*
* Copyright (c) 1985, 1988 Regents of the University of California.

View File

@ -1,7 +1,7 @@
/* generator.c: The opiegenerator() library function.
%%% portions-copyright-cmetz-96
Portions of this software are Copyright 1996-1997 by Craig Metz, All Rights
Portions of this software are Copyright 1996-1998 by Craig Metz, All Rights
Reserved. The Inner Net License Version 2 applies to these portions of
the software.
You should have received a copy of the license with this software. If
@ -9,16 +9,24 @@ you didn't get a copy, you may request one from <license@inner.net>.
History:
Modified by cmetz for OPIE 2.32. If secret=NULL, always return
as if opieauto returned "get the secret". Renamed
_opieparsechallenge() to __opieparsechallenge(). Check
challenge for extended response support and don't send
an init-hex response if extended response support isn't
indicated in the challenge.
Modified by cmetz for OPIE 2.31. Renamed "init" to "init-hex".
Removed active attack protection support. Fixed fairly
bug in how init response was computed (i.e., dead wrong).
Removed active attack protection support. Fixed fairly
bug in how init response was computed (i.e., dead wrong).
Modified by cmetz for OPIE 2.3. Use _opieparsechallenge(). ifdef
around string.h. Output hex responses by default, output
OTP re-init extended responses (same secret) if sequence
number falls below 10.
around string.h. Output hex responses by default, output
OTP re-init extended responses (same secret) if sequence
number falls below 10.
Modified by cmetz for OPIE 2.2. Use FUNCTION declaration et al.
Bug fixes.
Bug fixes.
Created at NRL for OPIE 2.2.
$FreeBSD$
*/
#include "opie_cfg.h"
@ -36,26 +44,33 @@ int opiegenerator FUNCTION((buffer, secret, response), char *buffer AND char *se
char *seed;
char key[8];
int i;
int exts;
if (!(buffer = strstr(buffer, "otp-")))
return 1;
buffer += 4;
if (_opieparsechallenge(buffer, &algorithm, &sequence, &seed))
if (__opieparsechallenge(buffer, &algorithm, &sequence, &seed, &exts))
return 1;
if ((sequence < 2) || (sequence > 9999))
return 1;
if (!secret[0])
return 2;
if (opiepasscheck(secret))
return -2;
if (i = opiekeycrunch(algorithm, key, seed, secret))
return i;
if (sequence < 10) {
if (!(exts & 1))
return 1;
{
char newseed[OPIE_SEED_MAX + 1];
char newkey[8];
char *c;
@ -78,6 +93,7 @@ int opiegenerator FUNCTION((buffer, secret, response), char *buffer AND char *se
sprintf(buf, ":%s 499 %s:", algids[algorithm], newseed);
strcat(response, buf);
strcat(response, opiebtoh(buf, newkey));
};
} else {
while (sequence-- != 0)
opiehash(key, algorithm);

View File

@ -1,7 +1,7 @@
/* hash.c: The opiehash() library function.
%%% copyright-cmetz-96
This software is Copyright 1996-1997 by Craig Metz, All Rights Reserved.
This software is Copyright 1996-1998 by Craig Metz, All Rights Reserved.
The Inner Net License Version 2 applies to this software.
You should have received a copy of the license with this software. If
you didn't get a copy, you may request one from <license@inner.net>.
@ -12,6 +12,8 @@ you didn't get a copy, you may request one from <license@inner.net>.
not be correct). Backed out previous optimizations as
they killed thread-safety.
Created by cmetz for OPIE 2.3 using the old hash.c as a guide.
$FreeBSD$
*/
#include "opie_cfg.h"

View File

@ -1,7 +1,7 @@
/* hashlen.c: The opiehashlen() library function.
%%% copyright-cmetz-96
This software is Copyright 1996-1997 by Craig Metz, All Rights Reserved.
This software is Copyright 1996-1998 by Craig Metz, All Rights Reserved.
The Inner Net License Version 2 applies to this software.
You should have received a copy of the license with this software. If
you didn't get a copy, you may request one from <license@inner.net>.
@ -9,6 +9,8 @@ you didn't get a copy, you may request one from <license@inner.net>.
History:
Created by cmetz for OPIE 2.3.
$FreeBSD$
*/
#include "opie_cfg.h"

View File

@ -1,15 +1,18 @@
/* newseed.c: The opienewseed() library function.
%%% copyright-cmetz-96
This software is Copyright 1996-1997 by Craig Metz, All Rights Reserved.
This software is Copyright 1996-1998 by Craig Metz, All Rights Reserved.
The Inner Net License Version 2 applies to this software.
You should have received a copy of the license with this software. If
you didn't get a copy, you may request one from <license@inner.net>.
History:
Modified by cmetz for OPIE 2.32. Added syslog.h if DEBUG.
Modified by cmetz for OPIE 2.31. Added time.h.
Created by cmetz for OPIE 2.22.
$FreeBSD$
*/
#include "opie_cfg.h"
@ -27,6 +30,9 @@ you didn't get a copy, you may request one from <license@inner.net>.
#include <sys/utsname.h>
#endif /* HAVE_SYS_UTSNAME_H */
#include <errno.h>
#if DEBUG
#include <syslog.h>
#endif /* DEBUG */
#include "opie.h"
int opienewseed FUNCTION((seed), char *seed)
@ -87,9 +93,9 @@ int opienewseed FUNCTION((seed), char *seed)
struct utsname utsname;
if (uname(&utsname) < 0) {
#if 0
perror("uname");
#endif /* 0 */
#if DEBUG
syslog(LOG_DEBUG, "uname: %s(%d)", strerror(errno), errno);
#endif /* DEBUG */
utsname.nodename[0] = 'k';
utsname.nodename[1] = 'e';
}

View File

@ -1,7 +1,7 @@
.\" opie.4: Overview of the OPIE software.
.\"
.\" %%% portions-copyright-cmetz-96
.\" Portions of this software are Copyright 1996-1997 by Craig Metz, All Rights
.\" Portions of this software are Copyright 1996-1998 by Craig Metz, All Rights
.\" Reserved. The Inner Net License Version 2 applies to these portions of
.\" the software.
.\" You should have received a copy of the license with this software. If

View File

@ -2,7 +2,7 @@
system that a program might need.
%%% portions-copyright-cmetz-96
Portions of this software are Copyright 1996-1997 by Craig Metz, All Rights
Portions of this software are Copyright 1996-1998 by Craig Metz, All Rights
Reserved. The Inner Net License Version 2 applies to these portions of
the software.
You should have received a copy of the license with this software. If
@ -15,6 +15,8 @@ License Agreement applies to this software.
History:
Modified by cmetz for OPIE 2.32. Added symbolic flag names for
opiepasswd(). Added __opieparsechallenge() prototype.
Modified by cmetz for OPIE 2.31. Removed active attack protection.
Modified by cmetz for OPIE 2.3. Renamed PTR to VOIDPTR. Added
re-init key and extension file fields to struct opie. Added
@ -31,6 +33,8 @@ License Agreement applies to this software.
Modified at NRL for OPIE 2.0.
Written at Bellcore for the S/Key Version 1 software distribution
(skey.h).
$FreeBSD$
*/
#ifndef _OPIE_H
#define _OPIE_H 1
@ -117,6 +121,11 @@ FILE *__opieopen __P((char *, int, int));
#endif /* EOF */
int __opiereadrec __P((struct opie *));
int __opiewriterec __P((struct opie *));
int __opieparsechallenge __P((char *buffer, int *algorithm, int *sequence, char **seed, int *exts));
__END_DECLS
#endif /* _OPIE */
#define OPIEPASSWD_CONSOLE 1
#define OPIEPASSWD_FORCE 2
#endif /* _OPIE_H */

View File

@ -1,7 +1,7 @@
/* opie_cfg.h: Various configuration-type pieces of information for OPIE.
%%% portions-copyright-cmetz-96
Portions of this software are Copyright 1996-1997 by Craig Metz, All Rights
Portions of this software are Copyright 1996-1998 by Craig Metz, All Rights
Reserved. The Inner Net License Version 2 applies to these portions of
the software.
You should have received a copy of the license with this software. If
@ -14,6 +14,8 @@ License Agreement applies to this software.
History:
Modified by cmetz for OPIE 2.32. Include <sys/types.h> before
<dirent.h> to make *BSD happy.
Modified by cmetz for OPIE 2.31. Added 4.4BSD-Lite pathnames.h
definitions from ftpd. Added struct spwd definition and
HAVE_SHADOW logic for SunOS C2 shadow password support.
@ -44,13 +46,15 @@ License Agreement applies to this software.
Modified at NRL for OPIE 2.1. Fixed sigprocmask declaration.
Gutted for autoconf. Split up for autoconf.
Written at NRL for OPIE 2.0.
$FreeBSD$
*/
#ifndef _OPIE_CFG_H
#define _OPIE_CFG_H 1
#define VERSION "2.31"
#define DATE "Thursday, March 20, 1997"
#define VERSION "2.32"
#define DATE "Thursday, January 1, 1998"
#ifndef unix
#define unix 1
@ -66,8 +70,8 @@ License Agreement applies to this software.
#define DOUTMPX 0
#endif /* HAVE_GETUTXLINE && HAVE_UTMPX_H */
/* Adapted from the Autoconf hypertext info pages */
#include <sys/types.h>
/* Adapted from the Autoconf hypertext info pages */
#if HAVE_DIRENT_H
#include <dirent.h>
#else /* HAVE_DIRENT_H */

View File

@ -1,7 +1,7 @@
/* opieftpd.c: Main program for an FTP daemon.
%%% portions-copyright-cmetz-96
Portions of this software are Copyright 1996-1997 by Craig Metz, All Rights
Portions of this software are Copyright 1996-1998 by Craig Metz, All Rights
Reserved. The Inner Net License Version 2 applies to these portions of
the software.
You should have received a copy of the license with this software. If
@ -14,6 +14,8 @@ License Agreement applies to this software.
History:
Modified by cmetz for OPIE 2.32. Remove include of dirent.h here; it's
done already (and conditionally) in opie_cfg.h.
Modified by cmetz for OPIE 2.31. Merged in some 4.4BSD-Lite changes.
Merged in a security fix to BSD-derived ftpds.
Modified by cmetz for OPIE 2.3. Fixed the filename at the top.
@ -43,6 +45,8 @@ License Agreement applies to this software.
Originally from BSD Net/2.
There is some really, really ugly code in here.
$FreeBSD$
*/
/*
* Copyright (c) 1985, 1988, 1990 Regents of the University of California.
@ -111,7 +115,6 @@ License Agreement applies to this software.
#include <arpa/telnet.h>
#include <signal.h>
#include <dirent.h>
#include <fcntl.h>
#if HAVE_TIME_H
#include <time.h>

View File

@ -1,7 +1,7 @@
.\" opieinfo.1: Manual page for the opieinfo(1) program.
.\"
.\" %%% portions-copyright-cmetz-96
.\" Portions of this software are Copyright 1996-1997 by Craig Metz, All Rights
.\" Portions of this software are Copyright 1996-1998 by Craig Metz, All Rights
.\" Reserved. The Inner Net License Version 2 applies to these portions of
.\" the software.
.\" You should have received a copy of the license with this software. If
@ -19,6 +19,7 @@
.\" Written at Bellcore for the S/Key Version 1 software distribution
.\" (keyinfo.1).
.\"
.\" $FreeBSD$
.ll 6i
.pl 10.5i
.lt 6.0i

View File

@ -1,7 +1,7 @@
.\" opiekey.1: Manual page for the opiekey(1) program.
.\"
.\" %%% portions-copyright-cmetz-96
.\" Portions of this software are Copyright 1996-1997 by Craig Metz, All Rights
.\" Portions of this software are Copyright 1996-1998 by Craig Metz, All Rights
.\" Reserved. The Inner Net License Version 2 applies to these portions of
.\" the software.
.\" You should have received a copy of the license with this software. If
@ -25,6 +25,7 @@
.\" Written at Bellcore for the S/Key Version 1 software distribution
.\" (key.1).
.\"
.\" $FreeBSD$
.ll 6i
.pl 10.5i
.lt 6.0i

View File

@ -1,4 +1,4 @@
.\" opieaccess.5: Manual page describing the /etc/opiekeys file.
.\" opiekeys.5: Manual page describing the /etc/opiekeys file.
.\"
.\" Portions of this software are Copyright 1995 by Randall Atkinson and Dan
.\" McDonald, All Rights Reserved. All Rights under this copyright are assigned
@ -7,11 +7,14 @@
.\"
.\" History:
.\"
.\" Modified by cmetz for OPIE 2.32. This is opiekeys.5, not opiekeys.1 or
.\" opieaccess.5.
.\" Written at NRL for OPIE 2.0.
.\"
.ll 6i
.pl 10.5i
.\" @(#)opiekeys.5 2.0 (NRL) 1/10/95
.\" $FreeBSD$
.\"
.lt 6.0i
.TH OPIEKEYS 5 "January 10, 1995"

View File

@ -1,7 +1,7 @@
.\" opiepasswd.1: Manual page for the opiepasswd(1) program.
.\"
.\" %%% portions-copyright-cmetz-96
.\" Portions of this software are Copyright 1996-1997 by Craig Metz, All Rights
.\" Portions of this software are Copyright 1996-1998 by Craig Metz, All Rights
.\" Reserved. The Inner Net License Version 2 applies to these portions of
.\" the software.
.\" You should have received a copy of the license with this software. If
@ -21,6 +21,7 @@
.\" Written at Bellcore for the S/Key Version 1 software distribution
.\" (keyinit.1).
.\"
.\" $FreeBSD$
.ll 6i
.pl 10.5i
.lt 6.0i