summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/drakguard10
1 files changed, 4 insertions, 6 deletions
diff --git a/bin/drakguard b/bin/drakguard
index c92f1be..4e8201e 100755
--- a/bin/drakguard
+++ b/bin/drakguard
@@ -675,24 +675,22 @@ sub apply_block_program() {
}
#code to make diff bettween vectors
my (@intersection, @difference);
- my $element;
@intersection = @difference = ();
my %count = ();
- foreach $element (@original_list, @actual_list) { $count{$element}++ }
- foreach $element (keys %count) {
+ foreach my $element (@original_list, @actual_list) { $count{$element}++ }
+ foreach my $element (keys %count) {
push @{ $count{$element} > 1 ? \@intersection : \@difference }, $element;
}
if (scalar(@difference)) {
#keep the permissons save, make the way to do that
- my $diff;
- foreach $diff (@difference) {
+ foreach my $diff (@difference) {
my @orig_file = cat_($perms_orig);
my @progs_orig_file = grep { $_ && m/$diff/g } chomp_(cat_($perms_orig));
#test if program is in msec
my @msec_program = grep { $_ && m/$diff/g } chomp_(cat_($msec_conf));
if (scalar(@progs_orig_file)) {#test if is to remove or to add acl
#clean config file of the removed programs
- foreach $element (@progs_orig_file) {
+ foreach my $element (@progs_orig_file) {
my $val = $element;
substInFile {
s|$element.*\n||;