Author: gs Date: Wed Jul 30 14:57:31 2008 New Revision: 49519 URL: http://svn.opensuse.org/viewcvs/yast?rev=49519&view=rev Log: write settings from logfile dialog Modified: trunk/auditd/src/complex.ycp Modified: trunk/auditd/src/complex.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/auditd/src/complex.ycp?rev=49519&r1=49518&r2=49519&view=diff ============================================================================== --- trunk/auditd/src/complex.ycp (original) +++ trunk/auditd/src/complex.ycp Wed Jul 30 14:57:31 2008 @@ -82,10 +82,10 @@ void InitLogfileSettingsDialog (string id) { UI::ChangeWidget( `id("max_log_file"), `ValidChars, "0123456789" ); - + + // Set all values to values read from /etc/audit/auditd.conf UI::ChangeWidget( `id("freq"), `Value, tointeger( Auditd::GetAuditdOption("freq")) ); UI::ChangeWidget( `id("num_logs"), `Value, tointeger( Auditd::GetAuditdOption("num_logs")) ); - foreach (string key, ["log_file", "log_format", "max_log_file", @@ -121,17 +121,21 @@ void StoreLogfileSettingsDialog (string id, map event) { Auditd::SetModified( true ); - y2milestone( "set option to: %1", (string)UI::QueryWidget( `id("log_file"), `Value ) ); - Auditd::SetAuditdOption( "log_file", (string)UI::QueryWidget( `id("log_file"), `Value ) ); - // Stores all boolean values and turns them to the "yes"/"no" notation - //foreach (string key, ["AllowTcpForwarding", "X11Forwarding", "Compression"], { - //Sshd::SetSSHDOption( - //key, - //[ (((boolean) UI::QueryWidget(`id(key), `Value) == true) ? "yes":"no") ] - //); - //}); - y2milestone( "Store logfile settings"); + // Store all values in SETTINGS + Auditd::SetAuditdOption( "freq", tostring( (integer)UI::QueryWidget( `id("freq"), `Value ) ) ); + Auditd::SetAuditdOption( "num_logs", tostring( (integer)UI::QueryWidget( `id("num_logs"), `Value ) ) ); + + foreach (string key, ["log_file", + "log_format", + "max_log_file", + "flush", + "max_log_file_action", + "name_format", + "name"], { + Auditd::SetAuditdOption( key, (string) UI::QueryWidget(`id(key), `Value) ); + }); + y2milestone( "Store logfile settings" ); } void InitDispatcherDialog (string id) { -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org