Permalink
Browse files

Add ML_CHOWN_GROUP config option

  • Loading branch information...
1 parent 79744cb commit bd4e1018f0e21a11d140d47d175b5182e3e0e5a1 @xdg xdg committed Aug 13, 2011
Showing with 6 additions and 5 deletions.
  1. +1 −0 lib/PAUSE.pm
  2. +5 −5 lib/PAUSE/mldistwatch.pm
View
1 lib/PAUSE.pm
@@ -79,6 +79,7 @@ $PAUSE::Config ||=
MIRRORCONFIG => '/usr/local/mirror/mymirror.config',
MLROOT => '/home/ftp/pub/PAUSE/authors/id/', # originally module list root
ML_CHOWN_USER => qq{UNSAFE},
+ ML_CHOWN_GROUP => qq{UNSAFE},
ML_MAILER => 'sendmail',
ML_MIN_INDEX_LINES => 1_000, # 02packages must be this long
ML_MIN_FILES => 20_000, # must be this many files to run mldistwatch
View
10 lib/PAUSE/mldistwatch.pm
@@ -2065,7 +2065,7 @@ Please contact modules\@perl.org if there are any open questions.
return if $self->{CHOWN_UNSAFE_DONE};
use File::Find;
my(undef,undef,$uid,$gid) = getpwnam($PAUSE::Config->{ML_CHOWN_USER});
- die "user UNSAFE not found, cannot continue" unless defined $uid;
+ die "user $PAUSE::Config->{ML_CHOWN_USER} not found, cannot continue" unless defined $uid;
find(sub {
chown $uid, $gid, $_;
},
@@ -2697,11 +2697,11 @@ Please contact modules\@perl.org if there are any open questions.
# warn ">>>>>>>>read v[$v]<<<<<<<<";
close $kid;
} else {
- my($gnam,$gpw,$gid,$gmem) = getgrnam("UNSAFE");
- die "Could not determine GID of UNSAFE" unless $gid;
+ my($gnam,$gpw,$gid,$gmem) = getgrnam($PAUSE::Config->{ML_CHOWN_GROUP});
+ die "Could not determine GID of $PAUSE::Config->{ML_CHOWN_GROUP}" unless $gid;
my($uname,$upw,$uid,$ugid,$q,$c,$gcos,$udir,$ushell) =
- getpwnam("UNSAFE");
- die "Could not determine UID of UNSAFE" unless $uid;
+ getpwnam($PAUSE::Config->{ML_CHOWN_USER});
+ die "Could not determine UID of $PAUSE::Config->{ML_CHOWN_USER}" unless $uid;
$( = $gid; $) = "$gid $gid";
$< = $> = $uid;

0 comments on commit bd4e101

Please sign in to comment.