[yast-commit] r67927 - in /branches/SuSE-Code-11-SP2-Branch/dns-server: agents/ag_dns_zone package/yast2-dns-server.changes
Author: locilka Date: Thu Apr 12 14:50:55 2012 New Revision: 67927 URL: http://svn.opensuse.org/viewcvs/yast?rev=67927&view=rev Log: - Fixed zone-file agent to handle semicolons in TXT records correctly instead of considering them to represent comments (bnc#755766). Modified: branches/SuSE-Code-11-SP2-Branch/dns-server/agents/ag_dns_zone branches/SuSE-Code-11-SP2-Branch/dns-server/package/yast2-dns-server.changes Modified: branches/SuSE-Code-11-SP2-Branch/dns-server/agents/ag_dns_zone URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/dns-server/agents/ag_dns_zone?rev=67927&r1=67926&r2=67927&view=diff ============================================================================== --- branches/SuSE-Code-11-SP2-Branch/dns-server/agents/ag_dns_zone (original) +++ branches/SuSE-Code-11-SP2-Branch/dns-server/agents/ag_dns_zone Thu Apr 12 14:50:55 2012 @@ -261,7 +261,20 @@ { my %rec = (); my $in = ""; my $ttl = ""; - ($rec{"key"}, $ttl, $in, $rec{"type"}, $rec{"value"}) = $line =~ /^([^ \t]*)([ \t]+[0-9a-zA-Z]+)?[ \t]*(IN)?[ \t]+([A-Za-z]+)[ \t]+([^;\n]+).*$/; + $line =~ s/^([^ \t]*)([ \t]+[0-9a-zA-Z]+)?[ \t]*(IN)?[ \t]+([A-Za-z]+)[ \t]+//; + ($rec{"key"}, $ttl, $in, $rec{"type"}, $rec{"value"}) = ($1, $2, $3, $4); + + # BNC #755766 + # TXT records (values) can contain semicolons + if ($rec{"type"} =~ /txt/i) { + $line =~ s/^(\"[^\n]*\")[ \t]*(;.*)?$//; + $rec{"value"} = $1; + $rec{"value"} =~ s/\"[ \t]\"//g; # several texts merged into one + # The other records consider each semicolon to be a comment + } else { + $line =~ s/^([^;\n]+).*$//; + $rec{"value"} = $1; + } # undefined key takes the key from the previous line if (!$rec{"key"}) { Modified: branches/SuSE-Code-11-SP2-Branch/dns-server/package/yast2-dns-server.changes URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/dns-server/package/yast2-dns-server.changes?rev=67927&r1=67926&r2=67927&view=diff ============================================================================== --- branches/SuSE-Code-11-SP2-Branch/dns-server/package/yast2-dns-server.changes (original) +++ branches/SuSE-Code-11-SP2-Branch/dns-server/package/yast2-dns-server.changes Thu Apr 12 14:50:55 2012 @@ -1,4 +1,11 @@ ------------------------------------------------------------------ +Thu Apr 12 12:05:03 CEST 2012 - locilka@suse.com + +- Fixed zone-file agent to handle semicolons in TXT records + correctly instead of considering them to represent comments + (bnc#755766). + +------------------------------------------------------------------ Mon Feb 13 18:06:25 CET 2012 - locilka@suse.com - Checking for and adding required LDAP schemas (yast, dnszone) -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
locilka@svn2.opensuse.org