Author: ug
Date: Thu Jan 17 16:21:22 2008
New Revision: 43718
URL: http://svn.opensuse.org/viewcvs/yast?rev=43718&view=rev
Log:
ShellEscape code added. 2.16.6
Modified:
trunk/autoinstallation/VERSION
trunk/autoinstallation/package/autoyast2.changes
trunk/autoinstallation/src/modules/AutoinstConfig.ycp
trunk/autoinstallation/src/modules/AutoinstScripts.ycp
trunk/autoinstallation/src/modules/ProfileLocation.ycp
trunk/autoinstallation/src/schema/general.rnc
Modified: trunk/autoinstallation/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/VERSION?rev=43718&r1=43717&r2=43718&view=diff
==============================================================================
--- trunk/autoinstallation/VERSION (original)
+++ trunk/autoinstallation/VERSION Thu Jan 17 16:21:22 2008
@@ -1 +1 @@
-2.16.5
+2.16.6
Modified: trunk/autoinstallation/package/autoyast2.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/package/autoyast2.changes?rev=43718&r1=43717&r2=43718&view=diff
==============================================================================
--- trunk/autoinstallation/package/autoyast2.changes (original)
+++ trunk/autoinstallation/package/autoyast2.changes Thu Jan 17 16:21:22 2008
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Thu Jan 17 15:48:52 CET 2008 - ug@suse.de
+
+- ShellEscape Code added
+- 2.16.6
+
+-------------------------------------------------------------------
Tue Jan 15 17:01:53 CET 2008 - ug@suse.de
- the "path" for an ask-question can be in a list now to
Modified: trunk/autoinstallation/src/modules/AutoinstConfig.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/src/modules/AutoinstConfig.ycp?rev=43718&r1=43717&r2=43718&view=diff
==============================================================================
--- trunk/autoinstallation/src/modules/AutoinstConfig.ycp (original)
+++ trunk/autoinstallation/src/modules/AutoinstConfig.ycp Thu Jan 17 16:21:22 2008
@@ -290,6 +290,24 @@
}
/**
+ * escape a string so it can be passed to a shell
+ * @return escaped string string
+ */
+ global define string ShellEscape( string s ) ``{
+ integer i = 0;
+ string res = "";
+
+ while( ihttp://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/src/modules/AutoinstScripts.ycp?rev=43718&r1=43717&r2=43718&view=diff
==============================================================================
--- trunk/autoinstallation/src/modules/AutoinstScripts.ycp (original)
+++ trunk/autoinstallation/src/modules/AutoinstScripts.ycp Thu Jan 17 16:21:22 2008
@@ -433,10 +433,10 @@
any ret = UI::UserInput();
if( widget == "radiobutton" ) {
any val = UI::QueryWidget(`id(`rb), `CurrentButton);
- SCR::Execute (.target.bash, sformat("echo \"%1\" > /tmp/ay_ipipe", val ), $[]);
+ SCR::Execute (.target.bash, sformat("echo \"%1\" > /tmp/ay_ipipe", AutoinstConfig::ShellEscape((string)val) ), $[]);
} else if( widget == "entry" ) {
any val = UI::QueryWidget(`id(`ay_entry), `Value);
- SCR::Execute (.target.bash, sformat("echo \"%1\" > /tmp/ay_ipipe", (string)(val) ), $[]);
+ SCR::Execute (.target.bash, sformat("echo \"%1\" > /tmp/ay_ipipe", AutoinstConfig::ShellEscape((string)(val)) ), $[]);
}
ok_button = false;
}
Modified: trunk/autoinstallation/src/modules/ProfileLocation.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/src/modules/ProfileLocation.ycp?rev=43718&r1=43717&r2=43718&view=diff
==============================================================================
--- trunk/autoinstallation/src/modules/ProfileLocation.ycp (original)
+++ trunk/autoinstallation/src/modules/ProfileLocation.ycp Thu Jan 17 16:21:22 2008
@@ -111,7 +111,7 @@
p = (string) UI::QueryWidget(`id(`password), `Value);
} until ( button == `ok );
UI::CloseDialog();
- SCR::Execute( .target.bash, sformat("gpg2 --batch --output \"/tmp/decrypt.xml\" --passphrase \"%1\" %2",p, localfile) );
+ SCR::Execute( .target.bash, sformat("gpg2 --batch --output \"/tmp/decrypt.xml\" --passphrase \"%1\" %2",AutoinstConfig::ShellEscape(p), localfile) );
if( SCR::Read (.target.size, "/tmp/decrypt.xml") > 0 ) {
SCR::Execute( .target.bash, sformat("mv /tmp/decrypt.xml %1",localfile) );
y2milestone("decrypted. Moving now /tmp/decrypt.xml to %1",localfile);
Modified: trunk/autoinstallation/src/schema/general.rnc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/src/schema/general.rnc?rev=43718&r1=43717&r2=43718&view=diff
==============================================================================
--- trunk/autoinstallation/src/schema/general.rnc (original)
+++ trunk/autoinstallation/src/schema/general.rnc Thu Jan 17 16:21:22 2008
@@ -4,7 +4,7 @@
general = element general { mode? & mouse? & ask-list? & signature-handling? }
ask-list = element ask-list { LIST, ask* }
-ask = element ask { ask_question? & ask_default? & ask_help? & ask_title? & ask_type? & ask_password? & ask_path & ask_stage? & ask_selection? & ask_file? & ask_dialog? & ask_element? & ask_frametitle? & ask_script? }
+ask = element ask { ask_question? & ask_default? & ask_help? & ask_title? & ask_type? & ask_password? & ask_path? & ask_pathlist? & ask_stage? & ask_selection? & ask_file? & ask_dialog? & ask_element? & ask_frametitle? & ask_script? }
ask_question = element question { text }
ask_default = element default { text }
ask_help = element help { text }
@@ -21,6 +21,11 @@
ask_dialog = element dialog { text }
ask_element = element element { text }
ask_frametitle = element frametitle { text }
+ask_pathlist = element pathlist {
+ LIST,
+ ask_path*
+}
+
signature-handling = element signature-handling { accept_unsigned_file? & accept_file_without_checksum? & accept_verification_failed? & accept_unknown_gpg_key? & import_gpg_key? & accept_non_trusted_gpg_key? }
accept_unsigned_file = element accept_unsigned_file { BOOLEAN }
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org