Author: gs
Date: Thu Oct 30 17:18:49 2008
New Revision: 52764
URL: http://svn.opensuse.org/viewcvs/yast?rev=52764&view=rev
Log:
remove superflouos option "repeat_names" from auditd.scr and
replace list <string> by string for option values
Modified:
trunk/audit-laf/agents/auditd.scr
trunk/audit-laf/src/AuditLaf.ycp
trunk/audit-laf/src/complex.ycp
Modified: trunk/audit-laf/agents/auditd.scr
URL: http://svn.opensuse.org/viewcvs/yast/trunk/audit-laf/agents/auditd.scr?rev=52764&r1=52763&r2=52764&view=diff
==============================================================================
--- trunk/audit-laf/agents/auditd.scr (original)
+++ trunk/audit-laf/agents/auditd.scr Thu Oct 30 17:18:49 2008
@@ -27,7 +27,7 @@
`ag_ini(
`IniAgent( "/etc/audit/auditd.conf",
$[
- "options" : [ "global_values", "repeat_names", "flat" ],
+ "options" : [ "global_values", "flat" ],
"comments" : [ "^[ \t]*#.*$", "^[ \t]*$" ],
"params" : [
// Options with one value ('yes' / 'no')
Modified: trunk/audit-laf/src/AuditLaf.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/audit-laf/src/AuditLaf.ycp?rev=52764&r1=52763&r2=52764&view=diff
==============================================================================
--- trunk/audit-laf/src/AuditLaf.ycp (original)
+++ trunk/audit-laf/src/AuditLaf.ycp Thu Oct 30 17:18:49 2008
@@ -215,30 +215,30 @@
/**
* map of audit settings (from /etc/audit/auditd.conf)
*/
-map SETTINGS = $[];
+map SETTINGS = $[];
/**
* default settings for /etc/audit/auditd.conf
*/
-map DEFAULT_CONFIG = $[
- "log_file" : ["/var/log/audit/audit.log"],
- "log_format" : ["RAW"],
- "priority_boost" : ["3"],
- "flush" : ["INCREMENTAL"],
- "freq" : ["20"],
- "num_logs" : ["4"],
- "dispatcher" : ["/sbin/audispd"],
- "disp_qos" : ["lossy"],
- "name_format": ["NONE"],
- "max_log_file" : ["5"],
- "max_log_file_action" : ["ROTATE"],
- "space_left" : ["75"],
- "space_left_action" : ["SYSLOG"],
- "action_mail_acct" : ["root"],
- "admin_space_left": ["50"],
- "admin_space_left_action" : ["SUSPEND"],
- "disk_full_action" : ["SUSPEND"],
- "disk_error_action" : ["SUSPEND"]
+map DEFAULT_CONFIG = $[
+ "log_file" : "/var/log/audit/audit.log",
+ "log_format" : "RAW",
+ "priority_boost" : "3",
+ "flush" : "INCREMENTAL",
+ "freq" : "20",
+ "num_logs" : "4",
+ "dispatcher" : "/sbin/audispd",
+ "disp_qos" : "lossy",
+ "name_format": "NONE",
+ "max_log_file" : "5",
+ "max_log_file_action" : "ROTATE",
+ "space_left" : "75",
+ "space_left_action" : "SYSLOG",
+ "action_mail_acct" : "root",
+ "admin_space_left": "50",
+ "admin_space_left_action" : "SUSPEND",
+ "disk_full_action" : "SUSPEND",
+ "disk_error_action" : "SUSPEND"
];
/**
@@ -257,12 +257,7 @@
* Get value of given option from SEETINGS
*/
global string GetAuditdOption( string key) {
- list <string> option_list = SETTINGS[key]:DEFAULT_CONFIG[key]:[];
-
- if ( option_list != [] )
- return option_list[0]:"";
- else
- return "";
+ return SETTINGS[key]:DEFAULT_CONFIG[key]:"";
}
/**
@@ -270,14 +265,12 @@
*/
global boolean SetAuditdOption( string key, string value ) {
- list <string> option_list = [];
// Don't set empty values (seems that 'auditd' doesn't like it)
if ( value != "" )
{
- option_list = add( option_list, value );
- SETTINGS[key] = option_list;
- y2milestone( "Setting %1 to %2", key, option_list );
+ SETTINGS[key] = value;
+ y2milestone( "Setting %1 to %2", key, value );
return true;
}
else
@@ -352,7 +345,7 @@
foreach (string key, (list <string>) SCR::Dir(.auditd),
{
// and read the value for each of them
- list <string> val = (list <string>) SCR::Read(add(.auditd, key));
+ string val = (string) SCR::Read(add(.auditd, key));
if (val != nil) SETTINGS[key] = val;
});
@@ -484,7 +477,7 @@
return false;
// write all options to auditd.conf
- foreach (string key, list <string> value, SETTINGS, {
+ foreach (string key, string value, SETTINGS, {
// and write each value
success = (boolean)SCR::Write(add(.auditd, key), value );
});
@@ -618,7 +611,7 @@
*/
global boolean Import ( map settings ) {
- SETTINGS = (map< string, list<string> >)settings ["auditd"]:DEFAULT_CONFIG;
+ SETTINGS = (map< string, string >)settings ["auditd"]:DEFAULT_CONFIG;
RULES = (string)settings["rules"]:"";
SetModified( true );
Modified: trunk/audit-laf/src/complex.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/audit-laf/src/complex.ycp?rev=52764&r1=52763&r2=52764&view=diff
==============================================================================
--- trunk/audit-laf/src/complex.ycp (original)
+++ trunk/audit-laf/src/complex.ycp Thu Oct 30 17:18:49 2008
@@ -123,6 +123,8 @@
symbol HandleLogfileSettingsDialog(string id, map event) {
any action = event["ID"]:nil;
+ y2milestone( "HandleLogfileSettingsDialog got action: %1", action );
+
if ( action == "select_file" )
{
string file_name = UI::AskForSaveFileName("/var/log/audit", "*.log", _("Select the log file") );
@@ -201,6 +203,8 @@
symbol HandleDispatcherDialog(string id, map event) {
any action = event["ID"]:nil;
+ y2milestone( "HandleDiskspaceSettingsDialog got action: %1", action );
+
if ( action == "select_disp" )
{
string file_name = UI::AskForExistingFile("/sbin", "*", _("Select the dispatcher program") );
@@ -270,7 +274,7 @@
*/
symbol HandleDiskspaceSettingsDialog(string id, map event) {
any action = event["ID"]:nil;
- y2milestone( "action: %1", action );
+ y2milestone( "HandleDiskspaceSettingsDialog got action: %1", action );
list actions_list = ["space_left_action",
"admin_space_left_action",
@@ -405,7 +409,8 @@
*/
symbol HandleRulesDialog(string id, map event) {
any action = event["ID"]:nil;
-
+ y2milestone( "HandleDiskspaceSettingsDialog got action: %1", action );
+
if ( action == "audit_enabled" )
{
string rule = "";
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org