[yast-commit] r52738 - in /trunk/audit-laf/src: AuditLaf.ycp complex.ycp dialogs.ycp helps.ycp
Author: gs Date: Thu Oct 30 14:49:05 2008 New Revision: 52738 URL: http://svn.opensuse.org/viewcvs/yast?rev=52738&view=rev Log: enable input field computer name only if format USER is selected, check for empty name Modified: trunk/audit-laf/src/AuditLaf.ycp trunk/audit-laf/src/complex.ycp trunk/audit-laf/src/dialogs.ycp trunk/audit-laf/src/helps.ycp Modified: trunk/audit-laf/src/AuditLaf.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/audit-laf/src/AuditLaf.ycp?rev=52738&r1=52737&r2=52738&view=diff ============================================================================== --- trunk/audit-laf/src/AuditLaf.ycp (original) +++ trunk/audit-laf/src/AuditLaf.ycp Thu Oct 30 14:49:05 2008 @@ -230,7 +230,6 @@ "dispatcher" : ["/sbin/audispd"], "disp_qos" : ["lossy"], "name_format": ["NONE"], - "name": [""], "max_log_file" : ["5"], "max_log_file_action" : ["ROTATE"], "space_left" : ["75"], @@ -273,7 +272,7 @@ global boolean SetAuditdOption( string key, string value ) { list <string> option_list = []; - // FIXME - allow empty values, e.g. for computer name (but not if FORMAT is set to USER) + // Don't set empty values (seems that 'auditd' doesn't like it) if ( value != "" ) { option_list = add( option_list, value ); Modified: trunk/audit-laf/src/complex.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/audit-laf/src/complex.ycp?rev=52738&r1=52737&r2=52738&view=diff ============================================================================== --- trunk/audit-laf/src/complex.ycp (original) +++ trunk/audit-laf/src/complex.ycp Thu Oct 30 14:49:05 2008 @@ -105,8 +105,15 @@ "name_format" ], { UI::ChangeWidget(`id(key), `Value, toupper(AuditLaf::GetAuditdOption(key)) ); + if ( key == "name_format" ) + { + if ( toupper(AuditLaf::GetAuditdOption(key) ) == "USER" ) + UI::ChangeWidget( `id("name"), `Enabled, true ); + else + UI::ChangeWidget( `id("name"), `Enabled, false ); + } }); - + y2milestone( "Init log file settings"); } @@ -123,6 +130,15 @@ UI::ChangeWidget( `id("log_file"), `Value, file_name ); y2milestone( "Logfile set to: %1", file_name ); } + else if ( action == "name_format" ) + { + string option = (string)UI::QueryWidget( `id("name_format"), `Value ); + if ( option == "USER" ) + UI::ChangeWidget( `id("name"), `Enabled, true ); + else + UI::ChangeWidget( `id("name"), `Enabled, false ); + + } return nil; } @@ -142,13 +158,27 @@ "max_log_file", "flush", "max_log_file_action", - "name_format", - "name" + "name_format" ], { AuditLaf::SetAuditdOption( key, (string) UI::QueryWidget(`id(key), `Value) ); }); - y2milestone( "Store log file settings" ); + if ( AuditLaf::GetAuditdOption( "name_format" ) == "USER" ) + { + if ( (string) UI::QueryWidget( `id("name"), `Value ) == "" ) + { + Report::Error(_("The 'User Defined Name' is NOT set although +the 'Computer Name Format' is set to 'USER'. +Setting the format to 'NONE' (default)." ) ); + AuditLaf::SetAuditdOption( "name_format", "NONE" ); + } + else + { + AuditLaf::SetAuditdOption( "name", (string) UI::QueryWidget(`id("name"), `Value) ); + } + } + + y2milestone( "Store log file settings" ); } /* Modified: trunk/audit-laf/src/dialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/audit-laf/src/dialogs.ycp?rev=52738&r1=52737&r2=52738&view=diff ============================================================================== --- trunk/audit-laf/src/dialogs.ycp (original) +++ trunk/audit-laf/src/dialogs.ycp Thu Oct 30 14:49:05 2008 @@ -115,7 +115,8 @@ _("Computer Names"), `HBox( // ComboBox label - `HWeight( 1, `ComboBox(`id("name_format"), _("&Computer Name Format"), + `HWeight( 1, `ComboBox(`id("name_format"), `opt(`notify), + _("&Computer Name Format"), [`item(`id("NONE"), "NONE" ), `item(`id("HOSTNAME"), "HOSTNAME", true ), `item(`id("FQD"), "FQD" ), Modified: trunk/audit-laf/src/helps.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/audit-laf/src/helps.ycp?rev=52738&r1=52737&r2=52738&view=diff ============================================================================== --- trunk/audit-laf/src/helps.ycp (original) +++ trunk/audit-laf/src/helps.ycp Thu Oct 30 14:49:05 2008 @@ -83,16 +83,20 @@ _("<p><b>Computer Name Format</b> describes how to write the computer name to the log file. If <i>User</i> is set the <b>User Defined Name</b> is used.</p> "), - /* dispatcher dialog help 1/3 */ + /* dispatcher dialog help 1/4 */ "dispatcher" : _("<p><b><big>Auditd Dispatcher Configuration</big></b><br> Detailed information about the dispatcher settings can be obtained from 'man auditd.conf'.<br></p>") + - /* dispatcher dialog help 2/3 */ + /* dispatcher dialog help 2/4 */ _("<p><b>Dispatcher</b>: The dispatcher program is started by the audit daemon and gets all audit events on stdin.</p>") + - /* dispatcher dialog help 3/3 */ + /* dispatcher dialog help 3/4 */ _("<p><b>Communication</b>: Controls the communication -between the daemon and the dispatcher program.</p>"), +between the daemon and the dispatcher program.</p>") + + /* dispatcher dialog help 4/4 */ + _("<p>The dispatcher 'audispd' is an audit event multiplexor +(for more information see 'man audispd' and 'man audispd.conf'.</p>"), + /* disk space dialog help 1/5 */ "diskspace_settings" : _("<p><b><big>Auditd Disk Space Configuration</big></b><br> The settings made here refer to disk space on log partition. -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
gs@svn.opensuse.org