mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-25 04:07:37 +00:00
FreeBSD specific schanges - mainly religious issues about where to put
stuff.
This commit is contained in:
parent
5ab88c4102
commit
f48c26f183
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=29118
|
@ -33,7 +33,7 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
RCSID("$Id: ftpd.c,v 1.88 1997/06/01 03:13:48 assar Exp $");
|
||||
RCSID("$Id$");
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -135,7 +135,9 @@ RCSID("$Id: ftpd.c,v 1.88 1997/06/01 03:13:48 assar Exp $");
|
|||
#include <kafs.h>
|
||||
#include "roken.h"
|
||||
|
||||
#ifdef OTP
|
||||
#include <otp.h>
|
||||
#endif
|
||||
|
||||
#ifdef SOCKS
|
||||
#include <socks.h>
|
||||
|
@ -274,8 +276,10 @@ parse_auth_level(char *str)
|
|||
p = strtok_r(NULL, ",", &foo)) {
|
||||
if(strcmp(p, "user") == 0)
|
||||
;
|
||||
#ifdef OTP
|
||||
else if(strcmp(p, "otp") == 0)
|
||||
ret |= AUTH_PLAIN|AUTH_OTP;
|
||||
#endif
|
||||
else if(strcmp(p, "ftp") == 0 ||
|
||||
strcmp(p, "safe") == 0)
|
||||
ret |= AUTH_FTP;
|
||||
|
@ -552,7 +556,9 @@ sgetpwnam(char *name)
|
|||
static int login_attempts; /* number of failed login attempts */
|
||||
static int askpasswd; /* had user command, ask for passwd */
|
||||
static char curname[10]; /* current USER name */
|
||||
#ifdef OTP
|
||||
OtpContext otp_ctx;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* USER command.
|
||||
|
@ -633,6 +639,7 @@ user(char *name)
|
|||
strncpy(curname, name, sizeof(curname)-1);
|
||||
if(auth_ok())
|
||||
ct->userok(name);
|
||||
#ifdef OTP
|
||||
else {
|
||||
char ss[256];
|
||||
|
||||
|
@ -654,6 +661,7 @@ user(char *name)
|
|||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
/*
|
||||
* Delay before reading passwd after first failed
|
||||
* attempt to slow down passwd-guessing programs.
|
||||
|
@ -869,9 +877,11 @@ pass(char *passwd)
|
|||
if (!guest) { /* "ftp" is only account allowed no password */
|
||||
if (pw == NULL)
|
||||
rval = 1; /* failure below */
|
||||
else if (otp_verify_user (&otp_ctx, passwd) == 0) {
|
||||
#ifdef OTP
|
||||
else if (otp_verify_user (&otp_ctx, passwd) == 0)
|
||||
rval = 0;
|
||||
} else if((auth_level & AUTH_OTP) == 0) {
|
||||
#endif
|
||||
else if((auth_level & AUTH_OTP) == 0) {
|
||||
char realm[REALM_SZ];
|
||||
if((rval = krb_get_lrealm(realm, 1)) == KSUCCESS)
|
||||
rval = krb_verify_user(pw->pw_name, "", realm,
|
||||
|
@ -881,12 +891,15 @@ pass(char *passwd)
|
|||
k_afsklog(0, 0);
|
||||
}else
|
||||
rval = unix_verify_user(pw->pw_name, passwd);
|
||||
} else {
|
||||
}
|
||||
#ifdef OTP
|
||||
else {
|
||||
char *s;
|
||||
|
||||
if (s = otp_error(&otp_ctx))
|
||||
lreply(530, "OTP: %s", s);
|
||||
}
|
||||
#endif
|
||||
memset (passwd, 0, strlen(passwd));
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#! /bin/sh
|
||||
# $Id: ksrvtgt.in,v 1.2 1997/04/05 21:29:17 assar Exp $
|
||||
# $Id$
|
||||
|
||||
usage="Usage: `basename $0` name instance [[realm] srvtab]"
|
||||
|
||||
|
@ -8,7 +8,7 @@ if [ $# -lt 2 -o $# -gt 4 ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
srvtab="${4-${3-/etc/srvtab}}"
|
||||
srvtab="${4-${3-/etc/kerberosIV/srvtab}}"
|
||||
realm="${4+@$3}"
|
||||
|
||||
%bindir%/kauth -n "$1.$2$realm" -l 5 -f "$srvtab "
|
||||
kauth -n "$1.$2$realm" -l 5 -f "$srvtab "
|
||||
|
|
|
@ -36,12 +36,12 @@
|
|||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/* $Id: kafs.h,v 1.19 1997/05/14 17:41:02 joda Exp $ */
|
||||
/* $Id$ */
|
||||
|
||||
#ifndef __KAFS_H
|
||||
#define __KAFS_H
|
||||
|
||||
#include <ktypes.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/cdefs.h>
|
||||
/* sys/ioctl.h must be included manually before kafs.h */
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* $Id: kdc.h,v 1.8 1997/04/01 03:59:05 assar Exp $
|
||||
* $Id$
|
||||
*
|
||||
* Copyright 1987, 1988 by the Massachusetts Institute of Technology.
|
||||
*
|
||||
|
@ -14,8 +14,8 @@
|
|||
|
||||
/* Don't depend on this! */
|
||||
#ifndef MKEYFILE
|
||||
#if 0
|
||||
#define MKEYFILE "/var/kerberos/master-key"
|
||||
#if 1
|
||||
#define MKEYFILE "/etc/kerberosIV/master-key"
|
||||
#else
|
||||
#define MKEYFILE "/.k"
|
||||
#endif
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* $Id: krb_db.h,v 1.15 1996/12/17 20:34:32 assar Exp $
|
||||
* $Id$
|
||||
*
|
||||
* Copyright 1987, 1988 by the Massachusetts Institute of Technology.
|
||||
*
|
||||
|
@ -24,7 +24,7 @@
|
|||
#define KERB_DEFAULT_NAME "default"
|
||||
#define KERB_DEFAULT_INST ""
|
||||
#ifndef DB_DIR
|
||||
#define DB_DIR "/var/kerberos"
|
||||
#define DB_DIR "/var/db/kerberos"
|
||||
#endif
|
||||
#ifndef DBM_FILE
|
||||
#define DBM_FILE DB_DIR "/principal"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* $Id: krb.h,v 1.76 1997/05/26 17:47:31 bg Exp $
|
||||
* $Id$
|
||||
*
|
||||
* Copyright 1987, 1988 by the Massachusetts Institute of Technology.
|
||||
*
|
||||
|
@ -13,7 +13,7 @@
|
|||
#ifndef KRB_DEFS
|
||||
#define KRB_DEFS
|
||||
|
||||
#include <ktypes.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/cdefs.h>
|
||||
#include <stdarg.h>
|
||||
#include <time.h>
|
||||
|
@ -71,20 +71,21 @@ const char *krb_get_err_text __P((int code));
|
|||
*/
|
||||
|
||||
/* /etc/kerberosIV is only for backwards compatibility, don't use it! */
|
||||
/* FreeBSD wants to maintain backwards compatibility */
|
||||
#ifndef KRB_CONF
|
||||
#define KRB_CONF "/etc/krb.conf"
|
||||
#define KRB_CONF "/etc/kerberosIV/krb.conf"
|
||||
#endif
|
||||
#ifndef KRB_RLM_TRANS
|
||||
#define KRB_RLM_TRANS "/etc/krb.realms"
|
||||
#define KRB_RLM_TRANS "/etc/kerberosIV/krb.realms"
|
||||
#endif
|
||||
#ifndef KRB_CNF_FILES
|
||||
#define KRB_CNF_FILES { KRB_CONF, "/etc/kerberosIV/krb.conf", 0}
|
||||
#define KRB_CNF_FILES { KRB_CONF, "/etc/krb.conf", 0}
|
||||
#endif
|
||||
#ifndef KRB_RLM_FILES
|
||||
#define KRB_RLM_FILES { KRB_RLM_TRANS, "/etc/kerberosIV/krb.realms", 0}
|
||||
#define KRB_RLM_FILES { KRB_RLM_TRANS, "/etc/krb.realms", 0}
|
||||
#endif
|
||||
#ifndef KRB_EQUIV
|
||||
#define KRB_EQUIV "/etc/krb.equiv"
|
||||
#define KRB_EQUIV "/etc/kerberosIV/krb.equiv"
|
||||
#endif
|
||||
#define KRB_MASTER "kerberos"
|
||||
#ifndef KRB_REALM
|
||||
|
@ -145,7 +146,7 @@ typedef struct ktext KTEXT_ST;
|
|||
#define CLOCK_SKEW 5*60
|
||||
/* Filename for readservkey */
|
||||
#ifndef KEYFILE
|
||||
#define KEYFILE "/etc/srvtab"
|
||||
#define KEYFILE "/etc/kerberosIV/srvtab"
|
||||
#endif
|
||||
|
||||
/* Structure definition for rd_ap_req */
|
||||
|
|
Loading…
Reference in a new issue