The Samba-Bugzilla – Attachment 18108 Details for
Bug 15476
The KDC in 4.18 (and older) is not able to accept tickets with empty claims pac blobs (from Samba 4.19 or Windows)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Patch for v4-18-test
bug15476-v4-18.txt (text/plain), 1.91 KB, created by
Stefan Metzmacher
on 2023-09-19 21:39:14 UTC
(
hide
)
Description:
Patch for v4-18-test
Filename:
MIME Type:
Creator:
Stefan Metzmacher
Created:
2023-09-19 21:39:14 UTC
Size:
1.91 KB
patch
obsolete
>From 096afc3c8f1dbe65909813048293bc617685b520 Mon Sep 17 00:00:00 2001 >From: Joseph Sutton <josephsutton@catalyst.net.nz> >Date: Fri, 17 Mar 2023 09:16:17 +1300 >Subject: [PATCH] s4:kdc: Avoid copying data if not needed > >krb5_pac_add_buffer() makes its own copy of the data we pass in. We >don't need to make yet another copy. > >Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> >Reviewed-by: Andrew Bartlett <abartlet@samba.org> >(cherry picked from commit fa901e7346d36ae64a7ceab5dcf76bc210a67c93) > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=15476 >--- > source4/kdc/pac-glue.c | 23 ++++++++++++----------- > 1 file changed, 12 insertions(+), 11 deletions(-) > >diff --git a/source4/kdc/pac-glue.c b/source4/kdc/pac-glue.c >index f844b08d5139..20a0debd7add 100644 >--- a/source4/kdc/pac-glue.c >+++ b/source4/kdc/pac-glue.c >@@ -1936,12 +1936,9 @@ krb5_error_code samba_kdc_update_pac(TALLOC_CTX *mem_ctx, > } > > if (type_blob.length != 0) { >- code = smb_krb5_copy_data_contents(&type_data, >- type_blob.data, >- type_blob.length); >- if (code != 0) { >- goto done; >- } >+ type_data = smb_krb5_data_from_blob(type_blob); >+ code = krb5_pac_add_buffer(context, new_pac, >+ type, &type_data); > } else { > code = krb5_pac_get_buffer(context, > old_pac, >@@ -1950,13 +1947,17 @@ krb5_error_code samba_kdc_update_pac(TALLOC_CTX *mem_ctx, > if (code != 0) { > goto done; > } >+ /* >+ * Passing a NULL pointer into krb5_pac_add_buffer() is >+ * not allowed, so pass null_data instead if needed. >+ */ >+ code = krb5_pac_add_buffer(context, >+ new_pac, >+ type, >+ (type_data.data != NULL) ? &type_data : &null_data); >+ smb_krb5_free_data_contents(context, &type_data); > } > >- code = krb5_pac_add_buffer(context, >- new_pac, >- type, >- &type_data); >- smb_krb5_free_data_contents(context, &type_data); > if (code != 0) { > goto done; > } >-- >2.34.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 15476
:
18108
|
18109
|
18110
|
18111