]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
cleanup
authorLuke Howard <lukeh@padl.com>
Fri, 2 Oct 2009 10:30:06 +0000 (10:30 +0000)
committerLuke Howard <lukeh@padl.com>
Fri, 2 Oct 2009 10:30:06 +0000 (10:30 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/users/lhoward/authdata@22826 dc483132-0cff-0310-8789-dd5450dbe970

src/include/krb5/authdata_plugin.h
src/lib/krb5/krb/authdata.c
src/lib/krb5/krb/pac.c
src/plugins/authdata/greet_client/greet.c

index 294e4f9561d618ed63dd35e808e75ac431129bb2..449b7f8908ccba01de07939e5659c4aed6889466 100644 (file)
@@ -256,14 +256,6 @@ typedef krb5_error_code
                                        krb5_boolean restrict_authenticated,
                                        void **ptr);
 
-typedef krb5_error_code
-(*authdata_client_copy_context_proc)(krb5_context kcontext,
-                                    struct _krb5_authdata_context *context,
-                                    void *plugin_context,
-                                    void *request_context,
-                                    void *dst_plugin_context,
-                                    void *dst_request_context);
-
 typedef void
 (*authdata_client_free_internal_proc)(krb5_context kcontext,
                                      struct _krb5_authdata_context *context,
@@ -303,6 +295,14 @@ typedef krb5_error_code
                                    krb5_octet **buffer,
                                    size_t *lenremain);
 
+typedef krb5_error_code
+(*authdata_client_copy_proc)(krb5_context kcontext,
+                            struct _krb5_authdata_context *context,
+                            void *plugin_context,
+                            void *request_context,
+                            void *dst_plugin_context,
+                            void *dst_request_context);
+
 typedef struct krb5plugin_authdata_client_ftable_v0 {
     char *name;
     krb5_authdatatype *ad_type_list;
@@ -319,11 +319,11 @@ typedef struct krb5plugin_authdata_client_ftable_v0 {
     authdata_client_import_authdata_proc import_authdata;
     authdata_client_export_internal_proc export_internal;
     authdata_client_free_internal_proc free_internal;
-    authdata_client_copy_context_proc copy_context;
     authdata_client_verify_proc verify;
     authdata_client_size_proc size;
     authdata_client_externalize_proc externalize;
     authdata_client_internalize_proc internalize;
+    authdata_client_copy_proc copy; /* optional */
 } krb5plugin_authdata_client_ftable_v0;
 
 #endif /* KRB5_AUTHDATA_PLUGIN_H_INCLUDED */
index 00341331ba8e800139e3973768226a162c1d6b75..6e1b9b5b16e7328495bba8a0819d2dc814be6020 100644 (file)
@@ -1018,8 +1018,8 @@ k5_copy_ad_module_data(krb5_context kcontext,
 
     assert(strcmp(dst_module->name, src_module->name) == 0);
 
-    /* If copy_context is unimplemented, externalize/internalize */
-    if (src_module->ftable->copy_context == NULL) {
+    /* If copy is unimplemented, externalize/internalize */
+    if (src_module->ftable->copy == NULL) {
         size_t size = 0, remain;
         krb5_octet *contents, *bp;
 
@@ -1072,12 +1072,12 @@ k5_copy_ad_module_data(krb5_context kcontext,
         assert(src_module->request_context_pp == &src_module->request_context);
         assert(dst_module->request_context_pp == &dst_module->request_context);
 
-        code = (*src_module->ftable->copy_context)(kcontext,
-                                                   context,
-                                                   src_module->plugin_context,
-                                                   src_module->request_context,
-                                                   dst_module->plugin_context,
-                                                   dst_module->request_context);
+        code = (*src_module->ftable->copy)(kcontext,
+                                           context,
+                                           src_module->plugin_context,
+                                           src_module->request_context,
+                                           dst_module->plugin_context,
+                                           dst_module->request_context);
     }
 
     return code;
index 5c2a37bfd8876ad33985f4f61da4e9db3be083ad..297e8955017cbdc861da15a9fab325f50f248082 100644 (file)
@@ -1364,27 +1364,6 @@ mspac_export_internal(krb5_context kcontext,
     return code;
 }
 
-static krb5_error_code
-mspac_copy_context(krb5_context kcontext,
-                  krb5_authdata_context context,
-                  void *plugin_context,
-                  void *request_context,
-                  void *dst_plugin_context,
-                  void *dst_request_context)
-{
-    struct mspac_context *srcctx = (struct mspac_context *)request_context;
-    struct mspac_context *dstctx = (struct mspac_context *)dst_request_context;
-    krb5_error_code code = 0;
-
-    assert(dstctx != NULL);
-    assert(dstctx->pac == NULL);
-
-    if (srcctx->pac != NULL)
-       code = k5_pac_copy(kcontext, srcctx->pac, &dstctx->pac);
-
-    return code;
-}
-
 static void
 mspac_free_internal(krb5_context kcontext,
                    krb5_authdata_context context,
@@ -1515,6 +1494,27 @@ mspac_internalize(krb5_context kcontext,
     return 0;
 }
 
+static krb5_error_code
+mspac_copy(krb5_context kcontext,
+          krb5_authdata_context context,
+          void *plugin_context,
+          void *request_context,
+          void *dst_plugin_context,
+          void *dst_request_context)
+{
+    struct mspac_context *srcctx = (struct mspac_context *)request_context;
+    struct mspac_context *dstctx = (struct mspac_context *)dst_request_context;
+    krb5_error_code code = 0;
+
+    assert(dstctx != NULL);
+    assert(dstctx->pac == NULL);
+
+    if (srcctx->pac != NULL)
+       code = k5_pac_copy(kcontext, srcctx->pac, &dstctx->pac);
+
+    return code;
+}
+
 static krb5_authdatatype mspac_ad_types[] = { KRB5_AUTHDATA_WIN2K_PAC, 0 };
 
 krb5plugin_authdata_client_ftable_v0 krb5int_mspac_authdata_client_ftable = {
@@ -1533,10 +1533,10 @@ krb5plugin_authdata_client_ftable_v0 krb5int_mspac_authdata_client_ftable = {
     mspac_import_authdata,
     mspac_export_internal,
     mspac_free_internal,
-    mspac_copy_context,
     mspac_verify,
     mspac_size,
     mspac_externalize,
-    mspac_internalize
+    mspac_internalize,
+    mspac_copy
 };
 
index 74a0a74bf3867c359e206a68467c460083eb7ff4..cb0d6e519437aabdabc7e50a0265577e8da2abd7 100644 (file)
@@ -372,8 +372,8 @@ krb5plugin_authdata_client_ftable_v0 authdata_client_0 = {
     NULL,
     NULL,
     NULL,
-    NULL,
     greet_size,
     greet_externalize,
-    greet_internalize
+    greet_internalize,
+    NULL
 };