Author: jsrain Date: Fri Sep 30 13:53:18 2011 New Revision: 66189 URL: http://svn.opensuse.org/viewcvs/yast?rev=66189&view=rev Log: disabled Reports part due to changes in AppArmor merged editation and deleting of a profile Modified: trunk/apparmor/package/yast2-apparmor.changes trunk/apparmor/src/clients/AA_EditProfile.ycp trunk/apparmor/src/clients/apparmor.ycp trunk/apparmor/src/include/apparmor/aa-config.ycp trunk/apparmor/src/include/apparmor/profile_dialogs.ycp Modified: trunk/apparmor/package/yast2-apparmor.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/apparmor/package/yast2-apparmor.changes?rev=66189&r1=66188&r2=66189&view=diff ============================================================================== --- trunk/apparmor/package/yast2-apparmor.changes (original) +++ trunk/apparmor/package/yast2-apparmor.changes Fri Sep 30 13:53:18 2011 @@ -1,5 +1,5 @@ ------------------------------------------------------------------- -Thu Sep 29 12:42:55 UTC 2011 - jsrain@site +Fri Sep 30 11:57:42 UTC 2011 - jsrain@site - fixed enabling/disabling apparmor - fixed setting notifications (and enabling aaeventsd as part of @@ -9,6 +9,8 @@ - don't close the module after running a report (bnc#531512) - run the dialog to select application for profiling without pop-up (bnc#531512) +- disabled Reports part due to changes in AppArmor +- merged editation and deleting of a profile ------------------------------------------------------------------- Thu Sep 22 12:42:09 UTC 2011 - jreidinger@suse.com Modified: trunk/apparmor/src/clients/AA_EditProfile.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/apparmor/src/clients/AA_EditProfile.ycp?rev=66189&r1=66188&r2=66189&view=diff ============================================================================== --- trunk/apparmor/src/clients/AA_EditProfile.ycp (original) +++ trunk/apparmor/src/clients/AA_EditProfile.ycp Fri Sep 30 13:53:18 2011 @@ -19,34 +19,44 @@ // Globalz +map profiles = nil; + +define any Reread() { + profiles = (map) SCR::Read (.apparmor_profiles, "all"); + return `next; +} define any MainSequence() ``{ // // Read the profiles from the SCR agent - map profiles = (map) SCR::Read (.apparmor_profiles, "all"); + Reread(); map aliases = $[ "showProfile" : ``(DisplayProfileForm(Settings["CURRENT_PROFILE"]:"", false)), "showHat" : ``(DisplayProfileForm(Settings["CURRENT_HAT"]:"", true)), "chooseProfile" : ``(SelectProfileForm(profiles, _("Please make a selection from the listed profiles and press Next to edit the profile."), _("Edit Profile - Choose profile to edit"), "apparmor_edit_profile" )), - + "reread" : ``(Reread()), ]; map sequence = $[ "ws_start" : "chooseProfile", "chooseProfile" : $[ `abort : `abort, - `next : "showProfile", - `finish : `next, + `edit : "showProfile", + `reread : "reread", + `next : `next, ], "showProfile" : $[ `abort : `abort, - `next : `ws_finish, + `next : "reread", `showhat : "showHat", `finish : `next, ], + "reread" : $[ + `next : "chooseProfile", + ], "showHat" : $[ `abort : `abort, `next : "showProfile", Modified: trunk/apparmor/src/clients/apparmor.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/apparmor/src/clients/apparmor.ycp?rev=66189&r1=66188&r2=66189&view=diff ============================================================================== --- trunk/apparmor/src/clients/apparmor.ycp (original) +++ trunk/apparmor/src/clients/apparmor.ycp Fri Sep 30 13:53:18 2011 @@ -29,10 +29,12 @@ `item(`id("apparmor-settings"), _("Settings"), true), `item(`id("GenProf"), _("Generate Profile")), `item(`id("LogProf"), _("Update Profile")), - `item(`id("AA_Report"), _("Reports")), - `item(`id("AA_EditProfile"), _("Edit Profile")), - `item(`id("AA_AddProfile"), _("Add Manually Profile")), - `item(`id("AA_DeleteProfile"), _("Delete Profile")) +// disabled, since aa-eventd was removed from main AA package +// and so was Reports.pm +// `item(`id("AA_Report"), _("Reports")), + `item(`id("AA_EditProfile"), _("Manage Existing Profiles")), + `item(`id("AA_AddProfile"), _("Add Manually Profile"))//, +// merged with EditProfile `item(`id("AA_DeleteProfile"), _("Delete Profile")) ]), `VSpacing(3) ), Modified: trunk/apparmor/src/include/apparmor/aa-config.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/apparmor/src/include/apparmor/aa-config.ycp?rev=66189&r1=66188&r2=66189&view=diff ============================================================================== --- trunk/apparmor/src/include/apparmor/aa-config.ycp (original) +++ trunk/apparmor/src/include/apparmor/aa-config.ycp Fri Sep 30 13:53:18 2011 @@ -341,7 +341,8 @@ `HSpacing( `opt(`hstretch), 4 ), `VBox( `VSpacing(1), - `Frame ( _("Security Event Notification"), +// event notification disabled due to changes in AppArmor +/* `Frame ( _("Security Event Notification"), `HBox( `VSpacing(1), `HSpacing(1), `HVCenter( `Label( `id(`notifyLabel), evEnStr )), @@ -350,7 +351,7 @@ ) ), `VSpacing(1), `HSpacing(20), - +*/ `Frame ( _("Configure Profile Modes"), `HBox( `VSpacing(1), `HSpacing(1), Modified: trunk/apparmor/src/include/apparmor/profile_dialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/apparmor/src/include/apparmor/profile_dialogs.ycp?rev=66189&r1=66188&r2=66189&view=diff ============================================================================== --- trunk/apparmor/src/include/apparmor/profile_dialogs.ycp (original) +++ trunk/apparmor/src/include/apparmor/profile_dialogs.ycp Fri Sep 30 13:53:18 2011 @@ -1088,6 +1088,10 @@ // Settings["PROFILE_MAP"]: map containing the profile // define symbol SelectProfileForm( map profiles, string formhelp, string formtitle, string iconname ) { + // TODO switch to variable in a module + // TODO plain reread does not work here + SCR::UnmountAgent (.apparmor_profiles); + profiles = (map) SCR::Read (.apparmor_profiles, "all"); list<term> profilelisting = []; integer indx = 0; foreach( string p, any ignore, (map<string,any>) profiles, { @@ -1099,8 +1103,14 @@ `VBox( `VSpacing(2), `SelectionBox( `id(`profilelist), `opt(`notify), _("Profile Name"), profilelisting ), - `VSpacing(3) - ); + `VSpacing(3), + `HBox ( + `PushButton (`id (`edit), Label::EditButton()), + `PushButton (`id (`delete), Label::DeleteButton()), + `HStretch() + ) + + ); // // Create the Dialog Window and parse user input @@ -1116,8 +1126,8 @@ { event = UI::WaitForEvent( timeout_millisec ); id = event["ID"]:nil; // We'll need this often - cache it - if ( id == `next || id == `profilelist ) { - profilename = tostring( UI::QueryWidget(`id(`profilelist), `CurrentItem) ); + profilename = tostring( UI::QueryWidget(`id(`profilelist), `CurrentItem) ); + if ( id == `edit ) { if ( profilename != nil && profilename != "" ) { break; } else { @@ -1125,6 +1135,18 @@ continue; } } // TODO ELSE POPUP NO ENTRY SELECTED ERROR + else if ( id == `delete ) { + if (Popup::YesNoHeadline( _("Delete profile confirmation"), + _("Are you sure you want to delete the profile ") + profilename + + _(" ?\nAfter this operation the AppArmor module will reload the profile set.") ) ) + { + y2milestone("Deleted " + profilename ); + boolean result = SCR::Write(.apparmor_profiles.delete, profilename); + any result2 = SCR::Write(.apparmor_profiles.reload, "-"); + } + id = `reread; + break; + } if(id == `abort || id == `cancel) { break; } else if(id == `back) { @@ -1134,10 +1156,9 @@ continue; } } - if ( id == `next || id == `profilelist) { + if ( id == `edit ) { Settings["CURRENT_PROFILE"] = profilename; Settings["PROFILE_MAP"] = profiles[profilename]:nil; - id = `next; } UI::CloseDialog(); return (symbol) id; -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org