Bug 15860 - Compilation Issue in v4-22-stable Due to Heimdal-Specific Function Usage
Summary: Compilation Issue in v4-22-stable Due to Heimdal-Specific Function Usage
Status: RESOLVED INVALID
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Tools (show other bugs)
Version: 4.22.0
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-22 06:08 UTC by Pawan Sahu
Modified: 2025-05-29 21:11 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pawan Sahu 2025-05-22 06:08:01 UTC
We encountered a compilation issue in the v4-22-stable branch due to the following commit made approximately two months ago:
 
https://gitlab.com/samba-team/samba/-/commit/83c60df6e8dd604c4954e1b444b8d2332dbff62b
 
In this commit, the file source3/libads/kerberos_keytab.c uses the function smb_krb5_parse_name_flags, which is specific to HEIMDAL.
This function internally relies on the flag KRB5_PRINCIPAL_PARSE_NO_REALM, which is not available in MIT Kerberos, resulting in a compilation failure on systems using MIT Kerberos.
 
To address this issue, we suggest guarding the Heimdal-specific code with a conditional preprocessor directive, as shown below:
 
#ifdef HEIMDAL
// Heimdal-specific code here
smb_krb5_parse_name_flags(...);
#else
// MIT Kerberos-compatible code
smb_krb5_parse_name(...);
#endif
 
We implemented the above change locally and were able to compile successfully.
 
Please let us know if a patch can be submitted for this, or if any additional steps are required from our side.

Name: Pawan Sahu
Mail: Pawan.Sahu1@ibm.com
 
Thanks & Regards,
Pawan Sahu
Comment 1 Jennifer Sutton 2025-05-23 00:12:26 UTC
I don’t understand. smb_krb5_parse_name_flags() is implemented in lib/krb5_wrap/krb5_samba.c. It’s not Heimdal‐specific.
Comment 2 Douglas Bagnall 2025-05-23 02:11:08 UTC
(In reply to Jennifer Sutton from comment #1)
And MIT has used KRB5_PRINCIPAL_PARSE_NO_REALM for a very long time.

https://web.mit.edu/Kerberos/www/krb5-1.11/doc/appdev/refs/macros/KRB5_PRINCIPAL_PARSE_NO_REALM.html

There may be some other problem with your build.
Comment 3 Douglas Bagnall 2025-05-29 21:11:04 UTC
Pawan, please reopen if you can find the real problem, and it is a Samba issue.