Nikolay Sivov : kerberos: Separate ticket query function from call handler.
Alexandre Julliard
julliard at winehq.org
Mon May 30 15:34:58 CDT 2022
Module: wine
Branch: master
Commit: ce8aed90edabc00f52ffd70beafd2198f458edfb
URL: https://source.winehq.org/git/wine.git/?a=commit;h=ce8aed90edabc00f52ffd70beafd2198f458edfb
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Sat May 28 19:31:26 2022 +0300
kerberos: Separate ticket query function from call handler.
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
dlls/kerberos/unixlib.c | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/dlls/kerberos/unixlib.c b/dlls/kerberos/unixlib.c
index 38b1cf50895..95e832e81d3 100644
--- a/dlls/kerberos/unixlib.c
+++ b/dlls/kerberos/unixlib.c
@@ -303,16 +303,13 @@ static NTSTATUS copy_tickets_to_client( struct ticket_list *list, KERB_QUERY_TKT
return STATUS_SUCCESS;
}
-static NTSTATUS query_ticket_cache( void *args )
+static NTSTATUS kerberos_fill_ticket_list( struct ticket_list *list )
{
- struct query_ticket_cache_params *params = args;
NTSTATUS status;
krb5_error_code err;
krb5_context ctx;
krb5_cccol_cursor cursor = NULL;
krb5_ccache cache;
- ULONG i;
- struct ticket_list list = { 0 };
if ((err = p_krb5_init_context( &ctx ))) return krb5_error_to_status( err );
if ((err = p_krb5_cccol_cursor_new( ctx, &cursor )))
@@ -330,7 +327,7 @@ static NTSTATUS query_ticket_cache( void *args )
}
if (!cache) break;
- status = copy_tickets_from_cache( ctx, cache, &list );
+ status = copy_tickets_from_cache( ctx, cache, list );
p_krb5_cc_close( ctx, cache );
if (status != STATUS_SUCCESS) goto done;
}
@@ -339,6 +336,18 @@ done:
if (cursor) p_krb5_cccol_cursor_free( ctx, &cursor );
if (ctx) p_krb5_free_context( ctx );
+ return status;
+}
+
+static NTSTATUS query_ticket_cache( void *args )
+{
+ struct query_ticket_cache_params *params = args;
+ struct ticket_list list = { 0 };
+ NTSTATUS status;
+ ULONG i;
+
+ status = kerberos_fill_ticket_list( &list );
+
if (status == STATUS_SUCCESS) status = copy_tickets_to_client( &list, params->resp, params->out_size );
for (i = 0; i < list.count; i++)
More information about the wine-cvs
mailing list