remove code that depend on kerberos 4 library

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20456 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2007-04-19 20:29:42 +00:00
parent 75998d7df8
commit 6f469b4af4
3 changed files with 9 additions and 103 deletions

View File

@@ -623,16 +623,9 @@ configure(krb5_context context, int argc, char **argv)
#endif
if(config->v4_realm == NULL && (config->enable_kaserver || config->enable_v4)){
#ifdef KRB4
config->v4_realm = malloc(40); /* REALM_SZ */
if (config->v4_realm == NULL)
krb5_errx(context, 1, "out of memory");
krb_get_lrealm(config->v4_realm, 1);
#else
krb5_errx(context, 1, "No Kerberos 4 realm configured");
#endif
}
if(config->v4_realm == NULL && (config->enable_kaserver || config->enable_v4))
krb5_errx(context, 1, "Kerberos 4 enabled but no realm configured");
if(disable_des == -1)
disable_des = krb5_config_get_bool_default(context, NULL,
FALSE,

View File

@@ -48,7 +48,7 @@
.Fl -database= Ns Pa file
.Xc
.Oc
.Op Fl -source= Ns Ar heimdal|mit-dump|krb4-dump|krb4-db|kaserver
.Op Fl -source= Ns Ar heimdal|mit-dump|krb4-dump|kaserver
.Oo Fl r Ar string \*(Ba Xo
.Fl -v4-realm= Ns Ar string
.Xc
@@ -101,7 +101,7 @@ Where to find the master key to encrypt or decrypt keys with.
.Xc
The database to be propagated.
.It Xo
.Fl -source= Ns Ar heimdal|mit-dump|krb4-dump|krb4-db|kaserver
.Fl -source= Ns Ar heimdal|mit-dump|krb4-dump|kaserver
.Xc
Specifies the type of the source database. Alternatives include:
.Pp
@@ -110,8 +110,6 @@ Specifies the type of the source database. Alternatives include:
a Heimdal database
.It mit-dump
a MIT Kerberos 5 dump file
.It krb4-db
a Kerberos 4 database
.It krb4-dump
a Kerberos 4 dump file
.It kaserver
@@ -170,12 +168,6 @@ The AFS cell name, used if reading a kaserver database.
.Xc
Also dump the principals marked as special in the kaserver database.
.It Xo
.Fl 4 ,
.Fl -v4-db
.Xc
Deprecated, identical to
.Sq --source=krb4-db .
.It Xo
.Fl K ,
.Fl -ka-db
.Xc
@@ -190,11 +182,6 @@ should run
$ hprop slave-1 slave-2
.Ed
.Pp
Copy a Kerberos 4 database to a Kerberos 5 slave:
.Bd -literal -offset indent
$ hprop --source=krb4-db -E krb5-slave
.Ed
.Pp
Convert a Kerberos 4 dump-file for use with a Heimdal KDC:
.Bd -literal -offset indent
$ hprop -n --source=krb4-dump -d /var/kerberos/principal.dump --master-key=/.k | hpropd -n

View File

@@ -33,13 +33,6 @@
#include "hprop.h"
#ifdef KRB4
#include <krb.h>
#include <prot.h>
#define Principal Principal4
#include <krb_db.h>
#endif
RCSID("$Id$");
static int version_flag;
@@ -136,42 +129,6 @@ v5_prop(krb5_context context, HDB *db, hdb_entry_ex *entry, void *appdata)
return ret;
}
#ifdef KRB4
static char realm_buf[REALM_SZ];
static int
kdb_prop(void *arg, Principal *p)
{
int ret;
struct v4_principal pr;
memset(&pr, 0, sizeof(pr));
if(p->attributes != 0) {
warnx("%s.%s has non-zero attributes - skipping",
p->name, p->instance);
return 0;
}
strlcpy(pr.name, p->name, sizeof(pr.name));
strlcpy(pr.instance, p->instance, sizeof(pr.instance));
copy_to_key(&p->key_low, &p->key_high, pr.key);
pr.exp_date = p->exp_date;
pr.mod_date = p->mod_date;
strlcpy(pr.mod_name, p->mod_name, sizeof(pr.mod_name));
strlcpy(pr.mod_instance, p->mod_instance, sizeof(pr.mod_instance));
pr.max_life = p->max_life;
pr.mkvno = p->kdc_key_ver;
pr.kvno = p->key_version;
ret = v4_prop(arg, &pr);
memset(&pr, 0, sizeof(pr));
return ret;
}
#endif /* KRB4 */
int
v4_prop(void *arg, struct v4_principal *p)
{
@@ -444,9 +401,6 @@ struct getargs args[] = {
"heimdal"
"|mit-dump"
"|krb4-dump"
#ifdef KRB4
"|krb4-db"
#endif
"|kaserver"
},
@@ -520,13 +474,12 @@ get_creds(krb5_context context, krb5_ccache *cache)
enum hprop_source {
HPROP_HEIMDAL = 1,
HPROP_KRB4_DB,
HPROP_KRB4_DUMP,
HPROP_KASERVER,
HPROP_MIT_DUMP
};
#define IS_TYPE_V4(X) ((X) == HPROP_KRB4_DB || (X) == HPROP_KRB4_DUMP || (X) == HPROP_KASERVER)
#define IS_TYPE_V4(X) ((X) == HPROP_KRB4_DUMP || (X) == HPROP_KASERVER)
struct {
int type;
@@ -534,9 +487,6 @@ struct {
} types[] = {
{ HPROP_HEIMDAL, "heimdal" },
{ HPROP_KRB4_DUMP, "krb4-dump" },
#ifdef KRB4
{ HPROP_KRB4_DB, "krb4-db" },
#endif
{ HPROP_KASERVER, "kaserver" },
{ HPROP_MIT_DUMP, "mit-dump" }
};
@@ -568,14 +518,6 @@ iterate (krb5_context context,
krb5_warnx(context, "v4_prop_dump: %s",
krb5_get_err_text(context, ret));
break;
#ifdef KRB4
case HPROP_KRB4_DB:
ret = kerb_db_iterate ((k_iter_proc_t)kdb_prop, pd);
if(ret)
krb5_warnx(context, "kerb_db_iterate: %s",
krb_get_err_text(ret));
break;
#endif /* KRB4 */
case HPROP_KASERVER:
ret = ka_dump(pd, database_name);
if(ret)
@@ -800,27 +742,11 @@ main(int argc, char **argv)
krb5_errx(context, 1, "No master key file found");
}
#ifdef KRB4
if (IS_TYPE_V4(type)) {
int e;
if (v4_realm == NULL) {
e = krb_get_lrealm(realm_buf, 1);
if(e)
krb5_errx(context, 1, "krb_get_lrealm: %s",
krb_get_err_text(e));
v4_realm = realm_buf;
}
}
#endif
if (IS_TYPE_V4(type) && v4_realm == NULL)
krb5_errx(context, 1, "Its a Kerberos 4 database "
"but no realm configured");
switch(type) {
#ifdef KRB4
case HPROP_KRB4_DB:
if (database == NULL)
krb5_errx(context, 1, "no database specified");
break;
#endif
case HPROP_KASERVER:
if (database == NULL)
database = DEFAULT_DATABASE;