Hello community,
here is the log from the commit of package yast2-instserver for openSUSE:Factory
checked in at Wed Apr 8 16:12:17 CEST 2009.
--------
--- yast2-instserver/yast2-instserver.changes 2009-03-18 09:51:07.000000000 +0100
+++ /mounts/work_src_done/STABLE/yast2-instserver/yast2-instserver.changes 2009-04-08 15:13:03.684495000 +0200
@@ -1,0 +2,7 @@
+Wed Apr 8 14:48:26 CEST 2009 - lslezak@suse.cz
+
+- fixed SLP config - escape special characters and use [] brackets
+ instead of (), they have special meaning (bnc#492367)
+- 2.18.1
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
yast2-instserver-2.18.0.tar.bz2
New:
----
yast2-instserver-2.18.1.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-instserver.spec ++++++
--- /var/tmp/diff_new_pack.bj8519/_old 2009-04-08 16:12:11.000000000 +0200
+++ /var/tmp/diff_new_pack.bj8519/_new 2009-04-08 16:12:11.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-instserver (Version 2.18.0)
+# spec file for package yast2-instserver (Version 2.18.1)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -20,12 +20,12 @@
Url: http://www.suse.com/
Name: yast2-instserver
-Version: 2.18.0
+Version: 2.18.1
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-instserver-2.18.0.tar.bz2
+Source0: yast2-instserver-2.18.1.tar.bz2
Prefix: /usr
BuildRequires: perl-XML-Writer update-desktop-files yast2 yast2-devtools yast2-slp yast2-testsuite
# ag_content agent
@@ -47,7 +47,7 @@
Anas Nashif
%prep
-%setup -n yast2-instserver-2.18.0
+%setup -n yast2-instserver-2.18.1
%build
%{prefix}/bin/y2tool y2autoconf
@@ -83,6 +83,10 @@
%dir /etc/apache2
%dir /etc/apache2/conf.d
%changelog
+* Wed Apr 08 2009 lslezak@suse.cz
+- fixed SLP config - escape special characters and use [] brackets
+ instead of (), they have special meaning (bnc#492367)
+- 2.18.1
* Wed Mar 18 2009 lslezak@suse.cz
- write correct IP address to SLP config file when there is no eth0
device (bnc#475676)
@@ -307,5 +311,5 @@
- Support for SLES8/ SLES8 products
- Support for adding from ISO images
- HTTP/NFS/FTP support
-* Tue Feb 10 2004 nashif@suse.de
+* Wed Feb 11 2004 nashif@suse.de
- initial version
++++++ yast2-instserver-2.18.0.tar.bz2 -> yast2-instserver-2.18.1.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-instserver-2.18.0/src/Instserver.ycp new/yast2-instserver-2.18.1/src/Instserver.ycp
--- old/yast2-instserver-2.18.0/src/Instserver.ycp 2009-03-18 09:49:07.000000000 +0100
+++ new/yast2-instserver-2.18.1/src/Instserver.ycp 2009-04-08 15:12:03.000000000 +0200
@@ -4,7 +4,7 @@
* Summary: Installation Server settings, input and output functions
* Authors: Anas Nashif
*
- * $Id: Instserver.ycp 56196 2009-03-18 08:49:06Z lslezak $
+ * $Id: Instserver.ycp 56696 2009-04-08 13:12:03Z lslezak $
*
* Representation of the configuration of Installation Server.
* Input and output routines.
@@ -539,6 +539,39 @@
return true;
}
+// some values are not allowed in SLP attributes
+// and must be escaped ('\' followed by two hex numbers)
+// see RFC2614 (http://www.openslp.org/doc/rfc/rfc2614.txt)
+map EscapeSLPData(map a)
+{
+ map ret = $[];
+
+ foreach(string key, string value, a,
+ {
+ // String::Replace() enters endless loop in '\' -> '\5c' conversion
+ // use splitstring() and mergestring() builtins instead
+ string new_key = mergestring(splitstring(key, "\\"), "\\5c");
+ new_key = String::Replace(new_key, ".", "\\2e");
+ new_key = String::Replace(new_key, "=", "\\3d");
+ new_key = String::Replace(new_key, "#", "\\23");
+ new_key = String::Replace(new_key, ";", "\\3b");
+
+ string new_value = mergestring(splitstring(value, "\\"), "\\5c");
+ new_value = String::Replace(new_value, "(", "\\28");
+ new_value = String::Replace(new_value, ")", "\\29");
+ new_value = String::Replace(new_value, ",", "\\2c");
+ new_value = String::Replace(new_value, "#", "\\23");
+ new_value = String::Replace(new_value, ";", "\\3b");
+
+ ret[new_key] = new_value;
+ }
+ );
+
+ y2milestone("Escaped SLP attributes: %1 -> %2", a, ret);
+
+ return ret;
+}
+
/*
* Return the IP address of the local machine
* @return string IP Address
@@ -622,7 +655,12 @@
hostname_reg = hostname + ": ";
}
- string descr = hostname_reg + sformat("%1 (%2)", cm["LABEL"]:"" , cm["DISTPRODUCT"]:"" );
+ string descr = hostname_reg + cm["LABEL"]:"";
+ if (cm["DISTPRODUCT"]:"" != "")
+ {
+ descr = descr + sformat(" [%2]", cm["DISTPRODUCT"]:"");
+ }
+
attr["description"] = descr;
string read_file = targetfile;
@@ -686,6 +724,9 @@
*/
}
+ // escape invalid characters
+ attr = EscapeSLPData(attr);
+
y2milestone("registering SLP service: serv: %1, attr: %2, regfile: %3", serv, attr, regfile);
boolean ret = SLP::RegFile(serv, attr, regfile );
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-instserver-2.18.0/testsuite/tests/Instserver.out new/yast2-instserver-2.18.1/testsuite/tests/Instserver.out
--- old/yast2-instserver-2.18.0/testsuite/tests/Instserver.out 2007-05-18 12:49:02.000000000 +0200
+++ new/yast2-instserver-2.18.1/testsuite/tests/Instserver.out 2009-04-08 13:55:57.000000000 +0200
@@ -1,2 +1,6 @@
Dump Instserver::Modified
Return false
+Dump Instserver::EscapeSLPData()
+Return $["description":"No need to escpace anything."]
+Return $["description":"Rounded brackets \\28\\29\\2c \\5c backslash and comma \\2c must be escpaced."]
+Return $["escaped\\2e\\3dname":"value\\5c\\5c\\5c."]
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-instserver-2.18.0/testsuite/tests/Instserver.ycp new/yast2-instserver-2.18.1/testsuite/tests/Instserver.ycp
--- old/yast2-instserver-2.18.0/testsuite/tests/Instserver.ycp 2007-07-19 14:01:58.000000000 +0200
+++ new/yast2-instserver-2.18.1/testsuite/tests/Instserver.ycp 2009-04-08 13:54:59.000000000 +0200
@@ -10,4 +10,8 @@
DUMP("Instserver::Modified");
TEST(``(Instserver::Modified()), [], nil);
+DUMP("Instserver::EscapeSLPData()");
+TEST(``(Instserver::EscapeSLPData($["description" : "No need to escpace anything."])), [], nil);
+TEST(``(Instserver::EscapeSLPData($["description" : "Rounded brackets (), \\ backslash and comma , must be escpaced."])), [], nil);
+TEST(``(Instserver::EscapeSLPData($["escaped.=name" : "value\\\\\\."])), [], nil);
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-instserver-2.18.0/VERSION new/yast2-instserver-2.18.1/VERSION
--- old/yast2-instserver-2.18.0/VERSION 2009-03-18 09:08:11.000000000 +0100
+++ new/yast2-instserver-2.18.1/VERSION 2009-04-08 15:05:14.000000000 +0200
@@ -1 +1 @@
-2.18.0
+2.18.1
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org