Bugzilla – Attachment 493672 Details for
Bug 758769
DNS-Server-Module missing "SPF" Record type
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Forgot Password
[patch]
Patch for DNS Server
dns-server-SPF-Record.diff (text/plain), 3.90 KB, created by
Lukas Ocilka
on 2012-06-05 14:13:50 UTC
(
hide
)
Description:
Patch for DNS Server
Filename:
MIME Type:
Creator:
Lukas Ocilka
Created:
2012-06-05 14:13:50 UTC
Size:
3.90 KB
patch
obsolete
>diff --git a/src/dialog-masterzone.ycp b/src/dialog-masterzone.ycp >index 7e1ef7f..5a3013d 100644 >--- a/src/dialog-masterzone.ycp >+++ b/src/dialog-masterzone.ycp >@@ -36,6 +36,8 @@ include "dns-server/misc.ycp"; > > list <string> available_zones_to_connect = []; > >+integer max_text_record_length = 255; >+ > /** > * Dialog Tab - Zone Editor - Basics > * @return term for Get_ZoneEditorTab() >@@ -1014,7 +1016,7 @@ term GetEditationWidgets (string rec_type) { > > break; > >- // "A", "AAAA", "CNAME", "NS", "PTR", "TXT" >+ // "A", "AAAA", "CNAME", "NS", "PTR", "TXT", "SPF" > default: > ret = `HBox ( > // Textentry - zone settings - Record Name >@@ -1043,7 +1045,7 @@ term GetMasterZoneEditorTabRecords () { > if (DnsServerHelperFunctions::IsReverseZone (current_zone["zone"]:"")) { > supported_records = [ "PTR", "NS" ]; > } else { >- supported_records = [ "A", "AAAA", "CNAME", "NS", "MX", "SRV", "TXT" ]; >+ supported_records = [ "A", "AAAA", "CNAME", "NS", "MX", "SRV", "TXT", "SPF" ]; > } > > map record_type_descriptions = $[ >@@ -1055,6 +1057,7 @@ term GetMasterZoneEditorTabRecords () { > "PTR" : _("PTR: Reverse Translation"), > "SRV" : _("SRV: Services Record"), > "TXT" : _("TXT: Text Record"), >+ "SPF" : _("SPF: Sender Policy Framework"), > ]; > > supported_records = maplist (any one_rec_type, supported_records, ``( >@@ -1177,7 +1180,7 @@ void AdjustEditationWidgets (map current_record, string & decoded_zone_name, str > > break; > >- // "A", "AAAA", "CNAME", "NS", "PTR", "TXT" >+ // "A", "AAAA", "CNAME", "NS", "PTR", "TXT", "SPF" > default: > break; > }; >@@ -1306,7 +1309,7 @@ void StoreZoneRecordsTab () { > /** > * Checks whether a given string is a valid TXT record key (name) > */ >-boolean ValidTXTRecordName (string name) { >+boolean ValidTextRecordName (string name) { > // Checking the length > if (name == nil || name == "") { > y2warning ("TXT record key must not be empty"); >@@ -1490,20 +1493,22 @@ or in the relative form to the current zone."), "*.ip6.arpa.")); > } > return true; > >- // -- TXT -- \\ >- } else if (type == "TXT") { >- if (! ValidTXTRecordName(key)) { >+ // -- TXT or SPF -- \\ >+ } else if (type == "TXT" || type == "SPF") { >+ if (! ValidTextRecordName(key)) { > UI::SetFocus ( `id ("add_record_name") ); >- Popup::Error (_("Invalid TXT record key. It should consist of printable US-ASCII characters excluding '=' >-and must be at least one character long.")); >+ // Error pop-up message, %1 is replaced with TXT or SPF >+ Popup::Error (sformat(_("Invalid %1 record key. It should consist of printable US-ASCII characters excluding '=' >+and must be at least one character long."), type)); > return false; > } >- if (size (val) > 255) { >+ if (size (val) > max_text_record_length) { > UI::SetFocus (`id ("add_record_val")); >- // TRANSLATORS: Error message, %1 is replaced with the maximal length >- // %2 with the current length of a new TXT record. >- Popup::Error (sformat(_("Maximal length of a TXT record is %1 characters. >-This message is %2 characters long."), 255, size (val))); >+ // TRANSLATORS: Error message, %1 is replaced with either TXT or SPF, >+ // %2 with the maximal length, >+ // %3 with the current length of a new record >+ Popup::Error (sformat(_("Maximal %1 record length is %2 characters. >+This one is %3 characters long."), type, max_text_record_length, size (val))); > return false; > } > return true; >@@ -1549,7 +1554,7 @@ boolean CheckNewZoneRecordLogic (map <string, string> record) { > } else if (type == "SRV") { > // FIXME: SRV should point to an A or AAAA record (if it is in the same domain) > return true; >- } else if (type == "TXT") { >+ } else if (type == "TXT" || type == "SPF") { > return true; > } > >@@ -1719,7 +1724,7 @@ symbol HandleZoneRecordsTab (map event) { > > break; > >- // "A", "AAAA", "CNAME", "NS", "PTR", "TXT" >+ // "A", "AAAA", "CNAME", "NS", "PTR", "TXT", "SPF" > default: > break; > };
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 758769
:
488513
| 493672