Allow Host / Domain Names starting with an Underscore [master] #1303
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Target Branch
This is the merge PR for master of PR #1301 / PR #1302.
Bugzilla
https://bugzilla.suse.com/show_bug.cgi?id=1219920
Problem
Modern DNS setups require using a leading underscore for hostnames in some situations, e.g.
_mydomain.example.com
. But that is not possible to enter in the YaST DNS Server module: Underscores are generally rejected.Fix
Allow a leading underscore for host and domain names. Not just anywhere, just as the leading character.
Since the check is in
Hostname.rb
which belongs to the yast2 package (repo yast-yast2), this is not in theyast2-dns-server
package where it might be expected.Known Limitation
This allows a leading underscore for all components of a FQDN in all circumstances. Users need to have some expertise to know when that is suitable.
The Error Message
The error message quoted in the bug remains the same; we are not changing it, so not all translations will be broken, resulting in purely English error messages for all international users. The message does not contain anything about the leading underscore. But the message should not appear when this is used correctly.
Screenshot
Notice that leading underscores are now allowed, while underscores in other places are not.
Testing
Manual testing with
sudo yast2 dns-server
after a manualsudo rake install
.Reference
Related PRs