Permalink
Browse files

added check for gpgdir_dN directories in -O encrypt mode

git-svn-id: file:///home/mbr/svn/gpgdir_repos/gpgdir/trunk@354 958e171a-1414-0410-8e2f-9d295d3c0db0
  • Loading branch information...
mrash committed Mar 21, 2010
1 parent 92bab73 commit e8887d77cb8818d4052dde6d2d77c85bafc927eb
Showing with 9 additions and 2 deletions.
  1. +9 −2 test/gpgdir_test.pl
View
@@ -375,11 +375,18 @@ ()
@data_dir_files = ();
find(\&find_files, $data_dir);
for my $file (@data_dir_files) {
- if (-f $file and not ($file =~ m|^\.| or $file =~ m|/\.|)) {
+ next if $file =~ m|^\.| or $file =~ m|/\.|;
+ if (-f $file) {
### gpgdir_1.gpg
unless ($file =~ m|gpgdir_\d+\.gpg$|) {
return &print_errors("[-] File $file not " .
- "encrypted and obfuscated");
+ "encrypted and obfuscated as 'gpgdir_N.gpg'");
+ }
+ } elsif (-d $file) {
+ ### gpgdir_d1/
+ unless ($file =~ m|gpgdir_\d+$|) {
+ return &print_errors("[-] Directory $file not " .
+ "obfuscated as 'gpgdir_dN'");
}
}
}

0 comments on commit e8887d7

Please sign in to comment.