projects
/
pgp-tools.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Imported new upstream release for gpgdir.
[pgp-tools.git]
/
gpgdir
/
gpgdir
diff --git
a/gpgdir/gpgdir
b/gpgdir/gpgdir
index 0075215e9cabcbeabfab826d3f6fc8d076da3a1c..b6d811847ed2a159d21f6b024d2d53bb8beb4f69 100755
(executable)
--- a/
gpgdir/gpgdir
+++ b/
gpgdir/gpgdir
@@
-10,9
+10,9
@@
#
# Author: Michael Rash (mbr@cipherdyne.com)
#
#
# Author: Michael Rash (mbr@cipherdyne.com)
#
-# Version: 1.9.
3
+# Version: 1.9.
5
#
#
-# Copyright (C) 2002-200
8
Michael Rash (mbr@cipherdyne.org)
+# Copyright (C) 2002-200
9
Michael Rash (mbr@cipherdyne.org)
#
# License: GNU General Public License version 2 (GPLv2)
#
#
# License: GNU General Public License version 2 (GPLv2)
#
@@
-28,7
+28,7
@@
#
###########################################################################
#
#
###########################################################################
#
-# $Id: gpgdir 3
28 2008-11-05 05:04:20
Z mbr $
+# $Id: gpgdir 3
41 2009-08-26 02:43:51
Z mbr $
#
use File::Find;
#
use File::Find;
@@
-40,8
+40,8
@@
use Cwd;
use strict;
### set the current gpgdir version and file revision numbers
use strict;
### set the current gpgdir version and file revision numbers
-my $version = '1.9.
3
';
-my $revision_svn = '$Revision: 3
28
$';
+my $version = '1.9.
5
';
+my $revision_svn = '$Revision: 3
41
$';
my $rev_num = '1';
($rev_num) = $revision_svn =~ m|\$Rev.*:\s+(\S+)|;
my $rev_num = '1';
($rev_num) = $revision_svn =~ m|\$Rev.*:\s+(\S+)|;
@@
-666,7
+666,7
@@
sub delete_file() {
$cmd .= ' -f -s ';
}
}
$cmd .= ' -f -s ';
}
}
- $cmd .=
$file
;
+ $cmd .=
qq|"$file"|
;
if ($verbose) {
print " Executing: $cmd\n";
}
if ($verbose) {
print " Executing: $cmd\n";
}
@@
-817,6
+817,8
@@
sub gpg_operation() {
$decrypt_filename = $1;
} elsif ($filename =~ /^(.+)\.asc$/) {
$decrypt_filename = $1;
$decrypt_filename = $1;
} elsif ($filename =~ /^(.+)\.asc$/) {
$decrypt_filename = $1;
+ } elsif ($filename =~ /^(.+)\.pgp$/) {
+ $decrypt_filename = $1;
}
if ($obfuscate_mode) {
}
if ($obfuscate_mode) {
@@
-1166,12
+1168,21
@@
sub find_files() {
sub check_file_criteria() {
my $file = shift;
### skip all links, zero size files, all hidden
sub check_file_criteria() {
my $file = shift;
### skip all links, zero size files, all hidden
- ### files (includes
.gnupg files
), etc.
+ ### files (includes
the .gnupg directory
), etc.
return if -d $file;
return if -d $file;
+
+ unless ($force_mode) {
+ if ($file =~ m|/\.|) {
+ print "[-] Skipping file: $file\n"
+ if $verbose and not $quiet;
+ return;
+ }
+ }
+
if (-e $file and not -l $file and -s $file != 0
if (-e $file and not -l $file and -s $file != 0
- and $file !~ m|
/\.
|) {
+ and $file !~ m|
\.gpgdir\.pid| and $file !~ m|\.gnupg
|) {
if ($encrypt_mode or $signing_mode) {
if ($encrypt_mode or $signing_mode) {
- if ($file =~ m|\.gpg| or $file =~ m|\.asc|) {
+ if ($file =~ m|\.gpg| or $file =~ m|\.asc|
or $file =~ m|\.pgp|
) {
print "[-] Skipping encrypted/signed file: $file\n" unless $quiet;
return;
}
print "[-] Skipping encrypted/signed file: $file\n" unless $quiet;
return;
}
@@
-1181,7
+1192,8
@@
sub check_file_criteria() {
return;
}
} else {
return;
}
} else {
- unless ($file =~ m|\.gpg| or $file =~ m|\.asc|) {
+ unless ($file =~ m|\.gpg| or $file =~ m|\.asc|
+ or $file =~ m|\.pgp|) {
print "[-] Skipping unencrypted file: $file\n" unless $quiet;
return;
}
print "[-] Skipping unencrypted file: $file\n" unless $quiet;
return;
}