remove configuration reading that is now done in
krb5_get_init_creds_opt_set_default_flags git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10006 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -37,8 +37,8 @@ RCSID("$Id$");
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
get_config_time (krb5_context context,
|
get_config_time (krb5_context context,
|
||||||
char *realm,
|
const char *realm,
|
||||||
char *name,
|
const char *name,
|
||||||
int def)
|
int def)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
@@ -59,24 +59,6 @@ get_config_time (krb5_context context,
|
|||||||
return def;
|
return def;
|
||||||
}
|
}
|
||||||
|
|
||||||
static krb5_boolean
|
|
||||||
get_config_bool (krb5_context context,
|
|
||||||
char *realm,
|
|
||||||
char *name)
|
|
||||||
{
|
|
||||||
return krb5_config_get_bool (context,
|
|
||||||
NULL,
|
|
||||||
"realms",
|
|
||||||
realm,
|
|
||||||
name,
|
|
||||||
NULL)
|
|
||||||
|| krb5_config_get_bool (context,
|
|
||||||
NULL,
|
|
||||||
"libdefaults",
|
|
||||||
name,
|
|
||||||
NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
static krb5_error_code
|
static krb5_error_code
|
||||||
init_cred (krb5_context context,
|
init_cred (krb5_context context,
|
||||||
krb5_creds *cred,
|
krb5_creds *cred,
|
||||||
@@ -111,22 +93,11 @@ init_cred (krb5_context context,
|
|||||||
if (options->flags & KRB5_GET_INIT_CREDS_OPT_TKT_LIFE)
|
if (options->flags & KRB5_GET_INIT_CREDS_OPT_TKT_LIFE)
|
||||||
tmp = options->tkt_life;
|
tmp = options->tkt_life;
|
||||||
else
|
else
|
||||||
tmp = get_config_time (context,
|
tmp = 10 * 60 * 60;
|
||||||
*client_realm,
|
|
||||||
"ticket_lifetime",
|
|
||||||
10 * 60 * 60);
|
|
||||||
cred->times.endtime = now + tmp;
|
cred->times.endtime = now + tmp;
|
||||||
|
|
||||||
tmp = 0;
|
|
||||||
if (options->flags & KRB5_GET_INIT_CREDS_OPT_RENEW_LIFE)
|
if (options->flags & KRB5_GET_INIT_CREDS_OPT_RENEW_LIFE)
|
||||||
tmp = options->renew_life;
|
cred->times.renew_till = tmp;
|
||||||
else
|
|
||||||
tmp = get_config_time (context,
|
|
||||||
*client_realm,
|
|
||||||
"renew_lifetime",
|
|
||||||
0);
|
|
||||||
if (tmp)
|
|
||||||
cred->times.renew_till = now + tmp;
|
|
||||||
|
|
||||||
if (in_tkt_service) {
|
if (in_tkt_service) {
|
||||||
krb5_realm server_realm;
|
krb5_realm server_realm;
|
||||||
@@ -231,17 +202,9 @@ get_init_creds_common(krb5_context context,
|
|||||||
|
|
||||||
if (options->flags & KRB5_GET_INIT_CREDS_OPT_FORWARDABLE)
|
if (options->flags & KRB5_GET_INIT_CREDS_OPT_FORWARDABLE)
|
||||||
flags->b.forwardable = options->forwardable;
|
flags->b.forwardable = options->forwardable;
|
||||||
else
|
|
||||||
flags->b.forwardable = get_config_bool (context,
|
|
||||||
*client_realm,
|
|
||||||
"forwardable");
|
|
||||||
|
|
||||||
if (options->flags & KRB5_GET_INIT_CREDS_OPT_PROXIABLE)
|
if (options->flags & KRB5_GET_INIT_CREDS_OPT_PROXIABLE)
|
||||||
flags->b.proxiable = options->proxiable;
|
flags->b.proxiable = options->proxiable;
|
||||||
else
|
|
||||||
flags->b.proxiable = get_config_bool (context,
|
|
||||||
*client_realm,
|
|
||||||
"proxiable");
|
|
||||||
|
|
||||||
if (start_time)
|
if (start_time)
|
||||||
flags->b.postdated = 1;
|
flags->b.postdated = 1;
|
||||||
|
Reference in New Issue
Block a user