mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-29 13:28:19 +00:00
fixes for bugs 177039 1980891 198359
This commit is contained in:
parent
2d35d6e0fe
commit
42f1de10e6
@ -7,12 +7,31 @@
|
|||||||
* License published by the Free Software Foundation.
|
* License published by the Free Software Foundation.
|
||||||
*
|
*
|
||||||
------------------------------------------------------------------*/
|
------------------------------------------------------------------*/
|
||||||
|
|
||||||
{
|
{
|
||||||
include "subdomain/config_complain.ycp";
|
include "subdomain/config_complain.ycp";
|
||||||
include "subdomain/event_notification_helptext.ycp";
|
include "subdomain/event_notification_helptext.ycp";
|
||||||
textdomain "yast2-apparmor";
|
textdomain "yast2-apparmor";
|
||||||
|
|
||||||
|
define boolean safeFormat (string emailAddr) {
|
||||||
|
|
||||||
|
boolean isSafe = false;
|
||||||
|
integer emailAddrLength = size(emailAddr);
|
||||||
|
|
||||||
|
// Allow only name@host formats
|
||||||
|
if ( emailAddrLength > 128 ) {
|
||||||
|
Popup::Error( _("Email address is too long. Please enter another address.") );
|
||||||
|
} else if ( ! regexpmatch(emailAddr, "..+") &&
|
||||||
|
regexpmatch(emailAddr, "/^(\w+\.?)+\w+\@(\w+\.?)+\w+$") ) {
|
||||||
|
isSafe = true;
|
||||||
|
} else if ( regexpmatch(emailAddr, "\\w+@\\w+") ) {
|
||||||
|
isSafe = true;
|
||||||
|
} else {
|
||||||
|
Popup::Error( _("Error in email address format. Please use \"name@host\" format.") );
|
||||||
|
}
|
||||||
|
|
||||||
|
return isSafe;
|
||||||
|
}
|
||||||
|
|
||||||
define symbol displayAppArmorConfig () {
|
define symbol displayAppArmorConfig () {
|
||||||
// AppArmor Status
|
// AppArmor Status
|
||||||
boolean sdIsEnabled = false;
|
boolean sdIsEnabled = false;
|
||||||
@ -22,7 +41,7 @@ define symbol displayAppArmorConfig () {
|
|||||||
|
|
||||||
if (subdomain == "enabled") {
|
if (subdomain == "enabled") {
|
||||||
sdIsEnabled = true;
|
sdIsEnabled = true;
|
||||||
sdEnStr = _("AppArmor is enabled");
|
sdEnStr = _("AppArmor is enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Notification Status
|
// Notification Status
|
||||||
@ -30,7 +49,7 @@ define symbol displayAppArmorConfig () {
|
|||||||
string evEnStr = _("Notification is disabled");
|
string evEnStr = _("Notification is disabled");
|
||||||
if (evnotify == "enabled") {
|
if (evnotify == "enabled") {
|
||||||
ntIsEnabled = true;
|
ntIsEnabled = true;
|
||||||
evEnStr = _("Notification is enabled");
|
evEnStr = _("Notification is enabled");
|
||||||
} else if (evnotify == "notinstalled") {
|
} else if (evnotify == "notinstalled") {
|
||||||
evnotify = "disabled";
|
evnotify = "disabled";
|
||||||
}
|
}
|
||||||
@ -40,7 +59,7 @@ define symbol displayAppArmorConfig () {
|
|||||||
string help = _("<p><b>AppArmor Status</b><br>This reports whether the AppArmor policy enforcement module is loaded and functioning.</p> <p><b>Security Event Notification</b><br>Configure this tool if you want to be notified by email when access violations have occurred.</p> <p><b>Profile Modes</b><br>Use this tool to change the way that AppArmor uses individual profiles.</p>");
|
string help = _("<p><b>AppArmor Status</b><br>This reports whether the AppArmor policy enforcement module is loaded and functioning.</p> <p><b>Security Event Notification</b><br>Configure this tool if you want to be notified by email when access violations have occurred.</p> <p><b>Profile Modes</b><br>Use this tool to change the way that AppArmor uses individual profiles.</p>");
|
||||||
|
|
||||||
term contents =
|
term contents =
|
||||||
`HVCenter( `HBox(
|
`HVCenter( `HBox(
|
||||||
`Frame(_("AppArmor Status"), `HBox(
|
`Frame(_("AppArmor Status"), `HBox(
|
||||||
`VBox(
|
`VBox(
|
||||||
`VSpacing(3), `HSpacing(2),
|
`VSpacing(3), `HSpacing(2),
|
||||||
@ -63,16 +82,15 @@ define symbol displayAppArmorConfig () {
|
|||||||
|
|
||||||
`VSpacing( 1 ),
|
`VSpacing( 1 ),
|
||||||
`Frame ( _("Configure Profile Modes"),
|
`Frame ( _("Configure Profile Modes"),
|
||||||
`HBox(
|
`HBox(
|
||||||
//`HVCenter( `Label( `id(`notifyLabel), _("Configure Modes") )),
|
`Left(`HVCenter( `Label( `id(`notifyLabel), " " + _("Set Profile Modes") ))),
|
||||||
`Left(`HVCenter( `Label( `id(`notifyLabel), " " + _("Set Profile Modes") ))),
|
`PushButton( `id(`modeconf), _("Co&nfigure") )
|
||||||
`PushButton( `id(`modeconf), _("Co&nfigure") )
|
)
|
||||||
)
|
|
||||||
),
|
|
||||||
`VSpacing(3), `HSpacing( 2 )
|
|
||||||
),
|
),
|
||||||
`VSpacing(3),
|
`VSpacing(3), `HSpacing( 2 )
|
||||||
`HSpacing( `opt(`hstretch), 4 )
|
),
|
||||||
|
`VSpacing(3),
|
||||||
|
`HSpacing( `opt(`hstretch), 4 )
|
||||||
)))
|
)))
|
||||||
)));
|
)));
|
||||||
|
|
||||||
@ -82,7 +100,7 @@ define symbol displayAppArmorConfig () {
|
|||||||
Wizard::DisableBackButton();
|
Wizard::DisableBackButton();
|
||||||
|
|
||||||
while( true ) {
|
while( true ) {
|
||||||
symbol ret = (symbol) UI::UserInput();
|
symbol ret = (symbol) UI::UserInput();
|
||||||
|
|
||||||
if ( ret == `abort || ret == `cancel || ret == `next) {
|
if ( ret == `abort || ret == `cancel || ret == `next) {
|
||||||
break;
|
break;
|
||||||
@ -94,24 +112,24 @@ define symbol displayAppArmorConfig () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
UI::OpenDialog(
|
UI::OpenDialog(
|
||||||
`VBox(
|
`VBox(
|
||||||
`Frame ( _("Enable AppArmor"),
|
`Frame ( _("Enable AppArmor"),
|
||||||
`HBox(
|
`HBox(
|
||||||
`RadioButtonGroup(`id(`subdomain),
|
`RadioButtonGroup(`id(`subdomain),
|
||||||
`HBox(
|
`HBox(
|
||||||
`VSpacing( `opt(`vstretch), 0.5),
|
`VSpacing( `opt(`vstretch), 0.5),
|
||||||
`Left(`RadioButton(`id(0), _("Disabled"), sdNotEnabled)),
|
`Left(`RadioButton(`id(0), _("Disabled"), sdNotEnabled)),
|
||||||
`Left(`RadioButton(`id(1), _("Enabled"), sdIsEnabled)),
|
`Left(`RadioButton(`id(1), _("Enabled"), sdIsEnabled)),
|
||||||
`VSpacing( `opt(`vstretch), 0.5)
|
`VSpacing( `opt(`vstretch), 0.5)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)),
|
)),
|
||||||
`HBox (
|
`HBox (
|
||||||
`PushButton(`id(`abort), _("&Cancel") ),
|
`PushButton(`id(`abort), _("&Cancel") ),
|
||||||
`PushButton(`id(`ok), _("&OK") )
|
`PushButton(`id(`ok), _("&OK") )
|
||||||
))
|
))
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/* Popup dialog to turn SD on/off */
|
/* Popup dialog to turn SD on/off */
|
||||||
any sdInput = UI::UserInput();
|
any sdInput = UI::UserInput();
|
||||||
@ -131,42 +149,55 @@ define symbol displayAppArmorConfig () {
|
|||||||
scrret = SCR::Execute(.sdconf, sdAction);
|
scrret = SCR::Execute(.sdconf, sdAction);
|
||||||
}
|
}
|
||||||
UI::CloseDialog();
|
UI::CloseDialog();
|
||||||
if ( scrret != nil && is(scrret, string) ) {
|
if ( scrret != nil && is(scrret, string) ) {
|
||||||
// Error condition.
|
// Error condition.
|
||||||
string errormsg = (string) scrret;
|
string errormsg = (string) scrret;
|
||||||
string popError = _("This operation generated the following error. Please check your installation and AppArmor profile settings.");
|
string popError = _("This operation generated the following error. Please check your installation and AppArmor profile settings.");
|
||||||
Popup::Message( popError+ "\n[" + errormsg + "]");
|
Popup::Message( popError+ "\n[" + errormsg + "]");
|
||||||
sdIsEnabled = sdorig;
|
sdIsEnabled = sdorig;
|
||||||
} else {
|
} else {
|
||||||
string sdLabelVal = "";
|
string sdLabelVal = "";
|
||||||
if ( sdIsEnabled == true ) {
|
if ( sdIsEnabled == true ) {
|
||||||
sdLabelVal = _("AppArmor is enabled");
|
sdLabelVal = _("AppArmor is enabled");
|
||||||
} else {
|
} else {
|
||||||
sdLabelVal = _("AppArmor is disabled") + " ";
|
sdLabelVal = _("AppArmor is disabled") + " ";
|
||||||
}
|
}
|
||||||
UI::ChangeWidget( `id(`sdlabel), `Value, sdLabelVal );
|
UI::ChangeWidget( `id(`sdlabel), `Value, sdLabelVal );
|
||||||
}
|
}
|
||||||
} else if (ret == `ntconf ) {
|
} else if (ret == `ntconf ) {
|
||||||
|
//map<string,map> settings = (map<string,map>) SCR::Execute(.subdomain, "sd-notify-settings");
|
||||||
map settings = (map) SCR::Execute(.subdomain, "sd-notify-settings");
|
map settings = (map) SCR::Execute(.subdomain, "sd-notify-settings");
|
||||||
|
|
||||||
any t_freq = settings["terse_freq"]:0;
|
map<string,any> terse = settings["terse"]:$[];
|
||||||
any s_freq = settings["summary_freq"]:0;
|
map<string,any> summary = settings["summary"]:$[];
|
||||||
any v_freq = settings["verbose_freq"]:0;
|
map<string,any> verbose = settings["verbose"]:$[];
|
||||||
|
|
||||||
|
//foreach (string k, any v, terse, { string av = tostring(v); y2milestone("[appa] Terse Check: Type: %1, Val: %2", k,av); return av; });
|
||||||
|
|
||||||
|
any t_freq = terse["terse_freq"]:0;
|
||||||
|
any s_freq = summary["summary_freq"]:0;
|
||||||
|
any v_freq = verbose["verbose_freq"]:0;
|
||||||
|
|
||||||
boolean t_unknown = true;
|
boolean t_unknown = true;
|
||||||
string t_poop = settings["terse_unknown"]:"1";
|
//string t_poop = summary["terse_unknown"]:"1";
|
||||||
|
any a_t_poop = (any) terse["terse_unknown"]:"1";
|
||||||
|
string t_poop = tostring(a_t_poop);
|
||||||
if(t_poop == "0") {
|
if(t_poop == "0") {
|
||||||
t_unknown = false;
|
t_unknown = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean s_unknown = true;
|
boolean s_unknown = true;
|
||||||
string s_poop = settings["summary_unknown"]:"1";
|
//string s_poop = summary["summary_unknown"]:"1";
|
||||||
|
any a_s_poop = terse["summary_unknown"]:"1";
|
||||||
|
string s_poop = tostring(a_s_poop);
|
||||||
if(s_poop == "0") {
|
if(s_poop == "0") {
|
||||||
s_unknown = false;
|
s_unknown = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean v_unknown = true;
|
boolean v_unknown = true;
|
||||||
string v_poop = settings["verbose_unknown"]:"1";
|
//string v_poop = verbose["verbose_unknown"]:"1";
|
||||||
|
any a_v_poop = verbose["verbose_unknown"]:"1";
|
||||||
|
string v_poop = tostring(a_v_poop);
|
||||||
if(v_poop == "0") {
|
if(v_poop == "0") {
|
||||||
v_unknown = false;
|
v_unknown = false;
|
||||||
}
|
}
|
||||||
@ -217,8 +248,8 @@ define symbol displayAppArmorConfig () {
|
|||||||
`VBox(`opt(`vstretch),
|
`VBox(`opt(`vstretch),
|
||||||
`HBox(
|
`HBox(
|
||||||
`ComboBox(`id(`terse_freq), _("Frequency"), terse_items),
|
`ComboBox(`id(`terse_freq), _("Frequency"), terse_items),
|
||||||
`TextEntry(`id(`terse_email), _("Email Address"), settings["terse_email"]:""),
|
`TextEntry(`id(`terse_email), _("Email Address"), terse["terse_email"]:""),
|
||||||
`IntField(`id(`terse_level), _("Severity"), 0,10, settings["terse_level"]:0)
|
`IntField(`id(`terse_level), _("Severity"), 0,10, terse["terse_level"]:0)
|
||||||
),
|
),
|
||||||
`HBox(
|
`HBox(
|
||||||
`CheckBox( `id(`terse_unknown), _("Include Unknown Severity Events"), t_unknown)
|
`CheckBox( `id(`terse_unknown), _("Include Unknown Severity Events"), t_unknown)
|
||||||
@ -230,8 +261,8 @@ define symbol displayAppArmorConfig () {
|
|||||||
`VBox(`opt(`vstretch),
|
`VBox(`opt(`vstretch),
|
||||||
`HBox(
|
`HBox(
|
||||||
`ComboBox(`id(`summary_freq), _("Frequency"), summary_items),
|
`ComboBox(`id(`summary_freq), _("Frequency"), summary_items),
|
||||||
`TextEntry(`id(`summary_email), _("Email Address"), settings["summary_email"]:""),
|
`TextEntry(`id(`summary_email), _("Email Address"), summary["summary_email"]:""),
|
||||||
`IntField(`id(`summary_level), _("Severity"), 0,10, settings["summary_level"]:0)
|
`IntField(`id(`summary_level), _("Severity"), 0,10, summary["summary_level"]:0)
|
||||||
),
|
),
|
||||||
`HBox(
|
`HBox(
|
||||||
`CheckBox( `id(`summary_unknown), _("Include Unknown Severity Events"), s_unknown)
|
`CheckBox( `id(`summary_unknown), _("Include Unknown Severity Events"), s_unknown)
|
||||||
@ -243,8 +274,8 @@ define symbol displayAppArmorConfig () {
|
|||||||
`VBox(`opt(`vstretch),
|
`VBox(`opt(`vstretch),
|
||||||
`HBox(
|
`HBox(
|
||||||
`ComboBox(`id(`verbose_freq), _("Frequency"), verbose_items),
|
`ComboBox(`id(`verbose_freq), _("Frequency"), verbose_items),
|
||||||
`TextEntry(`id(`verbose_email), _("Email Address"), settings["verbose_email"]:""),
|
`TextEntry(`id(`verbose_email), _("Email Address"), verbose["verbose_email"]:""),
|
||||||
`IntField(`id(`verbose_level), _("Severity"), 0,10, settings["verbose_level"]:0)
|
`IntField(`id(`verbose_level), _("Severity"), 0,10, verbose["verbose_level"]:0)
|
||||||
),
|
),
|
||||||
`HBox(
|
`HBox(
|
||||||
`CheckBox( `id(`verbose_unknown), _("Include Unknown Severity Events"), v_unknown)
|
`CheckBox( `id(`verbose_unknown), _("Include Unknown Severity Events"), v_unknown)
|
||||||
@ -266,117 +297,136 @@ define symbol displayAppArmorConfig () {
|
|||||||
any ntInput = nil;
|
any ntInput = nil;
|
||||||
string notifyLabelValue = "";
|
string notifyLabelValue = "";
|
||||||
|
|
||||||
while( true ) {
|
while( true ) {
|
||||||
ntInput = UI::UserInput();
|
ntInput = UI::UserInput();
|
||||||
|
|
||||||
if (ntInput == `next) {
|
if (ntInput == `next) {
|
||||||
|
|
||||||
map<string,string> answers = $[ ];
|
map<string,map> answers = $[ ];
|
||||||
|
map<string,string> set_notify = $[ ];
|
||||||
|
map<string,string> summary = $[ ];
|
||||||
|
map<string,string> verbose = $[ ];
|
||||||
|
map<string,string> terse = $[ ];
|
||||||
|
|
||||||
t_freq = UI::QueryWidget(`id(`terse_freq), `Value);
|
t_freq = UI::QueryWidget(`id(`terse_freq), `Value);
|
||||||
s_freq = UI::QueryWidget(`id(`summary_freq), `Value);
|
s_freq = UI::QueryWidget(`id(`summary_freq), `Value);
|
||||||
v_freq = UI::QueryWidget(`id(`verbose_freq), `Value);
|
v_freq = UI::QueryWidget(`id(`verbose_freq), `Value);
|
||||||
|
|
||||||
answers["sd-set-notify"] = "yes";
|
set_notify["sd-set-notify"] = "yes";
|
||||||
answers["terse_freq"] = tostring(t_freq);
|
terse["terse_freq"] = tostring(t_freq);
|
||||||
answers["summary_freq"] = tostring(s_freq);
|
summary["summary_freq"] = tostring(s_freq);
|
||||||
answers["verbose_freq"] = tostring(v_freq);
|
verbose["verbose_freq"] = tostring(v_freq);
|
||||||
|
|
||||||
if(t_freq != 0) {
|
if (t_freq != 0) {
|
||||||
|
|
||||||
string t_email = (string) UI::QueryWidget(`id(`terse_email), `Value);
|
string t_email = (string) UI::QueryWidget(`id(`terse_email), `Value);
|
||||||
|
|
||||||
if ( t_email == nil || t_email == "" ) {
|
if ( t_email == nil || t_email == "" ) {
|
||||||
Popup::Error( _("An email address is required for each selected notification method.") );
|
Popup::Error( _("An email address is required for each selected notification method.") );
|
||||||
continue;
|
continue;
|
||||||
}
|
} else if ( ! safeFormat(t_email) ) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
answers["enable_terse"] = "yes";
|
terse["enable_terse"] = "yes";
|
||||||
answers["terse_email"] = (string) UI::QueryWidget(`id(`terse_email), `Value);
|
terse["terse_email"] = (string) UI::QueryWidget(`id(`terse_email), `Value);
|
||||||
answers["terse_level"] = (string) tostring(UI::QueryWidget(`id(`terse_level), `Value));
|
terse["terse_level"] = (string) tostring(UI::QueryWidget(`id(`terse_level), `Value));
|
||||||
|
|
||||||
boolean t_unknown = (boolean) UI::QueryWidget(`id(`terse_unknown), `Value);
|
boolean t_unknown = (boolean) UI::QueryWidget(`id(`terse_unknown), `Value);
|
||||||
|
|
||||||
if (t_unknown == true) {
|
if (t_unknown == true) {
|
||||||
answers["terse_unknown"] = "1";
|
terse["terse_unknown"] = "1";
|
||||||
} else {
|
} else {
|
||||||
answers["terse_unknown"] = "0";
|
terse["terse_unknown"] = "0";
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
answers["enable_terse"] = "no";
|
terse["enable_terse"] = "no";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (s_freq != 0) {
|
if (s_freq != 0) {
|
||||||
|
|
||||||
string s_email = (string) UI::QueryWidget(`id(`summary_email), `Value);
|
string s_email = (string) UI::QueryWidget(`id(`summary_email), `Value);
|
||||||
if ( s_email == nil || s_email == "" ) {
|
if ( s_email == nil || s_email == "" ) {
|
||||||
Popup::Error( _("An email address is required for each selected notification method.") );
|
Popup::Error( _("An email address is required for each selected notification method.") );
|
||||||
continue;
|
continue;
|
||||||
}
|
} else if ( ! safeFormat(s_email) ) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
answers["enable_summary"] = "yes";
|
summary["enable_summary"] = "yes";
|
||||||
answers["summary_email"] = (string) UI::QueryWidget(`id(`summary_email), `Value);
|
summary["summary_email"] = (string) UI::QueryWidget(`id(`summary_email), `Value);
|
||||||
answers["summary_level"] = (string) tostring(UI::QueryWidget(`id(`summary_level), `Value));
|
summary["summary_level"] = (string) tostring(UI::QueryWidget(`id(`summary_level), `Value));
|
||||||
|
|
||||||
boolean s_unknown = (boolean) UI::QueryWidget(`id(`summary_unknown), `Value);
|
boolean s_unknown = (boolean) UI::QueryWidget(`id(`summary_unknown), `Value);
|
||||||
|
|
||||||
if (s_unknown == true) {
|
if (s_unknown == true) {
|
||||||
answers["summary_unknown"] = "1";
|
summary["summary_unknown"] = "1";
|
||||||
} else {
|
} else {
|
||||||
answers["summary_unknown"] = "0";
|
summary["summary_unknown"] = "0";
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
answers["enable_summary"] = "no";
|
summary["enable_summary"] = "no";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (v_freq != 0) {
|
if (v_freq != 0) {
|
||||||
string v_email = (string) UI::QueryWidget(`id(`verbose_email), `Value);
|
string v_email = (string) UI::QueryWidget(`id(`verbose_email), `Value);
|
||||||
if ( v_email == nil || v_email == "" ) {
|
if ( v_email == nil || v_email == "" ) {
|
||||||
Popup::Error( _("An email address is required for each selected notification method.") );
|
Popup::Error( _("An email address is required for each selected notification method.") );
|
||||||
continue;
|
continue;
|
||||||
}
|
} else if (! safeFormat(v_email) ) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
answers["enable_verbose"] = "yes";
|
verbose["enable_verbose"] = "yes";
|
||||||
answers["verbose_email"] = (string) UI::QueryWidget(`id(`verbose_email), `Value);
|
verbose["verbose_email"] = (string) UI::QueryWidget(`id(`verbose_email), `Value);
|
||||||
answers["verbose_level"] = (string) tostring(UI::QueryWidget(`id(`verbose_level), `Value));
|
verbose["verbose_level"] = (string) tostring(UI::QueryWidget(`id(`verbose_level), `Value));
|
||||||
|
|
||||||
boolean v_unknown = (boolean) UI::QueryWidget(`id(`verbose_unknown), `Value);
|
boolean v_unknown = (boolean) UI::QueryWidget(`id(`verbose_unknown), `Value);
|
||||||
|
|
||||||
if (v_unknown == true) {
|
if (v_unknown == true) {
|
||||||
answers["verbose_unknown"] = "1";
|
verbose["verbose_unknown"] = "1";
|
||||||
} else {
|
} else {
|
||||||
answers["verbose_unknown"] = "0";
|
verbose["verbose_unknown"] = "0";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
answers["enable_verbose"] = "no";
|
verbose["enable_verbose"] = "no";
|
||||||
}
|
}
|
||||||
|
|
||||||
SCR::Execute(.sdconf, answers);
|
answers["set_notify"] = set_notify;
|
||||||
|
answers["terse"] = terse;
|
||||||
|
answers["summary"] = summary;
|
||||||
|
answers["verbose"] = verbose;
|
||||||
|
|
||||||
if ( t_freq != 0 || s_freq != 0 || v_freq != 0 ) {
|
string result = (string) SCR::Execute(.sdconf, answers);
|
||||||
notifyLabelValue = _("Notification is enabled");
|
|
||||||
} else {
|
|
||||||
notifyLabelValue = _("Notification is disabled");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Wizard::CloseDialog();
|
if (result != "success") {
|
||||||
if ( (ntInput == `ok) || (ntInput == `next) ) {
|
Popup::Error( _("Configuration failed for the following operations: ") + result);
|
||||||
UI::ChangeWidget( `id(`notifyLabel), `Value, notifyLabelValue );
|
}
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
} else if (ret == `modeconf ) {
|
if ( t_freq != 0 || s_freq != 0 || v_freq != 0 ) {
|
||||||
|
notifyLabelValue = _("Notification is enabled");
|
||||||
|
} else {
|
||||||
|
notifyLabelValue = _("Notification is disabled");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ret = profileModeConfigForm();
|
Wizard::CloseDialog();
|
||||||
if ( ret == `back ) {
|
if ( (ntInput == `ok) || (ntInput == `next) ) {
|
||||||
displayAppArmorConfig();
|
UI::ChangeWidget( `id(`notifyLabel), `Value, notifyLabelValue );
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
} else if (ret == `modeconf ) {
|
||||||
|
|
||||||
|
ret = profileModeConfigForm();
|
||||||
|
if ( ret == `back ) {
|
||||||
|
displayAppArmorConfig();
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
y2milestone("Weird dialogue close--incl." + tostring(ret));
|
y2milestone("Weird dialogue close--incl." + tostring(ret));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user