1
0
yast2-apparmor/yast2-apparmor-cleanup-names
Stephan Kulow 3c7246943b Accepting request 77735 from home:jeff_mahoney:branches:YaST:Head
- Rename files to use proper AppArmor names and abbreviations
- Change code to reflect new names
  - Basic version needed to use newer perl-apparmor. This version
    gets rid of the old SubDomain names entirely.
- Move yast2-apparmor.desktop to apparmor.desktop


-- NOTE: Without (even a simple version of) these changes, yast2-apparmor
   doesn't work on openSUSE Factory. This is due to perl-apparmor renaming
   Immunix::Subdomain to Immunix::Apparmor, but this is the more complete fix.

OBS-URL: https://build.opensuse.org/request/show/77735
OBS-URL: https://build.opensuse.org/package/show/YaST:Head/yast2-apparmor?expand=0&rev=20
2011-09-05 11:59:48 +00:00

1698 lines
62 KiB
Plaintext

From: Jeff Mahoney <jeffm@suse.com>
Subject: yast2-apparmor: Fix up naming from SubDomain names
This patch contains (more or less) the contents that result from the following
script:
for file in $(grep -r sd . -l); do if [ "$(basename $file)" != "Makefile.in" ]; then sed -e 's/sd/aa/g' < $file > $file.new ; mv $file.new $file;fi; done
for file in $(grep -r SD . -l); do if [ "$(basename $file)" != "Makefile.in" ]; then sed -e 's/SD/AA/g' < $file > $file.new ; mv $file.new $file;fi; done
for file in $(grep -r subdomain . -l); do if [ "$(basename $file)" != "Makefile.in" ]; then sed -e 's/subdomain/apparmor/g' < $file > $file.new ; mv $file.new $file;fi; done
for file in $(grep -r SubDomain . -l); do if [ "$(basename $file)" != "Makefile.in" ]; then sed -e 's/SubDomain/AppArmor/g' < $file > $file.new ; mv $file.new $file;fi; done
for file in $(grep -r Subdomain . -l); do if [ "$(basename $file)" != "Makefile.in" ]; then sed -e 's/Subdomain/AppArmor/g' < $file > $file.new ; mv $file.new $file;fi; done
The differences are in that %sd is a special perl-apparmor variable and
must be kept verbatim until the perl-apparmor package is fixed to alias
%sd to %aa.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
--
configure.in | 2
src/agents/Makefile.am | 6 -
src/agents/ag_aa_config | 20 ++--
src/agents/ag_apparmor | 36 ++++----
src/agents/ag_apparmor_profiles | 22 ++---
src/agents/ag_complain | 12 +-
src/agents/ag_genprof | 12 +-
src/agents/ag_logparse | 24 ++---
src/agents/ag_logprof | 4
src/agents/ag_reports_ess | 6 -
src/agents/ag_reports_parse | 2
src/agents/ag_reports_sched | 26 +++---
src/apparmor/reports.conf | 2
src/bin/reportgen.pl | 6 -
src/clients/AA_AddProfile.ycp | 12 +-
src/clients/AA_DeleteProfile.ycp | 14 +--
src/clients/AA_EditProfile.ycp | 8 -
src/clients/AA_Report.ycp | 8 -
src/clients/GenProf.ycp | 8 -
src/clients/LogProf.ycp | 8 -
src/clients/Makefile.am | 12 +-
src/clients/apparmor-settings.ycp | 12 +-
src/clients/apparmor.ycp | 18 ++--
src/clients/apparmor_no_impl.ycp | 2
src/include/Makefile.am | 2
src/include/apparmor/Makefile.am | 4
src/include/apparmor/aa-config.ycp | 30 +++---
src/include/apparmor/apparmor_profile_check.ycp | 2
src/include/apparmor/capabilities.ycp | 2
src/include/apparmor/config_complain.ycp | 2
src/include/apparmor/helps.ycp | 6 -
src/include/apparmor/profile_dialogs.ycp | 14 +--
src/include/apparmor/reporting_archived_dialogs.ycp | 22 ++---
src/include/apparmor/reporting_dialogues.ycp | 86 ++++++++++----------
src/include/apparmor/reporting_utils.ycp | 38 ++++----
src/perl/Notify.pm | 2
src/scrconf/Makefile.am | 6 -
src/scrconf/aaconf.scr | 10 +-
src/scrconf/apparmor.scr | 10 +-
src/scrconf/apparmor_profiles.scr | 6 -
40 files changed, 262 insertions(+), 262 deletions(-)
--- a/configure.in
+++ b/configure.in
@@ -158,7 +158,7 @@ src/apparmor/Makefile
src/bin/Makefile
src/clients/Makefile
src/desktop/Makefile
-src/include/subdomain/Makefile
+src/include/apparmor/Makefile
src/include/Makefile
src/modules/Makefile
src/perl/Makefile
--- a/src/agents/Makefile.am
+++ b/src/agents/Makefile.am
@@ -7,9 +7,9 @@ agent_SCRIPTS = \
ag_reports_ess \
ag_reports_parse \
ag_reports_sched \
- ag_sd_config \
- ag_subdomain \
- ag_subdomain_profiles
+ ag_aa_config \
+ ag_apparmor \
+ ag_apparmor_profiles
EXTRA_DIST = $(agent_SCRIPTS)
--- a/src/agents/ag_aa_config
+++ b/src/agents/ag_aa_config
@@ -11,7 +11,7 @@
# ------------------------------------------------------------------
################################################################################
-# ag_sd_config
+# ag_aa_config
################################################################################
use strict;
@@ -23,7 +23,7 @@ use Immunix::Reports;
# Subroutines
################################################################################
-sub setSubdomain {
+sub setAppArmor {
my $action = shift;
my $errmsg = "";
@@ -32,7 +32,7 @@ sub setSubdomain {
if (-e "/sbin/rcapparmor") {
open(RUN, "/sbin/rcapparmor start 2>&1 |");
} else {
- open(RUN, "/sbin/rcsubdomain start 2>&1 |");
+ open(RUN, "/sbin/rcapparmor start 2>&1 |");
}
while (<RUN>) {
if (/FATAL:(.*)/) {
@@ -43,7 +43,7 @@ sub setSubdomain {
if (-f "/etc/init.d/boot.apparmor") {
system("/sbin/insserv boot.apparmor");
} else {
- system("/sbin/insserv boot.subdomain");
+ system("/sbin/insserv boot.apparmor");
}
if (-f "/etc/init.d/aaeventd") {
system("/sbin/rcaaeventd start");
@@ -53,7 +53,7 @@ sub setSubdomain {
if (-e "/sbin/rcapparmor") {
open(RUN, "/sbin/rcapparmor stop 2>&1 |");
} else {
- open(RUN, "/sbin/rcsubdomain stop 2>&1 |");
+ open(RUN, "/sbin/rcapparmor stop 2>&1 |");
}
while (<RUN>) {
if (/FATAL:(.*)/) {
@@ -64,7 +64,7 @@ sub setSubdomain {
if (-f "/etc/init.d/boot.apparmor") {
system("/sbin/insserv -r boot.apparmor");
} else {
- system("/sbin/insserv -r boot.subdomain");
+ system("/sbin/insserv -r boot.apparmor");
}
if (-f "/etc/init.d/aaeventd") {
system("/sbin/rcaaeventd stop");
@@ -85,7 +85,7 @@ sub setLearningMode {
my $action = shift;
my $rcscript = -f "/sbin/rcapparmor" ? "/sbin/rcapparmor"
- : "/sbin/rcsubdomain";
+ : "/sbin/rcapparmor";
if ($action eq "enable") {
system("$rcscript", "stop");
@@ -126,11 +126,11 @@ while ( <STDIN> ) {
($action) = (split(/:/, $argument))[1];
- if ( $argument =~ /subdomain/ ) {
- $result = setSubdomain($action);
+ if ( $argument =~ /apparmor/ ) {
+ $result = setAppArmor($action);
} elsif ( $argument =~ /learning/ ) {
setLearningMode($action);
- } elsif ( $argument eq 'sd-notify') {
+ } elsif ( $argument eq 'aa-notify') {
setNotify($action);
}
--- a/src/agents/ag_apparmor
+++ b/src/agents/ag_apparmor
@@ -12,7 +12,7 @@
################################################################################
-# ag_subdomain
+# ag_apparmor
#
# Version 0.61
################################################################################
@@ -21,39 +21,39 @@ use strict;
use ycp;
use Data::Dumper;
use Immunix::Notify;
-use Immunix::SubDomain;
+use Immunix::AppArmor;
# Subroutines
################################################################################
-sub getSubdomainStatus {
+sub getAppArmorStatus {
- my $sdStatus = "disabled";
+ my $aaStatus = "disabled";
# Ok check that there are profiles loaded to
# determine status
- my $mountpoint = Immunix::SubDomain::check_for_subdomain();
+ my $mountpoint = Immunix::AppArmor::check_for_apparmor();
if ( $mountpoint ) {
open( PROFILES, "cat $mountpoint/profiles|" );
while (<PROFILES>) {
# Ensure we have loaded profiles
# not just a loaded module
if ( /\// ) {
- $sdStatus = "enabled";
+ $aaStatus = "enabled";
last;
}
}
close PROFILES;
}
- return $sdStatus;
+ return $aaStatus;
}
sub profileSyntaxCheck {
my $errlist = [];
- Immunix::SubDomain::checkIncludeSyntax($errlist);
- Immunix::SubDomain::checkProfileSyntax($errlist);
- my @errlist = Immunix::SubDomain::uniq(@$errlist);
+ Immunix::AppArmor::checkIncludeSyntax($errlist);
+ Immunix::AppArmor::checkProfileSyntax($errlist);
+ my @errlist = Immunix::AppArmor::uniq(@$errlist);
return \@errlist;
}
@@ -67,19 +67,19 @@ while ( <STDIN> ) {
my $result = undef;
my $donereturn = 0;
if ( $command && $path && $argument ) {
- if ( $argument eq 'sd-all') {
+ if ( $argument eq 'aa-all') {
my %hResult = ''; # hashed result, duh
- $hResult{'sd-status'} = getSubdomainStatus();
- $hResult{'sd-notify'} = Immunix::Notify::getNotifyStatus();
+ $hResult{'aa-status'} = getAppArmorStatus();
+ $hResult{'aa-notify'} = Immunix::Notify::getNotifyStatus();
#ycp::ycpReturnHashAsMap( %hResult );
ycp::Return( %hResult );
$donereturn = 1;
- } elsif ( $argument eq 'sd-status') {
- $result = getSubdomainStatus();
- } elsif ( $argument eq 'sd-notify') {
+ } elsif ( $argument eq 'aa-status') {
+ $result = getAppArmorStatus();
+ } elsif ( $argument eq 'aa-notify') {
$result = Immunix::Notify::getNotifyStatus();
} elsif ( $command eq "Read" and $argument eq 'custom-includes') {
- my $cfg = Immunix::SubDomain::read_config("logprof.conf");
+ my $cfg = Immunix::AppArmor::read_config("logprof.conf");
my @ret = split(' ', $cfg->{settings}{custom_includes});
ycp::ycpReturn(\@ret);
$donereturn = 1;
@@ -87,7 +87,7 @@ while ( <STDIN> ) {
$result = profileSyntaxCheck();
ycp::ycpReturn($result);
$donereturn = 1;
- } elsif ( $argument eq 'sd-notify-settings') {
+ } elsif ( $argument eq 'aa-notify-settings') {
$result = Immunix::Notify::getNotifySettings();
ycp::Return($result);
$donereturn = 1;
--- a/src/agents/ag_apparmor_profiles
+++ b/src/agents/ag_apparmor_profiles
@@ -13,8 +13,8 @@
#####################################################################
#
-# ag_subdomain_profiles - Immunix SCR agent for the
-# management of SubDomain profiles
+# ag_apparmor_profiles - Immunix SCR agent for the
+# management of AppArmor profiles
#
#
#####################################################################
@@ -22,7 +22,7 @@
use strict;
use ycp;
-use Immunix::SubDomain;
+use Immunix::AppArmor;
################
# Subroutines
@@ -74,7 +74,7 @@ while ( <STDIN> ) {
if ( $command && $path && $argument ) {
if ( $command eq "Read" and $argument eq "all") {
$UI_Mode = "yast";
- Immunix::SubDomain::readprofiles();
+ Immunix::AppArmor::readprofiles();
ycp::Return( \%sd );
} elsif ( $command eq "Read" and $path eq ".new" ) {
my $pfname = getprofilefilename($argument);
@@ -88,15 +88,15 @@ while ( <STDIN> ) {
my $pfname = getprofilefilename($argument);
if ( -e $pfname ) {
$UI_Mode = "yast";
- Immunix::SubDomain::readprofiles();
+ Immunix::AppArmor::readprofiles();
ycp::Return( $sd{$argument} );
} else {
ycp::Return( "false" );
}
} elsif ( $command eq "Read") {
$UI_Mode = "yast";
- Immunix::SubDomain::readprofile("$profiledir/$argument",
- \&$Immunix::SubDomain::fatal_error, 1);
+ Immunix::AppArmor::readprofile("$profiledir/$argument",
+ \&$Immunix::AppArmor::fatal_error, 1);
ycp::Return( \%sd );
} elsif ( $command eq "Write" and $path eq ".delete") {
if ( $argument ne "" ) {
@@ -109,7 +109,7 @@ while ( <STDIN> ) {
ycp::Return( "false" );
}
} elsif ( $command eq "Write" and $path eq ".reload") {
- $result = system("/sbin/rcsubdomain reload > /dev/null 2>&1");
+ $result = system("/sbin/rcapparmor reload > /dev/null 2>&1");
ycp::Return( "true" );
} elsif ( $command eq "Write") {
if ( (ref($argument) eq "HASH") ) {
@@ -121,7 +121,7 @@ while ( <STDIN> ) {
if ( (ref($ref) eq "HASH") ) {
%sd = %profiles;
$UI_Mode = "yast";
- $result = Immunix::SubDomain::writeprofile($profilename);
+ $result = Immunix::AppArmor::writeprofile($profilename);
} else {
ycp::Return( "false" );
}
@@ -129,11 +129,11 @@ while ( <STDIN> ) {
}
} elsif ( $command eq "Execute") {
if ( $path eq '.mode_to_string') {
- my $ret = Immunix::SubDomain::mode_to_str( $argument );
+ my $ret = Immunix::AppArmor::mode_to_str( $argument );
ycp::Return($ret);
}
elsif ($path eq '.string_to_mode') {
- my $ret = Immunix::SubDomain::str_to_mode( $argument );
+ my $ret = Immunix::AppArmor::str_to_mode( $argument );
ycp::Return($ret);
}
} else {
--- a/src/agents/ag_complain
+++ b/src/agents/ag_complain
@@ -16,7 +16,7 @@
# - Toggles profiles between complain/enforce modes
#
# Requires:
-# - /usr/lib/perl5/vendor_perl/Immunix/SubDomain.pm
+# - /usr/lib/perl5/vendor_perl/Immunix/AppArmor.pm
#
# Input (Optional):
# - param 'showall' == 1 to change modes for profiles without associated
@@ -33,7 +33,7 @@
use strict;
use ycp;
-use Immunix::SubDomain;
+use Immunix::AppArmor;
our $UI_Mode = "yast-agent";
@@ -261,9 +261,9 @@ sub setProfMode {
} else {
if ($profMode eq 'complain') {
- Immunix::SubDomain::complain("$profName");
+ Immunix::AppArmor::complain("$profName");
} else {
- Immunix::SubDomain::enforce("$profName");
+ Immunix::AppArmor::enforce("$profName");
}
}
@@ -285,9 +285,9 @@ sub setProfMode {
if ( badFileName($prof->{'path'}), $args->{'showall'} ) {
ycp::y2milestone("Bad profile: $prof->{'path'}. Skipping.");
} elsif ($profMode eq 'complain') {
- Immunix::SubDomain::complain("$prof->{'path'}");
+ Immunix::AppArmor::complain("$prof->{'path'}");
} else {
- Immunix::SubDomain::enforce("$prof->{'path'}");
+ Immunix::AppArmor::enforce("$prof->{'path'}");
}
}
--- a/src/agents/ag_genprof
+++ b/src/agents/ag_genprof
@@ -26,7 +26,7 @@ textdomain("yast2-apparmor");
# and strings from y2-apparmor are translated differently anyway
textdomain("apparmor-utils");
-use Immunix::SubDomain;
+use Immunix::AppArmor;
setup_yast();
# !hack hack hack!
@@ -63,16 +63,16 @@ GetOptions(
# tell 'em how to use it...
&usage && exit if $help;
-my $sd_mountpoint = check_for_subdomain();
-unless($sd_mountpoint) {
- fatal_error( __("SubDomain does not appear to be started. Please enable SubDomain and try again."));
+my $aa_mountpoint = check_for_apparmor();
+unless($aa_mountpoint) {
+ fatal_error( __("AppArmor does not appear to be started. Please enable AppArmor and try again."));
}
# let's convert it to full path...
$profiledir = get_full_path($profiledir);
unless(-d $profiledir) {
- fatal_error(sprintf(__("Can't find subdomain profiles in %s."), $profiledir));
+ fatal_error(sprintf(__("Can't find apparmor profiles in %s."), $profiledir));
}
# what are we profiling?
@@ -240,7 +240,7 @@ for my $p (sort keys %helpers) {
}
}
-UI_Info(__("Reloaded SubDomain profiles in enforce mode."));
+UI_Info(__("Reloaded AppArmor profiles in enforce mode."));
UI_Info( sprintf(__('Finished generating profile for %s.'), $fqdbin));
shutdown_yast();
--- a/src/agents/ag_logparse
+++ b/src/agents/ag_logparse
@@ -13,11 +13,11 @@
################################################################################
# ag_logparse
#
-# - Generates report of SubDomain events
+# - Generates report of AppArmor events
#
# Requires:
-# - /usr/lib/immunix/SubDomain/perl/Immunix::Reports.pm
-# - /usr/lib/immunix/SubDomain/perl/Events.pm
+# - /usr/lib/immunix/AppArmor/perl/Immunix::Reports.pm
+# - /usr/lib/immunix/AppArmor/perl/Events.pm
#
# Input (Optional):
# -Start Date|End Date (Month, Day, Year, Time)
@@ -27,7 +27,7 @@
# -Severity Level
# -Denied Resources
# -Mode
-# -SDMode
+# -AAMode
#
################################################################################
my $Version='1.03';
@@ -279,15 +279,15 @@ while ( <STDIN> ) {
}
}
- # Parse sdmode & mode labels
- if ( $args->{'sdmode'} ) {
- if ($args->{'sdmode'} eq "All") {
- $args->{'sdmode'} = "-"; # Translate from GUI
+ # Parse aamode & mode labels
+ if ( $args->{'aamode'} ) {
+ if ($args->{'aamode'} eq "All") {
+ $args->{'aamode'} = "-"; # Translate from GUI
} else {
- $args->{'sdmode'} =~ s/\&//g;
- $args->{'sdmode'} =~ s/\://g;
- $args->{'sdmode'} =~ s/\s//g;
- $args->{'sdmode'} =~ s/AccessType//g;
+ $args->{'aamode'} =~ s/\&//g;
+ $args->{'aamode'} =~ s/\://g;
+ $args->{'aamode'} =~ s/\s//g;
+ $args->{'aamode'} =~ s/AccessType//g;
}
}
--- a/src/agents/ag_logprof
+++ b/src/agents/ag_logprof
@@ -16,7 +16,7 @@ use strict;
use Data::Dumper;
use Getopt::Long;
-use Immunix::SubDomain;
+use Immunix::AppArmor;
sub usage {
UI_Info("usage: $0 [ -d /path/to/profiles ] [ -f /path/to/logfile ] [ -m \"mark in log to start processing after\"");
@@ -43,7 +43,7 @@ GetOptions(
$profiledir = get_full_path($profiledir);
unless(-d $profiledir) {
- fatal_error "Can't find subdomain profiles in $profiledir.";
+ fatal_error "Can't find apparmor profiles in $profiledir.";
}
# load all the include files
--- a/src/agents/ag_reports_ess
+++ b/src/agents/ag_reports_ess
@@ -13,11 +13,11 @@
################################################################################
# ag_reports_ess
#
-# - Generates Report of SubDomain Executive Security Summary
+# - Generates Report of AppArmor Executive Security Summary
#
# Requires:
-# - /usr/lib/immunix/SubDomain/perl/Immunix/Events.pm
-# - /usr/lib/immunix/SubDomain/perl/Immunix/Reports.pm
+# - /usr/lib/immunix/AppArmor/perl/Immunix/Events.pm
+# - /usr/lib/immunix/AppArmor/perl/Immunix/Reports.pm
#
# Input (Optional):
#
--- a/src/agents/ag_reports_parse
+++ b/src/agents/ag_reports_parse
@@ -95,7 +95,7 @@ sub getFileList {
my @dirList = ();
my $error = undef;
- # Create list of subdomain activation prospects from Old logfiles
+ # Create list of apparmor activation prospects from Old logfiles
if ( opendir(LDIR, $logDir) ) {
if ( $args->{'type'} eq "sirRep" || $args->{'type'} eq "archRep" ) {
--- a/src/agents/ag_reports_sched
+++ b/src/agents/ag_reports_sched
@@ -13,11 +13,11 @@
################################################################################
# ag_reports_sched
#
-# - Adds/Deletes/Edits Scheduled Subdomain Event Reports (cron)
+# - Adds/Deletes/Edits Scheduled AppArmor Event Reports (cron)
#
# Requires:
-# - /usr/lib/immunix/SubDomain/perl/Immunix/Events.pm
-# - /usr/lib/immunix/SubDomain/perl/Immunix/Reports.pm
+# - /usr/lib/immunix/AppArmor/perl/Immunix/Events.pm
+# - /usr/lib/immunix/AppArmor/perl/Immunix/Reports.pm
#
# Uses:
# -/etc/apparmor/reports.crontab
@@ -31,7 +31,7 @@
# -PID
# -Severity Level
# -Denied Resources
-# -SD Mode
+# -AA Mode
# -Mode
#
################################################################################
@@ -87,7 +87,7 @@ sub getFilters {
my $filts = undef;
my $schedConf = '/etc/apparmor/reports.conf';
- my $regExp = '(prog|profile|pid|resource|severity|sdmode|mode)';
+ my $regExp = '(prog|profile|pid|resource|severity|aamode|mode)';
my $allConf = Immunix::Reports::getXmlReport($repName);
@@ -193,7 +193,7 @@ sub addConf {
# pre-process filters for GUI - UGLY
for ($args->{'prog'},$args->{'prof'},$args->{'pid'},$args->{'sev'},
- $args->{'res'},$args->{'sdmode'},$args->{'mode'}) {
+ $args->{'res'},$args->{'aamode'},$args->{'mode'}) {
$_ =~ s/\s+//g;
@@ -229,7 +229,7 @@ sub addConf {
print NCF "\t\t<pid>$args->{'pid'}</pid>\n";
print NCF "\t\t<severity>$args->{'sev'}</severity>\n";
print NCF "\t\t<resource>$args->{'res'}</resource>\n";
- print NCF "\t\t<sdmode>$args->{'sdmode'}</sdmode>\n";
+ print NCF "\t\t<aamode>$args->{'aamode'}</aamode>\n";
print NCF "\t\t<mode>$args->{'mode'}</mode>\n";
print NCF "\t\t$expPath\n";
print NCF "\t\t$expType\n";
@@ -648,12 +648,12 @@ while ( <STDIN> ) {
}
}
- # Parse sdmode & mode labels
- if ( $args->{'sdmode'} ) {
- $args->{'sdmode'} =~ s/\&//g;
- $args->{'sdmode'} =~ s/\://g;
- $args->{'sdmode'} =~ s/\s//g;
- $args->{'sdmode'} =~ s/AccessType//g;
+ # Parse aamode & mode labels
+ if ( $args->{'aamode'} ) {
+ $args->{'aamode'} =~ s/\&//g;
+ $args->{'aamode'} =~ s/\://g;
+ $args->{'aamode'} =~ s/\s//g;
+ $args->{'aamode'} =~ s/AccessType//g;
}
if ( $args->{'mode'} ) {
$args->{'mode'} =~ s/\&//g;
--- a/src/apparmor/reports.conf
+++ b/src/apparmor/reports.conf
@@ -22,7 +22,7 @@
<pid></pid>
<resource></resource>
<severity></severity>
- <sdmode>R</sdmode>
+ <aamode>R</aamode>
<mode></mode>
<email addr1="" addr2="" addr3="" />
<time>1104566401</time>
--- a/src/bin/reportgen.pl
+++ b/src/bin/reportgen.pl
@@ -26,7 +26,7 @@
# -PID 'pid'
# -Severity 'sevLevel'
# -Denied Resources 'resource'
-# -SD Mode 'sdmode'
+# -AA Mode 'aamode'
# -Mode 'mode'
#
################################################################################
@@ -522,13 +522,13 @@ sub runSir {
for (@$db) {
print SIR "$_->{'host'},$_->{'time'},$_->{'prog'},$_->{'profile'},";
print SIR "$_->{'pid'},$_->{'severity'},$_->{'mode_deny'},$_->{'mode_req'},";
- print SIR "$_->{'resource'},$_->{'sdmode'},$_->{'op'},$_->{'attr'},";
+ print SIR "$_->{'resource'},$_->{'aamode'},$_->{'op'},$_->{'attr'},";
print SIR "$_->{'name_alt'},$_->{'parent'},$_->{'active_hat'},";
print SIR "$_->{'net_family'},$_->{'net_proto'},$_->{'net_socktype'}\n";
# old aa-eventd
#print SIR "$_->{'host'},$_->{'date'},$_->{'prog'},$_->{'profile'},$_->{'pid'},";
- #print SIR "$_->{'severity'},$_->{'mode'},$_->{'resource'},$_->{'sdmode'}\n";
+ #print SIR "$_->{'severity'},$_->{'mode'},$_->{'resource'},$_->{'aamode'}\n";
}
close SIR;
--- a/src/clients/AA_AddProfile.ycp
+++ b/src/clients/AA_AddProfile.ycp
@@ -12,9 +12,9 @@ import "Wizard";
import "Popup";
import "Label";
import "Sequencer";
-include "subdomain/apparmor_packages.ycp";
-include "subdomain/apparmor_profile_check.ycp";
-include "subdomain/profile_dialogs.ycp";
+include "apparmor/apparmor_packages.ycp";
+include "apparmor/apparmor_profile_check.ycp";
+include "apparmor/profile_dialogs.ycp";
textdomain "yast2-apparmor";
// Globalz
@@ -28,7 +28,7 @@ define boolean CreateNewProfile() {
return false;
}
Settings["CURRENT_PROFILE"] = selectfilename;
- boolean profile = (boolean) SCR::Read (.subdomain_profiles.new, selectfilename);
+ boolean profile = (boolean) SCR::Read (.apparmor_profiles.new, selectfilename);
if ( profile == false && Popup::YesNoHeadline( _("Profile for ") + selectfilename + _(" already exists."), _("Would you like to open this profile in editing mode?") ) ) {
return true;
}
@@ -71,7 +71,7 @@ define any MainSequence() ``{
remove( Settings, "CURRENT_PROFILE");
return (any) `abort;
}
- map new_profile = (map) SCR::Read (.subdomain_profiles, Settings["CURRENT_PROFILE"]:"" );
+ map new_profile = (map) SCR::Read (.apparmor_profiles, Settings["CURRENT_PROFILE"]:"" );
Settings["PROFILE_MAP"] = new_profile;
Wizard::CreateDialog();
Wizard::SetTitleIcon("apparmor_add_profile");
@@ -79,7 +79,7 @@ define any MainSequence() ``{
Wizard::CloseDialog();
if ( ret == `abort ) {
string profile_name = Settings["NEW_PROFILE"]:"";
- any result = SCR::Write(.subdomain_profiles.delete, profile_name);
+ any result = SCR::Write(.apparmor_profiles.delete, profile_name);
}
Settings = remove( Settings, "NEW_PROFILE");
Settings = remove( Settings, "CURRENT_PROFILE");
--- a/src/clients/AA_DeleteProfile.ycp
+++ b/src/clients/AA_DeleteProfile.ycp
@@ -12,9 +12,9 @@ import "Wizard";
import "Label";
import "Popup";
import "Sequencer";
-include "subdomain/apparmor_packages.ycp";
-include "subdomain/apparmor_profile_check.ycp";
-include "subdomain/profile_dialogs.ycp";
+include "apparmor/apparmor_packages.ycp";
+include "apparmor/apparmor_profile_check.ycp";
+include "apparmor/profile_dialogs.ycp";
textdomain "yast2-apparmor";
// Globalz
@@ -25,8 +25,8 @@ define any DeleteProfileConfirmation() {
_("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(.subdomain_profiles.delete, profilename);
- any result2 = SCR::Write(.subdomain_profiles.reload, "-");
+ boolean result = SCR::Write(.apparmor_profiles.delete, profilename);
+ any result2 = SCR::Write(.apparmor_profiles.reload, "-");
}
return `finish;
}
@@ -35,12 +35,12 @@ define any MainSequence() ``{
//
// Read the profiles from the SCR agent
- map profiles = (map) SCR::Read (.subdomain_profiles, "all");
+ map profiles = (map) SCR::Read (.apparmor_profiles, "all");
map aliases = $[
"chooseprofile" : ``(SelectProfileForm(profiles, _("Please make a
selection from the listed profiles and press Next to delete the profile."),
- _("Delete Profile - Choose profile to delete"), "subdomain/delete_profile")),
+ _("Delete Profile - Choose profile to delete"), "apparmor/delete_profile")),
"deleteprofile" : ``(DeleteProfileConfirmation()),
];
--- a/src/clients/AA_EditProfile.ycp
+++ b/src/clients/AA_EditProfile.ycp
@@ -12,9 +12,9 @@ import "Wizard";
import "Popup";
import "Label";
import "Sequencer";
-include "subdomain/apparmor_packages.ycp";
-include "subdomain/apparmor_profile_check.ycp";
-include "subdomain/profile_dialogs.ycp";
+include "apparmor/apparmor_packages.ycp";
+include "apparmor/apparmor_profile_check.ycp";
+include "apparmor/profile_dialogs.ycp";
textdomain "yast2-apparmor";
// Globalz
@@ -25,7 +25,7 @@ define any MainSequence() ``{
//
// Read the profiles from the SCR agent
- map profiles = (map) SCR::Read (.subdomain_profiles, "all");
+ map profiles = (map) SCR::Read (.apparmor_profiles, "all");
map aliases = $[
"showProfile" : ``(DisplayProfileForm(Settings["CURRENT_PROFILE"]:"", false)),
--- a/src/clients/AA_Report.ycp
+++ b/src/clients/AA_Report.ycp
@@ -13,10 +13,10 @@ import "Wizard";
import "Popup";
import "Label";
import "Sequencer";
-include "subdomain/apparmor_packages.ycp";
-include "subdomain/apparmor_profile_check.ycp";
-include "subdomain/reporting_dialogues.ycp";
-include "subdomain/report_helptext.ycp";
+include "apparmor/apparmor_packages.ycp";
+include "apparmor/apparmor_profile_check.ycp";
+include "apparmor/reporting_dialogues.ycp";
+include "apparmor/report_helptext.ycp";
textdomain "yast2-apparmor";
// Globalz
--- a/src/clients/GenProf.ycp
+++ b/src/clients/GenProf.ycp
@@ -12,10 +12,10 @@
import "Wizard";
import "Popup";
import "Sequencer";
- include "subdomain/apparmor_profile_check.ycp";
- include "subdomain/apparmor_packages.ycp";
- include "subdomain/apparmor_ycp_utils.ycp";
- include "subdomain/helps.ycp";
+ include "apparmor/apparmor_profile_check.ycp";
+ include "apparmor/apparmor_packages.ycp";
+ include "apparmor/apparmor_ycp_utils.ycp";
+ include "apparmor/helps.ycp";
textdomain "yast2-apparmor";
boolean done = false;
--- a/src/clients/LogProf.ycp
+++ b/src/clients/LogProf.ycp
@@ -12,10 +12,10 @@
import "Wizard";
import "Popup";
import "Sequencer";
- include "subdomain/apparmor_packages.ycp";
- include "subdomain/apparmor_profile_check.ycp";
- include "subdomain/apparmor_ycp_utils.ycp";
- include "subdomain/helps.ycp";
+ include "apparmor/apparmor_packages.ycp";
+ include "apparmor/apparmor_profile_check.ycp";
+ include "apparmor/apparmor_ycp_utils.ycp";
+ include "apparmor/helps.ycp";
textdomain "yast2-apparmor";
boolean done = false;
--- a/src/clients/Makefile.am
+++ b/src/clients/Makefile.am
@@ -2,12 +2,12 @@ client_DATA = \
apparmor.ycp \
GenProf.ycp \
LogProf.ycp \
- SD_AddProfile.ycp \
- SD_DeleteProfile.ycp \
- SD_EditProfile.ycp \
- SD_Report.ycp \
- subdomain_no_impl.ycp \
- subdomain.ycp
+ AA_AddProfile.ycp \
+ AA_DeleteProfile.ycp \
+ AA_EditProfile.ycp \
+ AA_Report.ycp \
+ apparmor_no_impl.ycp \
+ apparmor-settings.ycp
EXTRA_DIST = \
$(client_DATA)
--- a/src/clients/apparmor-settings.ycp
+++ b/src/clients/apparmor-settings.ycp
@@ -14,14 +14,14 @@ textdomain "yast2-apparmor";
/* The main () */
y2milestone("----------------------------------------");
-y2milestone("Subdomain module started");
+y2milestone("AppArmor module started");
import "Label";
import "Popup";
import "Wizard";
-include "subdomain/apparmor_packages.ycp";
-include "subdomain/sd-config.ycp";
+include "apparmor/apparmor_packages.ycp";
+include "apparmor/aa-config.ycp";
// no command line support #269891
if (size(WFM::Args()) > 0 )
@@ -37,7 +37,7 @@ if (!installAppArmorPackages()) {
list<map> config_steps =
[
- $[ "id": "subdomain", "label": _("Enable AppArmor Functions") ],
+ $[ "id": "apparmor", "label": _("Enable AppArmor Functions") ],
];
list<map> steps = flatten( [ config_steps ] );
@@ -49,8 +49,8 @@ define symbol displayPage( integer no )
UI::WizardCommand(`SetCurrentStep( current_id ) );
- if ( current_id == "subdomain") {
- //button = displaySubdomainConfig();
+ if ( current_id == "apparmor") {
+ //button = displayAppArmorConfig();
button = displayAppArmorConfig();
}
--- a/src/clients/apparmor.ycp
+++ b/src/clients/apparmor.ycp
@@ -4,9 +4,9 @@ import "Wizard";
import "Label";
import "Popup";
import "Sequencer";
-include "subdomain/apparmor_packages.ycp";
-include "subdomain/apparmor_profile_check.ycp";
-include "subdomain/profile_dialogs.ycp";
+include "apparmor/apparmor_packages.ycp";
+include "apparmor/apparmor_profile_check.ycp";
+include "apparmor/profile_dialogs.ycp";
any startDialog(){
/* AppArmor dialog caption */
@@ -26,13 +26,13 @@ any startDialog(){
/* Selection box label */
`SelectionBox(`id(`modules), `opt(`notify), _("&Available AppArmor Modules:"), [
/* Selection box items */
- `item(`id("subdomain"), _("Settings"), true),
+ `item(`id("apparmor-settings"), _("Settings"), true),
`item(`id("GenProf"), _("Generate Profile")),
`item(`id("LogProf"), _("Update Profile")),
- `item(`id("SD_Report"), _("Reports")),
- `item(`id("SD_EditProfile"), _("Edit Profile")),
- `item(`id("SD_AddProfile"), _("Add Manually Profile")),
- `item(`id("SD_DeleteProfile"), _("Delete 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"))
]),
`VSpacing(3)
),
@@ -74,7 +74,7 @@ any startDialog(){
}
}
- string launch = "subdomain";
+ string launch = "apparmor";
if(ret == `next) {
launch = (string) UI::QueryWidget(`id(`modules), `CurrentItem);
y2debug("launch=%1", launch);
--- a/src/clients/apparmor_no_impl.ycp
+++ b/src/clients/apparmor_no_impl.ycp
@@ -11,7 +11,7 @@
import "Popup";
import "Wizard";
-//include "subdomain/prof-config.ycp";
+//include "apparmor/prof-config.ycp";
/* BEGIN - This is just temporary filler */
Popup::Message("This function is not implemented at this time");
--- a/src/include/Makefile.am
+++ b/src/include/Makefile.am
@@ -1 +1 @@
-SUBDIRS = subdomain
+SUBDIRS = apparmor
--- a/src/include/apparmor/Makefile.am
+++ b/src/include/apparmor/Makefile.am
@@ -1,4 +1,4 @@
-yncludedir = @yncludedir@/subdomain
+yncludedir = @yncludedir@/apparmor
ynclude_DATA = \
apparmor_packages.ycp \
@@ -12,7 +12,7 @@ ynclude_DATA = \
reporting_archived_dialogs.ycp \
reporting_dialogues.ycp \
reporting_utils.ycp \
- sd-config.ycp
+ aa-config.ycp
EXTRA_DIST = \
$(ynclude_DATA)
--- a/src/include/apparmor/aa-config.ycp
+++ b/src/include/apparmor/aa-config.ycp
@@ -8,9 +8,9 @@
*
------------------------------------------------------------------*/
{
-include "subdomain/config_complain.ycp";
-include "subdomain/helps.ycp";
-include "subdomain/apparmor_ycp_utils.ycp";
+include "apparmor/config_complain.ycp";
+include "apparmor/helps.ycp";
+include "apparmor/apparmor_ycp_utils.ycp";
textdomain "yast2-apparmor";
import "Label";
@@ -18,15 +18,15 @@ import "Label";
define boolean changeAppArmorState(boolean aaEnabled) {
any error = nil;
- string sdAction = "";
+ string aaAction = "";
if (aaEnabled == true) {
- sdAction = "subdomain:enable";
+ aaAction = "apparmor:enable";
} else {
- sdAction = "subdomain:disable";
+ aaAction = "apparmor:disable";
}
- error = SCR::Execute(.sdconf, sdAction);
+ error = SCR::Execute(.aaconf, aaAction);
if ( error != nil && is(error, string) ) {
@@ -42,7 +42,7 @@ define boolean changeAppArmorState(boole
define void displayNotifyForm() {
- map settings = (map) SCR::Execute(.subdomain, "sd-notify-settings");
+ map settings = (map) SCR::Execute(.apparmor, "aa-notify-settings");
map<string,any> terse = settings["terse"]:$[];
map<string,any> summary = settings["summary"]:$[];
@@ -183,7 +183,7 @@ define void displayNotifyForm() {
s_freq = UI::QueryWidget(`id(`summary_freq), `Value);
v_freq = UI::QueryWidget(`id(`verbose_freq), `Value);
- set_notify["sd-set-notify"] = "yes";
+ set_notify["aa-set-notify"] = "yes";
terse["terse_freq"] = tostring(t_freq);
summary["summary_freq"] = tostring(s_freq);
verbose["verbose_freq"] = tostring(v_freq);
@@ -270,7 +270,7 @@ define void displayNotifyForm() {
answers["summary"] = summary;
answers["verbose"] = verbose;
- string result = (string) SCR::Execute(.sdconf, answers);
+ string result = (string) SCR::Execute(.aaconf, answers);
if (result != "success") {
Popup::Error( _("Configuration failed for the following operations: ") + result);
@@ -297,16 +297,16 @@ define symbol displayAppArmorConfig () {
// AppArmor Status
boolean aaEnabled = false;
boolean ntIsEnabled = false;
- string subdomain = (string) SCR::Execute(.subdomain, "sd-status");
- string sdEnStr = _("AppArmor is disabled");
+ string apparmor = (string) SCR::Execute(.apparmor, "aa-status");
+ string aaEnStr = _("AppArmor is disabled");
- if (subdomain == "enabled") {
+ if (apparmor == "enabled") {
aaEnabled = true;
- sdEnStr = _("AppArmor is enabled");
+ aaEnStr = _("AppArmor is enabled");
}
// Notification Status
- string evnotify = (string) SCR::Execute(.subdomain, "sd-notify");
+ string evnotify = (string) SCR::Execute(.apparmor, "aa-notify");
string evEnStr = _("Notification is disabled");
if (evnotify == "enabled") {
ntIsEnabled = true;
--- a/src/include/apparmor/apparmor_profile_check.ycp
+++ b/src/include/apparmor/apparmor_profile_check.ycp
@@ -25,7 +25,7 @@ define boolean checkProfileSyntax () {
boolean syntax_ok = true;
args["profile-syntax-check"] = "1";
- list <string> errors = (list <string>) SCR::Execute (.subdomain, "profile-syntax-check" );
+ list <string> errors = (list <string>) SCR::Execute (.apparmor, "profile-syntax-check" );
foreach ( string error, errors, ``{
syntax_ok = false;
errmsg = errmsg + "<li>" + error + "</li>";
--- a/src/include/apparmor/capabilities.ycp
+++ b/src/include/apparmor/capabilities.ycp
@@ -210,7 +210,7 @@ _("<li> Allows setting read ahead and fl
_("<li> Allows tuning the ide driver</li>
<li> Allows access to the nvram device</li>
<li> Allows administration of apm_bios, serial and bttv (TV) device</li>
-<li> Allows manufacturer commands in isdn CAPI support driver</li>") +
+<li> Allows manufacturer commands in iaan CAPI support driver</li>") +
_("<li> Allows reading non-standardized portions of pci configuration space</li>
<li> Allows DDI debug ioctl on sbpcd driver</li>
--- a/src/include/apparmor/config_complain.ycp
+++ b/src/include/apparmor/config_complain.ycp
@@ -161,7 +161,7 @@ define symbol profileModeConfigForm() {
} else if ( id == `next ) {
integer ret = -1;
if ( modified )
- ret = (integer) SCR::Execute (.target.bash, "/sbin/rcsubdomain reload > /dev/null 2>&1");
+ ret = (integer) SCR::Execute (.target.bash, "/sbin/rcapparmor reload > /dev/null 2>&1");
else {
y2milestone("No change to Apparmor profile modes - nothing to do.");
break;
--- a/src/include/apparmor/helps.ycp
+++ b/src/include/apparmor/helps.ycp
@@ -29,7 +29,7 @@ had 10 security events since Tue Oct 12
_("<p><b>Summary Notification:</b> The Summary notification displays
the logged AppArmor security events, and lists the number of
individual occurrences, including the date of the last occurrence.
-<br>For example:<br> <tt>SubDomain: PERMITTING access to capability
+<br>For example:<br> <tt>AppArmor: PERMITTING access to capability
'setgid' (httpd2-prefork(6347) profile /usr/sbin/httpd2-prefork
active /usr/sbin/httpd2-prefork) 2 times, the latest at Sat Oct 9 16:05:54 2004.</tt>
</p>") +
@@ -43,7 +43,7 @@ and the type of file permission access t
_("<p>Verbose Notification also reports several messages that
the logprof tool uses to interpret profiles. <br>For example:<br>
-<tt> Oct 9 15:40:31 SubDomain: PERMITTING r access to
+<tt> Oct 9 15:40:31 AppArmor: PERMITTING r access to
/etc/apache2/httpd.conf (httpd2-prefork(6068) profile
/usr/sbin/httpd2-prefork active /usr/sbin/httpd2-prefork)</tt></p>") +
@@ -146,7 +146,7 @@ in another executable and granting uncon
execution rights, it is possible to bypass the mandatory
constraints imposed on all confined processes.
For more information on what is constrained, see the
-subdomain(7) man page.") +
+apparmor(7) man page.") +
"<br><br>" +
_("<b>Discrete Profile execute mode</b><br>") +
--- a/src/include/apparmor/profile_dialogs.ycp
+++ b/src/include/apparmor/profile_dialogs.ycp
@@ -12,7 +12,7 @@ import "Wizard";
import "Popup";
import "Label";
import "Map";
-include "subdomain/capabilities.ycp";
+include "apparmor/capabilities.ycp";
textdomain "yast2-apparmor";
// Globalz
@@ -625,7 +625,7 @@ define list<term> generateTableContents(
indx = indx+1; });
foreach( string name, map val, (map<string,map>) paths, {
- string mode = (string) SCR::Execute(.subdomain_profiles.mode_to_string, val["mode"]:0);
+ string mode = (string) SCR::Execute(.apparmor_profiles.mode_to_string, val["mode"]:0);
newlist = add( newlist, `item( `id(indx), name, mode));
indx = indx+1; });
@@ -896,7 +896,7 @@ that is inherited by the child program o
string perms = (string) select((term) UI::QueryWidget(`id(`table), `Item(itemselected)), 2, "");
map results = fileEntryPopup( rule, perms, pathname );
integer newperms = 0;
- newperms = (integer) SCR::Execute(.subdomain_profiles.string_to_mode, results["PERM"]:"");
+ newperms = (integer) SCR::Execute(.apparmor_profiles.string_to_mode, results["PERM"]:"");
rule = results["FILE"]:"";
if ( rule != "" ) {
if ( rule != oldrule ) {
@@ -963,7 +963,7 @@ that is inherited by the child program o
continue;
}
addfname = newentry["FILE"]:"";
- addperms = (integer) SCR::Execute(.subdomain_profiles.string_to_mode, newentry["PERM"]:"");
+ addperms = (integer) SCR::Execute(.apparmor_profiles.string_to_mode, newentry["PERM"]:"");
// Make sure that the entry doesn't already exist
paths = add( paths, addfname, $["audit":0, "mode": addperms] );
profile["allow","path"] = paths;
@@ -996,7 +996,7 @@ that is inherited by the child program o
return `showhat;
}
} else if ( id == `include ) {
- list <string> customIncludes = (list <string>) SCR::Read(.subdomain, "custom-includes");
+ list <string> customIncludes = (list <string>) SCR::Read(.apparmor, "custom-includes");
string newInclude = UI::AskForExistingFile( "/etc/apparmor.d/abstractions", "", _("Select File To Include"));
if ( newInclude == nil || (string)newInclude == "" ) {
continue;
@@ -1059,8 +1059,8 @@ that is inherited by the child program o
map argmap = $[ "PROFILE_HASH" : Settings["PROFILE_MAP"]:$[],
"PROFILE_NAME" : pathname
];
- any result = SCR::Write(.subdomain_profiles, argmap);
- any result2 = SCR::Write(.subdomain_profiles.reload, "-");
+ any result = SCR::Write(.apparmor_profiles, argmap);
+ any result2 = SCR::Write(.apparmor_profiles.reload, "-");
}
} else {
if ( ! haskey(hats, Settings["CURRENT_HAT"]:"") ) {
--- a/src/include/apparmor/reporting_archived_dialogs.ycp
+++ b/src/include/apparmor/reporting_archived_dialogs.ycp
@@ -13,8 +13,8 @@
import "Wizard";
import "Popup";
import "Label";
-include "subdomain/report_helptext.ycp";
-include "subdomain/reporting_utils.ycp";
+include "apparmor/report_helptext.ycp";
+include "apparmor/reporting_utils.ycp";
textdomain "yast2-apparmor";
// Global
@@ -106,7 +106,7 @@ define term filterArchForm() {
),
`HBox(
`HWeight( 3, `TextEntry(`id(`res), _("Detail") )),
- `HWeight( 3, `ReplacePoint(`id(`replace_sdmode), `PushButton(`id(`sdmode), _("Access Type: R") ))),
+ `HWeight( 3, `ReplacePoint(`id(`replace_aamode), `PushButton(`id(`aamode), _("Access Type: R") ))),
`HWeight( 3, `ReplacePoint(`id(`replace_mode), `PushButton(`id(`mode), _("Mode: All") ))),
`HSpacing( `opt(`hstretch), 5)
),
@@ -137,7 +137,7 @@ define map<any,any> setArchFilter() {
UI::ChangeWidget(`id(`bydate_frame), `Enabled, false);
string mode = "All";
- string sdmode = "R";
+ string aamode = "R";
map event = $[];
any id = nil;
@@ -235,11 +235,11 @@ define map<any,any> setArchFilter() {
string pid = (string) UI::QueryWidget(`id(`pid), `Value);
string sev = (string) UI::QueryWidget(`id(`sev), `Value);
string res = (string) UI::QueryWidget(`id(`res), `Value);
- string sdmode = (string) UI::QueryWidget(`id(`sdmode), `Label);
+ string aamode = (string) UI::QueryWidget(`id(`aamode), `Label);
string mode = (string) UI::QueryWidget(`id(`mode), `Label);
string exppath = (string) UI::QueryWidget(`id(`expPath), `Value);
- if (sdmode == "-") { sdmode = "All"; }
+ if (aamode == "-") { aamode = "All"; }
if (mode == "-") { mode = "All"; }
if ( program_name != "" ) { Settings["prog"] = program_name; }
@@ -247,17 +247,17 @@ define map<any,any> setArchFilter() {
if ( pid != "" ) { Settings["pid"] = pid; }
if ( sev != "" && sev != "All" ) { Settings["severity"] = sev; }
if ( res != "" ) { Settings["resource"] = res; }
- if ( sdmode != "" ) { Settings["sdmode"] = sdmode; }
+ if ( aamode != "" ) { Settings["aamode"] = aamode; }
if ( mode != "" ) { Settings["mode"] = mode; }
if ( exppath != "" ) { Settings["exportPath"] = exppath; }
id = nil;
break;
- } else if ( id == `sdmode ) {
- sdmode = popUpSdMode();
- Settings["sdmode"] = sdmode;
- UI::ReplaceWidget(`id(`replace_sdmode), `PushButton(`id(`sdmode), _("Access Type: ") + sdmode) );
+ } else if ( id == `aamode ) {
+ aamode = popUpSdMode();
+ Settings["aamode"] = aamode;
+ UI::ReplaceWidget(`id(`replace_aamode), `PushButton(`id(`aamode), _("Access Type: ") + aamode) );
} else if ( id == `mode ) {
mode = popUpMode();
--- a/src/include/apparmor/reporting_dialogues.ycp
+++ b/src/include/apparmor/reporting_dialogues.ycp
@@ -12,9 +12,9 @@
import "Wizard";
import "Popup";
import "Label";
-include "subdomain/reporting_utils.ycp";
-include "subdomain/report_helptext.ycp";
-include "subdomain/reporting_archived_dialogs.ycp";
+include "apparmor/reporting_utils.ycp";
+include "apparmor/report_helptext.ycp";
+include "apparmor/reporting_archived_dialogs.ycp";
textdomain "yast2-apparmor";
// Globalz
@@ -223,7 +223,7 @@ define term editFilterForm (map Settings
string prof = Settings["prof"]:"";
string pid = Settings["pid"]:"";
string res = Settings["res"]:"";
- string sdmode = Settings["sdmode"]:"R";
+ string aamode = Settings["aamode"]:"R";
string mode = Settings["mode"]:"All";
string sev = Settings["sev"]:"All";
@@ -250,7 +250,7 @@ define term editFilterForm (map Settings
`VBox(
`Label( _("Access Type: ") ),
`Bottom( `HWeight( 4,
- `ReplacePoint(`id(`replace_sdmode), `PushButton(`id(`sdmode), modeToHumanString( sdmode )))))
+ `ReplacePoint(`id(`replace_aamode), `PushButton(`id(`aamode), modeToHumanString( aamode )))))
),
`VBox(
`Label( _("Mode: ") ),
@@ -293,14 +293,14 @@ term schedFilterForm =
`VBox(
`Label( _("Access Type: ") ),
- `ReplacePoint(`id(`replace_sdmode), `PushButton(`id(`sdmode), "R" ))
+ `ReplacePoint(`id(`replace_aamode), `PushButton(`id(`aamode), "R" ))
),
`VBox(
`Label( _("Mode: ") ),
`ReplacePoint(`id(`replace_mode), `PushButton(`id(`mode), _("All") ))
),
- //`HWeight( 4, `ReplacePoint(`id(`replace_sdmode), `PushButton(`id(`sdmode), _("Access Type: R") ))),
+ //`HWeight( 4, `ReplacePoint(`id(`replace_aamode), `PushButton(`id(`aamode), _("Access Type: R") ))),
//`HWeight( 4, `ReplacePoint(`id(`replace_mode), `PushButton(`id(`mode), _("Mode: All") ))),
`HSpacing( `opt(`hstretch), 1)
),
@@ -353,7 +353,7 @@ term filterForm =
`VBox(
`Label( _("Access Type: ") ),
- `ReplacePoint(`id(`replace_sdmode), `PushButton(`id(`sdmode), "R" ))
+ `ReplacePoint(`id(`replace_aamode), `PushButton(`id(`aamode), "R" ))
),
`VBox(
`Label( _("Mode: ") ),
@@ -361,7 +361,7 @@ term filterForm =
),
- //`HWeight( 3, `ReplacePoint(`id(`replace_sdmode), `PushButton(`id(`sdmode), _("Access Type: R") ))),
+ //`HWeight( 3, `ReplacePoint(`id(`replace_aamode), `PushButton(`id(`aamode), _("Access Type: R") ))),
//`HWeight( 3, `ReplacePoint(`id(`replace_mode), `PushButton(`id(`mode), _("Mode: All") ))),
`HSpacing( `opt(`hstretch), 5)
),
@@ -387,22 +387,22 @@ define term filterForm2(string name, map
any apid = preFilters["pid"]:nil;
any ares = preFilters["resource"]:nil;
any amode = preFilters["mode"]:"All";
- any asdmode = preFilters["sdmode"]:"All";
+ any aaamode = preFilters["aamode"]:"All";
string prog = "";
string prof = "";
string pid = "";
string res = "";
string mode = "";
- string sdmode = "";
+ string aamode = "";
if ( aprog != nil ) { prog = tostring(aprog); }
if ( aprof != nil ) { prof = tostring(aprof); }
if ( apid != nil ) { pid = tostring(apid); }
if ( ares != nil ) { res = tostring(ares); }
if ( amode != nil ) { mode = tostring(amode); }
- if ( asdmode != nil ) { sdmode = tostring(asdmode); }
- if (sdmode == "-") { sdmode = "All"; }
+ if ( aaamode != nil ) { aamode = tostring(aaamode); }
+ if (aamode == "-") { aamode = "All"; }
if (mode == "-") { mode = "All"; }
term ff2 =
@@ -447,7 +447,7 @@ define term filterForm2(string name, map
`TextEntry(`id(`res), _("Detail"), res),
`VBox(
`Label( _("Access Type: ") ),
- `ReplacePoint(`id(`replace_sdmode), `PushButton(`id(`sdmode), modeToHumanString( sdmode )))
+ `ReplacePoint(`id(`replace_aamode), `PushButton(`id(`aamode), modeToHumanString( aamode )))
),
`VBox(
`Label( _("Mode: ") ),
@@ -492,7 +492,7 @@ define term turnReportPage (string name,
reportList = add( reportList, `item( `id(key), record["host"]:nil,
record["date"]:nil, record["prog"]:nil, record["profile"]:nil,
record["pid"]:nil, record["severity"]:nil, record["mode"]:nil,
- record["resource"]:nil, record["sdmode"]:nil ));
+ record["resource"]:nil, record["aamode"]:nil ));
key = key + 1;
});
*/
@@ -902,7 +902,7 @@ define map<any,any> filterConfigForm(str
}
string mode = "All";
- string sdmode = "R";
+ string aamode = "R";
Settings = $[ ];
map event = $[];
@@ -931,13 +931,13 @@ define map<any,any> filterConfigForm(str
Settings["break"] = "back";
break;
- } else if ( id == `sdmode ) {
+ } else if ( id == `aamode ) {
- sdmode = popUpSdMode();
+ aamode = popUpSdMode();
- if ( sdmode != "" ) {
- Settings["sdmode"] = sdmode;
- UI::ReplaceWidget(`id(`replace_sdmode), `PushButton(`id(`sdmode), modeToHumanString( sdmode) ) );
+ if ( aamode != "" ) {
+ Settings["aamode"] = aamode;
+ UI::ReplaceWidget(`id(`replace_aamode), `PushButton(`id(`aamode), modeToHumanString( aamode) ) );
}
} else if ( id == `mode ) {
@@ -984,7 +984,7 @@ define map<any,any> filterConfigForm(str
string pid = (string) UI::QueryWidget(`id(`pid), `Value);
string sev = (string) UI::QueryWidget(`id(`sev), `Value);
string res = (string) UI::QueryWidget(`id(`res), `Value);
- string sdmode = (string) UI::QueryWidget(`id(`sdmode), `Label);
+ string aamode = (string) UI::QueryWidget(`id(`aamode), `Label);
string mode = (string) UI::QueryWidget(`id(`mode), `Label);
string exppath = (string) UI::QueryWidget(`id(`expPath), `Value);
@@ -998,7 +998,7 @@ define map<any,any> filterConfigForm(str
if ( pid != "" ) { Settings["pid"] = pid; }
if ( sev != "" && sev != "All" ) { Settings["severity"] = sev; }
if ( res != "" ) { Settings["resource"] = res; }
- if ( sdmode != "" ) { Settings["sdmode"] = humanStringToMode( sdmode); }
+ if ( aamode != "" ) { Settings["aamode"] = humanStringToMode( aamode); }
if ( mode != "" ) { Settings["mode"] = humanStringToMode( mode ); }
if ( bydate == true ) {
@@ -1729,7 +1729,7 @@ define void addSchedForm() {
)));
string mode = "All";
- string sdmode = "R";
+ string aamode = "R";
integer timeout_millisec = 20 * 1000;
map event = $[];
any addInput = nil;
@@ -1830,13 +1830,13 @@ define void addSchedForm() {
}
}}
- } else if ( addInput == `sdmode ) {
+ } else if ( addInput == `aamode ) {
- sdmode = popUpSdMode();
+ aamode = popUpSdMode();
- if (sdmode != "") {
- Settings["sdmode"] = sdmode;
- UI::ReplaceWidget(`id(`replace_sdmode), `PushButton(`id(`sdmode), modeToHumanString( sdmode) ));
+ if (aamode != "") {
+ Settings["aamode"] = aamode;
+ UI::ReplaceWidget(`id(`replace_aamode), `PushButton(`id(`aamode), modeToHumanString( aamode) ));
}
} else if ( addInput == `mode ) {
@@ -1854,7 +1854,7 @@ define void addSchedForm() {
string prof = (string) UI::QueryWidget(`id(`prof), `Value);
string pid = (string) UI::QueryWidget(`id(`pid), `Value);
string res = (string) UI::QueryWidget(`id(`res), `Value);
- string sdmode = (string) UI::QueryWidget(`id(`sdmode), `Label);
+ string aamode = (string) UI::QueryWidget(`id(`aamode), `Label);
string mode = (string) UI::QueryWidget(`id(`mode), `Label);
string sev = (string) UI::QueryWidget(`id(`sev), `Value);
string expType = (string) UI::QueryWidget(`id(`expType), `Value);
@@ -1876,7 +1876,7 @@ define void addSchedForm() {
Settings["pid"] = pid;
Settings["sev"] = sev;
Settings["res"] = res;
- Settings["sdmode"] = humanStringToMode( sdmode );
+ Settings["aamode"] = humanStringToMode( aamode );
Settings["mode"] = humanStringToMode( mode );
any error = (any) SCR::Write(.reports_sched, Settings);
@@ -2000,7 +2000,7 @@ define void editSchedForm() {
any apid = db2["pid"]:nil;
any ares = db2["res"]:nil;
any asev = db2["severity"]:nil;
- any asdmode = db2["sdmode"]:nil;
+ any aaamode = db2["aamode"]:nil;
any amode = db2["mode"]:nil;
any acsv = db2["csv"]:nil;
any ahtml = db2["html"]:nil;
@@ -2011,9 +2011,9 @@ define void editSchedForm() {
if ( apid != nil ) { Settings["pid"] = tostring(apid); }
if ( ares != nil ) { Settings["res"] = tostring(ares); }
if ( asev != nil ) { Settings["sev"] = tostring(asev); }
- if ( asdmode != nil ) { Settings["sdmode"] = tostring(asdmode); }
- if ( asdmode == nil || asdmode == "-" ) {
- Settings["sdmode"] = "All";
+ if ( aaamode != nil ) { Settings["aamode"] = tostring(aaamode); }
+ if ( aaamode == nil || aaamode == "-" ) {
+ Settings["aamode"] = "All";
}
if ( amode != nil ) { Settings["mode"] = tostring(amode); }
@@ -2115,7 +2115,7 @@ define void editSchedForm() {
/**************************************************/
string mode = _("All");
- string sdmode = _("R");
+ string aamode = _("R");
integer timeout_millisec = 20 * 1000;
map event = $[];
@@ -2176,13 +2176,13 @@ define void editSchedForm() {
UI::ChangeWidget(`id(`expPath), `Value, oldExpPath);
}
- } else if ( editInput == `sdmode ) {
+ } else if ( editInput == `aamode ) {
- sdmode = popUpSdMode();
+ aamode = popUpSdMode();
- if ( sdmode != "" ) {
- Settings["sdmode"] = sdmode;
- UI::ReplaceWidget(`id(`replace_sdmode), `PushButton(`id(`sdmode), modeToHumanString( sdmode) ));
+ if ( aamode != "" ) {
+ Settings["aamode"] = aamode;
+ UI::ReplaceWidget(`id(`replace_aamode), `PushButton(`id(`aamode), modeToHumanString( aamode) ));
}
} else if ( editInput == `mode ) {
@@ -2237,7 +2237,7 @@ define void editSchedForm() {
string prof = (string) UI::QueryWidget(`id(`prof), `Value);
string pid = (string) UI::QueryWidget(`id(`pid), `Value);
string res = (string) UI::QueryWidget(`id(`res), `Value);
- string sdmode = (string) UI::QueryWidget(`id(`sdmode), `Label);
+ string aamode = (string) UI::QueryWidget(`id(`aamode), `Label);
string mode = (string) UI::QueryWidget(`id(`mode), `Label);
string sev = (string) UI::QueryWidget(`id(`sev), `Value);
@@ -2246,7 +2246,7 @@ define void editSchedForm() {
Settings["pid"] = pid;
Settings["sev"] = sev;
Settings["res"] = res;
- Settings["sdmode"] = humanStringToMode( sdmode );
+ Settings["aamode"] = humanStringToMode( aamode );
Settings["mode"] = humanStringToMode( mode );
} else {
--- a/src/include/apparmor/reporting_utils.ycp
+++ b/src/include/apparmor/reporting_utils.ycp
@@ -12,7 +12,7 @@
import "Wizard";
import "Popup";
import "Label";
-include "subdomain/report_helptext.ycp";
+include "apparmor/report_helptext.ycp";
textdomain "yast2-apparmor";
define boolean checkEventDb() {
@@ -222,7 +222,7 @@ define string getSortId(string type, any
} else if ( sortId == 6 ) {
sortKey = "severity";
} else if ( sortId == 7 ) {
- sortKey = "sdmode";
+ sortKey = "aamode";
} else if ( sortId == 8 ) {
sortKey = "mode";
}
@@ -417,14 +417,14 @@ define string popUpMode() {
if ( UI::QueryWidget(`id(`clear), `Value) == true ) {
mode = "All";
} else {
- list<string> sdList = [];
- if ( UI::QueryWidget(`id(`read), `Value) == true ) { sdList = add(sdList, "r"); }
- if ( UI::QueryWidget(`id(`write), `Value) == true ) { sdList = add(sdList, "w"); }
- if ( UI::QueryWidget(`id(`link), `Value) == true ) { sdList = add(sdList, "l"); }
- if ( UI::QueryWidget(`id(`exec), `Value) == true ) { sdList = add(sdList, "x"); }
- if ( UI::QueryWidget(`id(`mmap), `Value) == true ) { sdList = add(sdList, "m"); }
+ list<string> aaList = [];
+ if ( UI::QueryWidget(`id(`read), `Value) == true ) { aaList = add(aaList, "r"); }
+ if ( UI::QueryWidget(`id(`write), `Value) == true ) { aaList = add(aaList, "w"); }
+ if ( UI::QueryWidget(`id(`link), `Value) == true ) { aaList = add(aaList, "l"); }
+ if ( UI::QueryWidget(`id(`exec), `Value) == true ) { aaList = add(aaList, "x"); }
+ if ( UI::QueryWidget(`id(`mmap), `Value) == true ) { aaList = add(aaList, "m"); }
- foreach ( string perm, sdList, { mode = mode + perm; });
+ foreach ( string perm, aaList, { mode = mode + perm; });
}
break;
@@ -435,10 +435,10 @@ define string popUpMode() {
return mode;
}
-// Access Type - SD Mode
+// Access Type - AA Mode
define string popUpSdMode() {
- string checkMode = (string) UI::QueryWidget(`id(`sdmode), `Label);
+ string checkMode = (string) UI::QueryWidget(`id(`aamode), `Label);
checkMode = filterchars(checkMode, "APRl");
list splitMode = splitstring (checkMode, " ");
string mySdMode = splitMode[size(splitMode)-1]:"R";
@@ -497,7 +497,7 @@ define string popUpSdMode() {
UI::ChangeWidget(`id(`audit), `Value, false);
}
- string sdMode = "";
+ string aaMode = "";
map event = $[];
any id = nil;
@@ -512,7 +512,7 @@ define string popUpSdMode() {
UI::ChangeWidget(`id(`permit), `Value, false);
UI::ChangeWidget(`id(`reject), `Value, false);
UI::ChangeWidget(`id(`audit), `Value, false);
- sdMode = "All";
+ aaMode = "All";
}
} else if ( id == `permit || id == `reject || id == `audit ) {
@@ -527,21 +527,21 @@ define string popUpSdMode() {
} else if ( id == `cancel ) {
- sdMode = mySdMode;
+ aaMode = mySdMode;
break;
} else if ( id == `save ) {
if ( UI::QueryWidget(`id(`clear), `Value) == true ) {
- sdMode = "All";
+ aaMode = "All";
} else {
- sdMode = "";
+ aaMode = "";
list<string> mList = [];
if ( UI::QueryWidget(`id(`permit), `Value) == true ) { mList = add(mList, "P"); }
if ( UI::QueryWidget(`id(`reject), `Value) == true ) { mList = add(mList, "R"); }
if ( UI::QueryWidget(`id(`audit), `Value) == true ) { mList = add(mList, "A"); }
- foreach ( string state, mList, { sdMode = sdMode + state; });
+ foreach ( string state, mList, { aaMode = aaMode + state; });
}
break;
@@ -550,7 +550,7 @@ define string popUpSdMode() {
}
UI::CloseDialog();
- return sdMode;
+ return aaMode;
}
/* For On Demand Reports
@@ -594,7 +594,7 @@ define list<term> getReportList(string t
record["host"]:nil, record["date"]:nil, record["prog"]:nil,
record["profile"]:nil, record["pid"]:nil, record["severity"]:nil,
record["mode_req"]:nil, record["mode_deny"]:nil,
- record["resource"]:nil, record["sdmode"]:nil, record["op"]:nil,
+ record["resource"]:nil, record["aamode"]:nil, record["op"]:nil,
record["attr"]:nil, record["name_alt"]:nil, record["net_family"]:nil,
record["net_proto"]:nil, record["net_socktype"]:nil
));
--- a/src/perl/Notify.pm
+++ b/src/perl/Notify.pm
@@ -14,7 +14,7 @@ package Immunix::Notify;
# /usr/lib/perl5/vendor_perl/Immunix/Notify.pm
#
# - Parses /etc/apparmor/notify.cfg for AppArmor notification
-# - Used with sd-config.ycp for yast configuration
+# - Used with aa-config.ycp for yast configuration
#
################################################################################
--- a/src/scrconf/Makefile.am
+++ b/src/scrconf/Makefile.am
@@ -7,9 +7,9 @@ scrconf_DATA = \
reports_ess.scr \
reports_parse.scr \
reports_sched.scr \
- sdconf.scr \
- subdomain_profiles.scr \
- subdomain.scr
+ aaconf.scr \
+ apparmor_profiles.scr \
+ apparmor.scr
EXTRA_DIST = $(scrconf_DATA)
--- a/src/scrconf/aaconf.scr
+++ b/src/scrconf/aaconf.scr
@@ -1,8 +1,8 @@
/**
* File:
- * subdomain.scr
+ * apparmor.scr
* Summary:
- * SCR Agent for configuring subdomain
+ * SCR Agent for configuring apparmor
* Access:
* read/write
* Authors:
@@ -12,9 +12,9 @@
* Example:
* Read(.cron,$[..])
*
- * $Id: sdconf.scr 3715 2005-01-19 09:06:05Z sarnold $
+ * $Id: aaconf.scr 3715 2005-01-19 09:06:05Z sarnold $
*
*/
-.sdconf
+.aaconf
-`ag_sd_config ()
+`ag_aa_config ()
--- a/src/scrconf/apparmor.scr
+++ b/src/scrconf/apparmor.scr
@@ -1,8 +1,8 @@
/**
* File:
- * subdomain.scr
+ * apparmor.scr
* Summary:
- * SCR Agent for configuring subdomain
+ * SCR Agent for configuring apparmor
* Access:
* read/write
* Authors:
@@ -12,9 +12,9 @@
* Example:
* Read(.cron,$[..])
*
- * $Id: subdomain.scr 3715 2005-01-19 09:06:05Z sarnold $
+ * $Id: apparmor.scr 3715 2005-01-19 09:06:05Z sarnold $
*
*/
-.subdomain
+.apparmor
-`ag_subdomain ()
+`ag_apparmor ()
--- a/src/scrconf/apparmor_profiles.scr
+++ b/src/scrconf/apparmor_profiles.scr
@@ -34,7 +34,7 @@
* Read(.target.string, "/tmp/target.1")
* ("Some Test\n")
*
- * $Id: subdomain_profiles.scr 3715 2005-01-19 09:06:05Z sarnold $
+ * $Id: apparmor_profiles.scr 3715 2005-01-19 09:06:05Z sarnold $
*
* <p>The target-agent is used for various actions on the target system.</p>
*
@@ -48,6 +48,6 @@
*
* <p>For more information see the agent's own documentation.</p>
*/
-.subdomain_profiles
+.apparmor_profiles
-`ag_subdomain_profiles ()
+`ag_apparmor_profiles ()