>>>>> "BF" == Bryan Fullerton <bryanf@samurai.com> writes:
BF> I'm thinking that might not be good - the install should really sub in
BF> my webserver's name up there. :)
You should probably set the confirm_url variable appropriately. Eventually
Makefile.PL will ask you questions about it in order to build an
appropriate URL. (Probably some understandable version of "What is the URL
for your cgi-bin directory?") Note also that the confirm thing isn't going
to work well with multiple domains right now; you can pass the domain in
the URL but that makes it pretty long. I wonder if I can extract the
domain from the CGI environment. (I don't do much CGI stuff myself, so I'm
a bit lost here. mj_confirm needs to be rewritten by someone who knows
what they're doing anyway.)
BF> o) mj_confirm installed into my web server's cgi-bin directory, but it
BF> was mode 0644 (ie, not executable and not setuid), so I get an error.
Annoyingly File::Copy->cp doesn't preserve permissions. Try this patch:
--- postinstall 1998/04/29 04:37:07 1.9
+++ postinstall 1998/04/29 18:31:14
@@ -98,15 +98,13 @@
Install response files?
EOM
+set_script_perms(\@sidscripts, \@scripts);
+
if ($config->{cgi_bin}) {
copy_file('mj_confirm', "$config->{install_dir}/bin",
$config->{cgi_bin}, $config->{cgi_link});
}
-set_script_perms(\@sidscripts, \@scripts, ($config->{cgi_bin} &&
- !$config->{cgi_link} &&
- "$config->{cgi_bin}/mj_confirm"));
-
# Create list directories and such
if (get_bool($msg1)) {
create_dirs($config->{'lists_dir'},
@@ -157,7 +155,8 @@
exit;
-# Copies or links a file from one directory to another.
+# Copies or links a file from one directory to another, preserving
+# ownership and permissions.
sub copy_file {
my $script = shift;
my $source = shift;
@@ -167,9 +166,14 @@
if ($link) {
link "$source/$script", "$dest/$script" ||
die "Can't make link in $dest, $!.";
+ }
+ else {
+ cp("$source/$script", "$dest/$script") ||
+ die "Can't copy $source/$script to $dest/$script, $!.";
+ # Set the owner and mode on the copied file
+ chown((stat("$source/$script"))[4,5], "$dest/$script");
+ chmod((stat(_))[2], "$dest/$script");
}
- cp("$source/$script", "$dest/$script") ||
- die "Can't copy $source/$script to $dest/$script, $!.";
}
sub set_script_perms {
BF> o) When finally selecting Accept and clicking "Click here to process",
BF> I get the following message in my browser:
[Warnings from MIME::Entity]
Looks like you didn't apply MIME-tools.patch. You'll get three warnings
from MIME::Entity per generated message if you don't. I haven't been able
to raise Eryq about fixing this bug yet; eventually, though, he should cut
another MIME-tools release. The warnings are not fatal.
- J<
Follow-Ups:
References:
|
|