* get_creds.c: (krb5_get_credentials_val_renew_core) Combine
authorEzra Peisach <epeisach@mit.edu>
Sun, 7 Jul 1996 19:20:37 +0000 (19:20 +0000)
committerEzra Peisach <epeisach@mit.edu>
Sun, 7 Jul 1996 19:20:37 +0000 (19:20 +0000)
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.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@8558 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/krb/ChangeLog
src/lib/krb5/krb/gc_frm_kdc.c
src/lib/krb5/krb/get_creds.c

index 6d36c7fe35a9ffa00c2b257b17c5d6c92f7b5938..6234b1bb34d705e72372a723543e4c0b3b5f5727 100644 (file)
@@ -1,3 +1,14 @@
+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
index 4b4120d14341a436bcc4b8d5d70bf6adef79cd2c..ac31b466d8853954a1a29e66e15940e67fd8b8d8 100644 (file)
@@ -424,3 +424,16 @@ krb5_get_cred_from_kdc_validate(context, ccache, in_cred, out_cred, tgts)
   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);
+}
index 19cff036564bbe532a10a81180e5f08e8b66ac97..4ff62f174b04474fdc55e29b53b0fc10d8582583 100644 (file)
@@ -143,13 +143,18 @@ krb5_get_credentials(context, options, ccache, in_creds, out_creds)
     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;
@@ -163,8 +168,20 @@ krb5_get_credentials_validate(context, options, ccache, in_creds, out_creds)
 
     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);
 
@@ -177,3 +194,30 @@ krb5_get_credentials_validate(context, options, ccache, in_creds, out_creds)
     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));
+}