summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--www/p5-Apache-Session/Makefile1
-rw-r--r--www/p5-Apache-Session/files/patch-Session::Lock::File.pm24
-rw-r--r--www/p5-Apache-Session/files/patch-Session::Store::File.pm71
3 files changed, 96 insertions, 0 deletions
diff --git a/www/p5-Apache-Session/Makefile b/www/p5-Apache-Session/Makefile
index 9f19cd754b49..fce8182480a5 100644
--- a/www/p5-Apache-Session/Makefile
+++ b/www/p5-Apache-Session/Makefile
@@ -7,6 +7,7 @@
PORTNAME= Apache-Session
PORTVERSION= 1.54
+PORTREVISION= 1
CATEGORIES= www perl5
MASTER_SITES= ${MASTER_SITE_PERL_CPAN}
MASTER_SITE_SUBDIR= Apache
diff --git a/www/p5-Apache-Session/files/patch-Session::Lock::File.pm b/www/p5-Apache-Session/files/patch-Session::Lock::File.pm
new file mode 100644
index 000000000000..aea3c01aad72
--- /dev/null
+++ b/www/p5-Apache-Session/files/patch-Session::Lock::File.pm
@@ -0,0 +1,24 @@
+--- Session/Lock/File.pm.orig Sat Sep 2 00:21:17 2000
++++ Session/Lock/File.pm Thu Dec 6 17:37:40 2001
+@@ -36,8 +36,9 @@
+
+ my $LockDirectory = $session->{args}->{LockDirectory} ||
+ $Apache::Session::Lock::File::LockDirectory;
++ my $LockFile = $LockDirectory."/Apache-Session-".$session->{data}->{_session_id}.".lock";
+
+- open($fh, "+>".$LockDirectory."/Apache-Session-".$session->{data}->{_session_id}.".lock") || die $!;
++ open($fh, "+> $LockFile") || die "$LockFile: $!";
+
+ $self->{fh} = $fh;
+ $self->{opened} = 1;
+@@ -58,8 +59,9 @@
+
+ my $LockDirectory = $session->{args}->{LockDirectory} ||
+ $Apache::Session::Lock::File::LockDirectory;
++ my $LockFile = $LockDirectory."/Apache-Session-".$session->{data}->{_session_id}.".lock";
+
+- open($fh, "+>".$LockDirectory."/Apache-Session-".$session->{data}->{_session_id}.".lock") || die $!;
++ open($fh, "+> $LockFile") || die "$LockFile: $!";
+
+ $self->{fh} = $fh;
+ $self->{opened} = 1;
diff --git a/www/p5-Apache-Session/files/patch-Session::Store::File.pm b/www/p5-Apache-Session/files/patch-Session::Store::File.pm
new file mode 100644
index 000000000000..27d0b3aa903d
--- /dev/null
+++ b/www/p5-Apache-Session/files/patch-Session::Store::File.pm
@@ -0,0 +1,71 @@
+--- Session/Store/File.pm.orig Mon Jul 24 05:44:52 2000
++++ Session/Store/File.pm Thu Dec 6 17:49:31 2001
+@@ -33,13 +33,14 @@
+ my $session = shift;
+
+ my $directory = $session->{args}->{Directory} || $Apache::Session::Store::File::Directory;
++ my $file = $directory.'/'.$session->{data}->{_session_id};
+
+- if (-e $directory.'/'.$session->{data}->{_session_id}) {
+- die "Object already exists in the data store";
++ if (-e $file) {
++ die "Object already exists in the data store: $file";
+ }
+
+- sysopen ($self->{fh}, $directory.'/'.$session->{data}->{_session_id}, O_RDWR|O_CREAT) ||
+- die "Could not open file: $!";
++ sysopen ($self->{fh}, $file, O_RDWR|O_CREAT) ||
++ die "Could not open $file: $!";
+
+ $self->{opened} = 1;
+
+@@ -51,10 +52,11 @@
+ my $session = shift;
+
+ my $directory = $session->{args}->{Directory} || $Apache::Session::Store::File::Directory;
++ my $file = $directory.'/'.$session->{data}->{_session_id};
+
+ if (!$self->{opened}) {
+- sysopen ($self->{fh}, $directory.'/'.$session->{data}->{_session_id}, O_RDWR|O_CREAT) ||
+- die "Could not open file: $!";
++ sysopen ($self->{fh}, $file, O_RDWR|O_CREAT) ||
++ die "Could not open $file: $!";
+
+ $self->{opened} = 1;
+ }
+@@ -69,11 +71,12 @@
+ my $session = shift;
+
+ my $directory = $session->{args}->{Directory} || $Apache::Session::Store::File::Directory;
++ my $file = $directory.'/'.$session->{data}->{_session_id};
+
+- if (-e $directory.'/'.$session->{data}->{_session_id}) {
++ if (-e $file) {
+ if (!$self->{opened}) {
+- sysopen ($self->{fh}, $directory.'/'.$session->{data}->{_session_id}, O_RDWR|O_CREAT) ||
+- die "Could not open file: $!";
++ sysopen ($self->{fh}, $file, O_RDWR|O_CREAT) ||
++ die "Could not open $file: $!";
+
+ $self->{opened} = 1;
+ }
+@@ -96,15 +99,16 @@
+ my $session = shift;
+
+ my $directory = $session->{args}->{Directory} || $Apache::Session::Store::File::Directory;
++ my $file = $directory.'/'.$session->{data}->{_session_id};
+
+ if ($self->{opened}) {
+ CORE::close $self->{fh};
+ $self->{opened} = 0;
+ }
+
+- if (-e $directory.'/'.$session->{data}->{_session_id}) {
+- unlink ($directory.'/'.$session->{data}->{_session_id}) ||
+- die "Could not remove file: $!";
++ if (-e $file) {
++ unlink ($file) ||
++ die "Could not remove $file: $!";
+ }
+ else {
+ die "Object does not exist in the data store";