Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions Build.PL
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
use strict;
use warnings;
use Module::Build;
my $build = Module::Build->new(
dist_abstract => 'Credential protection and access control server',
dist_author => 'Martin Bartosch <mbartosch@cynops.de>',
module_name => 'KeyNanny',
license => 'apache', # TODO: add 'gpl' as dual-license
requires => {
'Log::Log4perl' => 0,
'IO::Socket::UNIX' => 0,
'Moose' => 0,
},
PL_files => {},
share_dir => {
dist => [ 'examples', 'util', ],
}
);

$build->create_build_script;
74 changes: 74 additions & 0 deletions MANIFEST.SKIP
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@

# Avoid version control files.
\bRCS\b
\bCVS\b
\bSCCS\b
,v$
\B\.svn\b
\B\.git\b
\B\.gitignore\b
\b_darcs\b
\B\.cvsignore$

# Avoid VMS specific MakeMaker generated files
\bDescrip.MMS$
\bDESCRIP.MMS$
\bdescrip.mms$

# Avoid Makemaker generated and utility files.
\bMANIFEST\.bak
\bMakefile$
\bblib/
\bMakeMaker-\d
\bpm_to_blib\.ts$
\bpm_to_blib$
\bblibdirs\.ts$ # 6.18 through 6.25 generated this

# Avoid Module::Build generated and utility files.
\bBuild$
\b_build/
\bBuild.bat$
\bBuild.COM$
\bBUILD.COM$
\bbuild.com$

# Avoid temp and backup files.
~$
\.old$
\#$
\b\.#
\.bak$
\.tmp$
\.#
\.rej$

# Avoid OS-specific files/dirs
# Mac OSX metadata
\B\.DS_Store
# Mac OSX SMB mount metadata files
\B\._

# Avoid Devel::Cover and Devel::CoverX::Covered files.
\bcover_db\b
\bcovered\b

# Avoid MYMETA files
^MYMETA\.

# Avoid configuration metadata file
^MYMETA\.

# Avoid Module::Build generated and utility files.
\bBuild$
\bBuild.bat$
\b_build
\bBuild.COM$
\bBUILD.COM$
\bbuild.com$
^MANIFEST\.SKIP

# Avoid archives of this distribution
\bKeyNanny-[\d\.\_]+

# Avoid other temporary files
\..*\.swp$
6 changes: 4 additions & 2 deletions bin/keynanny.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ sub get_ticket_id {
my ( $ticket_id, $ticket_file );

until ( $ticket_id && not -f $ticket_file ) {
$ticket_id = `openssl rand 48 | openssl sha1 | head -c 7`;
$ticket_id = `openssl rand 48 | openssl sha1`;
$ticket_id =~ s{^\(stdin\)=\s}{};
$ticket_id = substr($ticket_id, 0, 7);
$ticket_file = $config->{spooldir} . '/' . $ticket_id;
chomp $ticket_id;

Expand Down Expand Up @@ -165,7 +167,7 @@ else {
die "Error reading encrypted password: $!";
}

my $encrypted_password = join( '', <$fh> );
$encrypted_password = join( '', <$fh> );
close $fh;

my $success = 1;
Expand Down
2 changes: 2 additions & 0 deletions lib/KeyNanny.pm
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ use strict;
use warnings;
use English;

our $VERSION = 1.07;

use Carp;
use Data::Dumper;
use Log::Log4perl qw( :easy );
Expand Down