Subject: | patch to make it taint safe and add lock/unlock methods |
Hello,
We use this in taint mode and also have funtions that use lock and unlcok methods of a given
"file" which of course renders it unusable.
The attached patch adds base lock() and unlock() methods and makes it taint safe.
Please consider adding it, thanks!
Subject: | lock_unlock_taintsafe.patch |
--- Plain.pm 2006-11-14 10:11:54.000000000 -0600
+++ Plain.pm.new 2006-11-14 10:14:36.000000000 -0600
@@ -222,6 +222,40 @@
=pod
+=head2 lock($mode,$file)
+
+lock's a file.
+
+=cut
+
+sub lock {
+ my ($self, $fn) = @_;
+ $fn = $self->_path_from_root($fn);
+
+ warn 'lock not implemented';
+
+ return 1;
+}
+
+=pod
+
+=head2 unlock($mode,$file)
+
+unlock's a file.
+
+=cut
+
+sub unlock {
+ my ($self, $fn) = @_;
+ $fn = $self->_path_from_root($fn);
+
+ warn 'unlock not implemented';
+
+ return 1;
+}
+
+=pod
+
=head2 modtime($file)
Gets the modification time of a file in YYYYMMDDHHMMSS format.
@@ -635,6 +669,9 @@
$path_out = (substr($path_out, 0, 1) eq '/') ? $path_out : '/'.$path_out;
+ $path_out =~ /(.*)/;
+ $path_out = $1;
+
return $path_out;
}