move prop_data to hprop.h
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8414 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
56
kdc/hprop.c
56
kdc/hprop.c
@@ -99,15 +99,9 @@ open_socket(krb5_context context, const char *hostname, const char *port)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct prop_data{
|
|
||||||
krb5_context context;
|
|
||||||
krb5_auth_context auth_context;
|
|
||||||
int sock;
|
|
||||||
};
|
|
||||||
|
|
||||||
int hdb_entry2value(krb5_context, hdb_entry*, krb5_data*);
|
int hdb_entry2value(krb5_context, hdb_entry*, krb5_data*);
|
||||||
|
|
||||||
static krb5_error_code
|
krb5_error_code
|
||||||
v5_prop(krb5_context context, HDB *db, hdb_entry *entry, void *appdata)
|
v5_prop(krb5_context context, HDB *db, hdb_entry *entry, void *appdata)
|
||||||
{
|
{
|
||||||
krb5_error_code ret;
|
krb5_error_code ret;
|
||||||
@@ -542,6 +536,11 @@ iterate (krb5_context context,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif /* KRB4 */
|
#endif /* KRB4 */
|
||||||
|
#if 0
|
||||||
|
case HPROP_MIT_DUMP:
|
||||||
|
mit_prop_dump(pd, database);
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
case HPROP_HEIMDAL: {
|
case HPROP_HEIMDAL: {
|
||||||
krb5_error_code ret = hdb_foreach(context, db, HDB_F_DECRYPT,
|
krb5_error_code ret = hdb_foreach(context, db, HDB_F_DECRYPT,
|
||||||
v5_prop, pd);
|
v5_prop, pd);
|
||||||
@@ -747,8 +746,11 @@ main(int argc, char **argv)
|
|||||||
realm = realm_buf;
|
realm = realm_buf;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if(type == HPROP_KRB4_DB) {
|
switch(type) {
|
||||||
|
#ifdef KRB4
|
||||||
|
case HPROP_KRB4_DB: {
|
||||||
int e = kerb_db_set_name (database);
|
int e = kerb_db_set_name (database);
|
||||||
if(e)
|
if(e)
|
||||||
krb5_errx(context, 1, "kerb_db_set_name: %s",
|
krb5_errx(context, 1, "kerb_db_set_name: %s",
|
||||||
@@ -757,24 +759,34 @@ main(int argc, char **argv)
|
|||||||
if(e)
|
if(e)
|
||||||
krb5_errx(context, 1, "kdb_get_master_key: %s",
|
krb5_errx(context, 1, "kdb_get_master_key: %s",
|
||||||
krb_get_err_text(e));
|
krb_get_err_text(e));
|
||||||
} else if(type == HPROP_KRB4_DUMP) {
|
break;
|
||||||
|
}
|
||||||
|
case HPROP_KRB4_DUMP:
|
||||||
/* nothing to do */
|
/* nothing to do */
|
||||||
} else
|
break;
|
||||||
#ifdef KASERVER_DB
|
#ifdef KASERVER_DB
|
||||||
if (type == HPROP_KASERVER) {
|
case HPROP_KASERVER:
|
||||||
if (database == NULL)
|
if (database == NULL)
|
||||||
database = DEFAULT_DATABASE;
|
database = DEFAULT_DATABASE;
|
||||||
} else
|
break;
|
||||||
#endif
|
#endif
|
||||||
#endif /* KRB4 */
|
#endif /* KRB4 */
|
||||||
{
|
#if 0
|
||||||
ret = hdb_create (context, &db, database);
|
case HPROP_MIT_DUMP:
|
||||||
if(ret)
|
break;
|
||||||
krb5_err(context, 1, ret, "hdb_create: %s", database);
|
#endif
|
||||||
ret = db->open(context, db, O_RDONLY, 0);
|
case HPROP_HEIMDAL:
|
||||||
if(ret)
|
ret = hdb_create (context, &db, database);
|
||||||
krb5_err(context, 1, ret, "db->open");
|
if(ret)
|
||||||
}
|
krb5_err(context, 1, ret, "hdb_create: %s", database);
|
||||||
|
ret = db->open(context, db, O_RDONLY, 0);
|
||||||
|
if(ret)
|
||||||
|
krb5_err(context, 1, ret, "db->open");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
krb5_errx(context, 1, "unknown dump type `%d'", type);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (to_stdout)
|
if (to_stdout)
|
||||||
dump_database (context, type, database, afs_cell, db);
|
dump_database (context, type, database, afs_cell, db);
|
||||||
|
Reference in New Issue
Block a user