Properly convert DNS names with '-' characters to valid dbus object paths
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
adsys (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
High
|
Matthew Ruffell | ||
Jammy |
Fix Released
|
High
|
Matthew Ruffell | ||
Kinetic |
Won't Fix
|
High
|
Matthew Ruffell |
Bug Description
[Impact]
It is common that domain names contain the '-' character, as in "test-example.com", and adsys versions 0.9.2 and below cannot parse these correctly, leading to the error:
ERRORgithub.
when attempting to run adsys on a system attached to "test-example.com" Active Directory.
Currently, 0.9.2 only changes '.' into '_2e', and this would change all special characters to use their hexadecimal representations, notably '-' becomes '_2d'.
There is plans from Foundations + Desktop to SRU 0.12.0 back to at least Jammy, documented in bug 2020682 which depends on golang 1.20 to be included in the jammy archive, documented in bug 2020658. However, this fixup is required with high priority while the 0.12.0 release is being prepared, and the SRU will hopefully bridge a few weeks between SRU release to release of 0.12.0.
[Testcase]
Start a Windows Server VM, 2022 will be fine, and create an Active Directory with the domain "test-example.com".
Launch a Focal, or Jammy, or Kinetic VM, and use SSSD to join the domain.
Try to enable adsys:
$ sudo apt install adsys
$ adsysctl update
ERRORgithub.
There are test packages in the below ppa:
https:/
If you install the test package and retry to join the domain, it will succeed.
[Where problems could occur]
We are changing how domain names are being parsed and converted to valid dbus object path names. Domain names can only contain [0-9], [A-Z], [a-z], [.], and [-], so by adding '-' to being processed to its hexadecimal representation of '_2d', there should be limited scope of regressions.
However, if a regression were to occur, then users may not be able to use adsys to apply group policy restrictions, and could run into issues accessing files, shares and networks.
As mentioned in the impact section, this will be a temporary fix to 0.9.2 while 0.12.0 is being prepared to be released into the archive, which contains the full fix and testsuite coverage. This SRU should hopefully be short lived.
[Other Info]
The upstream merge request is:
https:/
This was fixed in 0.10.0 by the commit:
commit 5752ba87347d781
Author: Didier Roche <email address hidden>
Date: Tue Nov 15 11:10:51 2022 +0100
Subject: Fix special characters in domain conversion to dbus object path
Link: https:/
Now, there were some additional commits that added testsuite coverage:
commit cd79b3f81441a3d
Author: Didier Roche <email address hidden>
Date: Tue Nov 15 11:13:03 2022 +0100
Subject: Refresh golden file now that we properly handle the path.
Link: https:/
commit 4571e39cd724a97
Author: Didier Roche <email address hidden>
Date: Tue Nov 15 11:14:35 2022 +0100
Subject: Use a better case to assert on ServerURL() failure being ignored.
Link: https:/
commit fdca6e462c26e1c
Author: Didier Roche <email address hidden>
Date: Tue Nov 15 11:16:21 2022 +0100
Subject: Add a separate case for special characters in domain name.
Link: https:/
These commits are not compatible with 0.9.2 due to testsuite harnesses and frameworks and test data files not being added until 0.10.0, and adding such commits is numerous, and contains too many changes for a SRU. Regrettably, the testsuite commits must be omitted.
tags: | added: sts |
Changed in adsys (Ubuntu Focal): | |
status: | New → In Progress |
Changed in adsys (Ubuntu Jammy): | |
status: | New → In Progress |
Changed in adsys (Ubuntu Kinetic): | |
status: | New → In Progress |
Changed in adsys (Ubuntu): | |
status: | New → Fix Released |
Changed in adsys (Ubuntu Focal): | |
importance: | Undecided → High |
Changed in adsys (Ubuntu Jammy): | |
importance: | Undecided → High |
Changed in adsys (Ubuntu Kinetic): | |
importance: | Undecided → High |
Changed in adsys (Ubuntu Focal): | |
assignee: | nobody → Matthew Ruffell (mruffell) |
Changed in adsys (Ubuntu Jammy): | |
assignee: | nobody → Matthew Ruffell (mruffell) |
Changed in adsys (Ubuntu Kinetic): | |
assignee: | nobody → Matthew Ruffell (mruffell) |
description: | updated |
description: | updated |
tags: | added: sts-sponsor |
tags: |
added: se-sponsor-halves removed: sts-sponsor |
description: | updated |
description: | updated |
tags: |
added: verification-done-focal verification-done-jammy removed: verification-needed-focal verification-needed-jammy |
Changed in adsys (Ubuntu Jammy): | |
status: | Fix Committed → Fix Released |
Attached is a debdiff for Kinetic. Note the package uses a debian/ source/ format of "3.0 (native)", and I did not use quilt to prepare the patch.