kdc-plugin: Make ‘client_principal’ const
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Mon, 19 Jun 2023 03:43:38 +0000 (15:43 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 28 Nov 2023 22:51:23 +0000 (11:51 +1300)
‘krb5_principal’ is a typedef, and ‘const krb5_principal’ is not const
in the way that one might think.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
kdc/kdc-plugin.c
kdc/kdc-plugin.h
tests/plugin/kdc_test_plugin.c

index ce76e033ce3e786603f12353453a6598b2b6f379..5f37366cfb2e638ce8057d2b1fbe0bbaac6a7911 100644 (file)
@@ -140,7 +140,7 @@ _kdc_pac_generate(astgs_request_t r,
 
 struct verify_uc {
     astgs_request_t r;
-    krb5_principal client_principal;
+    krb5_const_principal client_principal;
     krb5_principal delegated_proxy_principal;
     hdb_entry *client;
     hdb_entry *server;
@@ -170,7 +170,7 @@ verify(krb5_context context, const void *plug, void *plugctx, void *userctx)
 
 krb5_error_code
 _kdc_pac_verify(astgs_request_t r,
-               const krb5_principal client_principal,
+               krb5_const_principal client_principal,
                const krb5_principal delegated_proxy_principal,
                hdb_entry *client,
                hdb_entry *server,
@@ -198,7 +198,7 @@ _kdc_pac_verify(astgs_request_t r,
 
 struct update_uc {
     astgs_request_t r;
-    krb5_principal client_principal;
+    krb5_const_principal client_principal;
     krb5_principal delegated_proxy_principal;
     hdb_entry *client;
     hdb_entry *server;
@@ -226,7 +226,7 @@ update(krb5_context context, const void *plug, void *plugctx, void *userctx)
 
 krb5_error_code
 _kdc_pac_update(astgs_request_t r,
-               const krb5_principal client_principal,
+               krb5_const_principal client_principal,
                const krb5_principal delegated_proxy_principal,
                hdb_entry *client,
                hdb_entry *server,
index 0e28fea692715d03fef57ec8296982fb5df48a45..f59509741f2c6584363d064f2874c195ed7b2957 100644 (file)
@@ -63,7 +63,7 @@ typedef krb5_error_code
 typedef krb5_error_code
 (KRB5_CALLCONV *krb5plugin_kdc_pac_verify)(void *,
                                           astgs_request_t,
-                                          const krb5_principal, /* new ticket client */
+                                          krb5_const_principal, /* new ticket client */
                                           const krb5_principal, /* delegation proxy */
                                           hdb_entry *,/* client */
                                           hdb_entry *,/* server */
@@ -81,7 +81,7 @@ typedef krb5_error_code
 typedef krb5_error_code
 (KRB5_CALLCONV *krb5plugin_kdc_pac_update)(void *,
                                           astgs_request_t,
-                                          const krb5_principal, /* new ticket client */
+                                          krb5_const_principal, /* new ticket client */
                                           const krb5_principal, /* delegation proxy */
                                           hdb_entry *,/* client */
                                           hdb_entry *,/* server */
index 75b2578e27f48eee876c10edcc8df3b566fcdce9..98812b52e70409479302e52bb86cc97fa27ae82e 100644 (file)
@@ -56,7 +56,7 @@ pac_generate(void *ctx,
 static krb5_error_code KRB5_CALLCONV
 pac_verify(void *ctx,
           astgs_request_t r,
-          const krb5_principal new_ticket_client,
+          krb5_const_principal new_ticket_client,
           const krb5_principal delegation_proxy,
           hdb_entry * client,
           hdb_entry * server,