Bug 1852812

Summary: Fix adding additional-dns-hostnames to keytab with windows DC [rhel-7.9.z]
Product: Red Hat Enterprise Linux 7 Reporter: Isaac Boukris <iboukris>
Component: sambaAssignee: Isaac Boukris <iboukris>
Status: CLOSED ERRATA QA Contact: Denis Karpelevich <dkarpele>
Severity: high Docs Contact:
Priority: high    
Version: 7.9CC: adzilsky, amarecek, asn, dkarpele, ftrivino, gdeschner, iboukris, jarrpa, jreznik, nsoman, pvlasin, tscherf
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: samba-4.10.16-7.el7_9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-09-29 21:18:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Isaac Boukris 2020-07-01 11:04:40 UTC
The fix in bug #1828354 (in 7.9 branch) is incomplete and does not work against Windows DC.

Comment 4 Andreas Schneider 2020-07-02 12:26:03 UTC
This is an additional fix needed to complete bug #1828354. A Windows DC implicitly adds a short name for each FQDN added to msDS-AdditionalDnsHostName, but it comes with a strage binary suffix "\0$" which we Samba should ignore.

As we don't ignore this this suffix the additonal dnshostnames are not added as entries to the KRB5 keytab we create. The change is simple enough that instead of just using the provided UTF8 string we use a conversion function from UTF8 to the configured unix charset.

If we don't fix this, we will not be able to create correct keytabs which will create problems for customers which need a valid keytab. The change is covered by upstream test and also will be tested by our QA.

Comment 5 Andreas Schneider 2020-07-02 12:28:17 UTC
The code only touches the 'net ads keytab create' command. No other components have been changes. It is easy to test and confirm that the tool is working correctly.

Comment 17 errata-xmlrpc 2020-09-29 21:18:03 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (samba bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:4069