The smbkrb5passwd flag commands the ebuild to make and install an overlay called smbk5pwd. When smbkrb5passwd is used, the ebuild defines DO_KRB5 and DO_SAMBA in the call to emake. That builds smbk5pwd with support for kerberos and samba, even if those flags are not set for openldap.
Steps to Reproduce:
1. USE="smbkrb5passwd samba -kerberos" emerge net-nds/openldap
2. Add smbk5pwd overlay to an existing database, with samba schema but no kerberos schema.
This error gets printed to /var/log/messages:
smbk5pwd: unable to initialize krb5 admin context: unable to find realm of host
I want to be able to build support on my system for samba, but not for kerberos, and still be able to use smbk5pwd with openldap.
Created attachment 334850 [details, diff]
Patch net-nds/openldap-2.4.33-r1 to honor samba and kerberos flags when building smbk5pwd.
MY_KRB5_INC="" should be outside 'if use samba' branch.