+Sun Jul 7 15:14:43 1996 Ezra Peisach <epeisach@kangaroo.mit.edu>
+
+ * get_creds.c: (krb5_get_credentials_val_renew_core) Combine
+ common internals needed from krb5_get_credentials_validate()
+ and used by new function krb5_get_credentials_renew()
+
+ * gc_frm_kdc.c (krb5_get_cred_from_kdc_renew): A wrapper that
+ passes KDC_OPT_RENEW to the static
+ krb5_get_cred_from_kdc_opt so that kinit can use it.
+
+
Mon Jun 24 09:45:04 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
* bld_princ.c (krb5_build_principal_va): Change const to
return krb5_get_cred_from_kdc_opt(context, ccache, in_cred, out_cred, tgts,
KDC_OPT_VALIDATE);
}
+
+krb5_error_code
+krb5_get_cred_from_kdc_renew(context, ccache, in_cred, out_cred, tgts)
+ krb5_context context;
+ krb5_ccache ccache;
+ krb5_creds *in_cred;
+ krb5_creds **out_cred;
+ krb5_creds ***tgts;
+{
+
+ return krb5_get_cred_from_kdc_opt(context, ccache, in_cred, out_cred, tgts,
+ KDC_OPT_RENEW);
+}
return retval;
}
-krb5_error_code INTERFACE
-krb5_get_credentials_validate(context, options, ccache, in_creds, out_creds)
+#define INT_GC_VALIDATE 1
+#define INT_GC_RENEW 2
+
+static krb5_error_code
+krb5_get_credentials_val_renew_core(context, options, ccache,
+ in_creds, out_creds, which)
krb5_context context;
const krb5_flags options;
krb5_ccache ccache;
krb5_creds *in_creds;
krb5_creds **out_creds;
+ int which;
{
krb5_error_code retval;
krb5_creds mcreds;
if (retval) return retval;
- retval = krb5_get_cred_from_kdc_validate(context, ccache,
+ switch(which) {
+ case INT_GC_VALIDATE:
+ retval = krb5_get_cred_from_kdc_validate(context, ccache,
+ in_creds, out_creds, &tgts);
+ break;
+ case INT_GC_RENEW:
+ retval = krb5_get_cred_from_kdc_renew(context, ccache,
in_creds, out_creds, &tgts);
+ break;
+ default:
+ /* Should never happen */
+ retval = 255;
+ break;
+ }
if (retval) return retval;
if (tgts) krb5_free_tgt_creds(context, tgts);
retval = krb5_cc_store_cred(context, ccache, *out_creds);
return retval;
}
+
+krb5_error_code INTERFACE
+krb5_get_credentials_validate(context, options, ccache, in_creds, out_creds)
+ krb5_context context;
+ const krb5_flags options;
+ krb5_ccache ccache;
+ krb5_creds *in_creds;
+ krb5_creds **out_creds;
+{
+ return(krb5_get_credentials_val_renew_core(context, options, ccache,
+ in_creds, out_creds,
+ INT_GC_VALIDATE));
+}
+
+krb5_error_code INTERFACE
+krb5_get_credentials_renew(context, options, ccache, in_creds, out_creds)
+ krb5_context context;
+ const krb5_flags options;
+ krb5_ccache ccache;
+ krb5_creds *in_creds;
+ krb5_creds **out_creds;
+{
+
+ return(krb5_get_credentials_val_renew_core(context, options, ccache,
+ in_creds, out_creds,
+ INT_GC_RENEW));
+}