Addendum to r24185: make audit_as_req return void, since it's an
authorGreg Hudson <ghudson@mit.edu>
Tue, 13 Jul 2010 16:09:01 +0000 (16:09 +0000)
committerGreg Hudson <ghudson@mit.edu>
Tue, 13 Jul 2010 16:09:01 +0000 (16:09 +0000)
informational method and we're not going to do anything with the
result.

ticket: 6749
status: open

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

src/include/kdb.h
src/kdc/kdc_util.c
src/lib/kdb/kdb5.c
src/plugins/kdb/db2/db2_exp.c
src/plugins/kdb/db2/kdb_db2.c
src/plugins/kdb/db2/kdb_db2.h
src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.c
src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.h

index a359f90953fe8abc9befececec9c9ab1d34271d4..977867b49628c92c5040c9c80cf8f500410b6572 100644 (file)
@@ -615,12 +615,9 @@ krb5_error_code krb5_db_check_policy_tgs(krb5_context kcontext,
                                          const char **status,
                                          krb5_data *e_data);
 
-krb5_error_code krb5_db_audit_as_req(krb5_context kcontext,
-                                     krb5_kdc_req *request,
-                                     krb5_db_entry *client,
-                                     krb5_db_entry *server,
-                                     krb5_timestamp authtime,
-                                     krb5_error_code error_code);
+void krb5_db_audit_as_req(krb5_context kcontext, krb5_kdc_req *request,
+                          krb5_db_entry *client, krb5_db_entry *server,
+                          krb5_timestamp authtime, krb5_error_code error_code);
 
 krb5_error_code krb5_db_invoke ( krb5_context kcontext,
                                  unsigned int method,
@@ -1271,14 +1268,11 @@ typedef struct _kdb_vftabl {
 
     /*
      * Optional: This method informs the module of a successful or unsuccessful
-     * AS request.  The resulting error code is currently ignored by the KDC.
+     * AS request.
      */
-    krb5_error_code (*audit_as_req)(krb5_context kcontext,
-                                    krb5_kdc_req *request,
-                                    krb5_db_entry *client,
-                                    krb5_db_entry *server,
-                                    krb5_timestamp authtime,
-                                    krb5_error_code error_code);
+    void (*audit_as_req)(krb5_context kcontext, krb5_kdc_req *request,
+                         krb5_db_entry *client, krb5_db_entry *server,
+                         krb5_timestamp authtime, krb5_error_code error_code);
 
     /* Note: there is currently no method for auditing TGS requests. */
 
index 88f3f1f5d9916f7a48f0df7697c83e1cb51ea233..97df9f7fcb15f59096f16f54c0e57bd7540e3a61 100644 (file)
@@ -2356,8 +2356,8 @@ log_as_req(const krb5_fulladdr *from,
                          ktypestr, fromstring, status,
                          cname2, sname2, emsg ? ", " : "", emsg ? emsg : "");
     }
-    (void) krb5_db_audit_as_req(kdc_context, request, client, server,
-                                authtime, errcode);
+    krb5_db_audit_as_req(kdc_context, request, client, server, authtime,
+                         errcode);
 #if 0
     /* Sun (OpenSolaris) version would probably something like this.
        The client and server names passed can be null, unlike in the
index 5d73828c752aa2e71df9eefc12f6b9086cf8c4d0..38f26e6785103734f0a53559c6b7200e44873534 100644 (file)
@@ -2303,7 +2303,7 @@ krb5_db_check_policy_tgs(krb5_context kcontext, krb5_kdc_req *request,
                                e_data);
 }
 
-krb5_error_code
+void
 krb5_db_audit_as_req(krb5_context kcontext, krb5_kdc_req *request,
                      krb5_db_entry *client, krb5_db_entry *server,
                      krb5_timestamp authtime, krb5_error_code error_code)
@@ -2312,12 +2312,9 @@ krb5_db_audit_as_req(krb5_context kcontext, krb5_kdc_req *request,
     kdb_vftabl *v;
 
     status = get_vftabl(kcontext, &v);
-    if (status)
-        return status;
-    if (v->audit_as_req == NULL)
-        return KRB5_PLUGIN_OP_NOTSUPP;
-    return v->audit_as_req(kcontext, request, client, server, authtime,
-                           error_code);
+    if (status || v->audit_as_req == NULL)
+        return;
+    v->audit_as_req(kcontext, request, client, server, authtime, error_code);
 }
 
 krb5_error_code
index 80c55b24f9f1a8e097861b5417b5eaca301f8ecc..da4cecd7f1fb17f18d85360b290bb7f6afad9d65 100644 (file)
@@ -186,11 +186,11 @@ WRAP_K (krb5_db2_check_policy_as,
          krb5_data *e_data),
         (kcontext, request, client, server, kdc_time, status, e_data));
 
-WRAP_K (krb5_db2_audit_as_req,
-        (krb5_context kcontext, krb5_kdc_req *request, krb5_db_entry *client,
-         krb5_db_entry *server, krb5_timestamp authtime,
-         krb5_error_code error_code),
-        (kcontext, request, client, server, authtime, error_code));
+WRAP_VOID (krb5_db2_audit_as_req,
+           (krb5_context kcontext, krb5_kdc_req *request,
+            krb5_db_entry *client, krb5_db_entry *server,
+            krb5_timestamp authtime, krb5_error_code error_code),
+           (kcontext, request, client, server, authtime, error_code));
 
 WRAP_K (krb5_db2_invoke,
         (krb5_context kcontext,
index 8c6c97afc3503f0017d5007b2d5f8cdef45d8ed7..f5f8f7b0d13e22ea66da73c4627956420faf009c 100644 (file)
@@ -1650,10 +1650,10 @@ krb5_db2_check_policy_as(krb5_context kcontext, krb5_kdc_req *request,
     return retval;
 }
 
-krb5_error_code
+void
 krb5_db2_audit_as_req(krb5_context kcontext, krb5_kdc_req *request,
                       krb5_db_entry *client, krb5_db_entry *server,
                       krb5_timestamp authtime, krb5_error_code error_code)
 {
-    return krb5_db2_lockout_audit(kcontext, client, authtime, error_code);
+    (void) krb5_db2_lockout_audit(kcontext, client, authtime, error_code);
 }
index 0c8095a9369cb6a07056bbbe4dc0d6151fb0adf6..a1d0d1976ef106d1ef71a991f1fd513bc99c2f37 100644 (file)
@@ -152,7 +152,7 @@ krb5_db2_check_policy_as(krb5_context kcontext, krb5_kdc_req *request,
                          krb5_timestamp kdc_time, const char **status,
                          krb5_data *e_data);
 
-krb5_error_code
+void
 krb5_db2_audit_as_req(krb5_context kcontext, krb5_kdc_req *request,
                       krb5_db_entry *client, krb5_db_entry *server,
                       krb5_timestamp authtime, krb5_error_code error_code);
index 185e1f330012f24d9115fdca048447757c60b3c9..eaf10cf2efba68a96ae4769da5dfca0807fcb046 100644 (file)
@@ -542,10 +542,10 @@ krb5_ldap_check_policy_as(krb5_context kcontext, krb5_kdc_req *request,
     return retval;
 }
 
-krb5_error_code
+void
 krb5_ldap_audit_as_req(krb5_context kcontext, krb5_kdc_req *request,
                        krb5_db_entry *client, krb5_db_entry *server,
                        krb5_timestamp authtime, krb5_error_code error_code)
 {
-    return krb5_ldap_lockout_audit(kcontext, client, authtime, error_code);
+    (void) krb5_ldap_lockout_audit(kcontext, client, authtime, error_code);
 }
index 6c795d6564b204658b4e26a6d1498270335af45f..939defb761613bad52152478bacfe5cb6314381e 100644 (file)
@@ -302,7 +302,7 @@ krb5_ldap_check_policy_as(krb5_context kcontext, krb5_kdc_req *request,
                           krb5_timestamp kdc_time, const char **status,
                           krb5_data *e_data);
 
-krb5_error_code
+void
 krb5_ldap_audit_as_req(krb5_context kcontext, krb5_kdc_req *request,
                        krb5_db_entry *client, krb5_db_entry *server,
                        krb5_timestamp authtime, krb5_error_code error_code);