summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2006-03-03 12:55:15 +0000
committerPascal Rigaux <pixel@mandriva.com>2006-03-03 12:55:15 +0000
commit5e3d9f765da35bd88f5663f18292b260d50b90cc (patch)
tree2c09c13b644273bc3327464c58c6ada4ff4eb759
parentfa5b227ea6baafd4076d89e415a130a58b920f98 (diff)
downloaddrakx-5e3d9f765da35bd88f5663f18292b260d50b90cc.tar
drakx-5e3d9f765da35bd88f5663f18292b260d50b90cc.tar.gz
drakx-5e3d9f765da35bd88f5663f18292b260d50b90cc.tar.bz2
drakx-5e3d9f765da35bd88f5663f18292b260d50b90cc.tar.xz
drakx-5e3d9f765da35bd88f5663f18292b260d50b90cc.zip
use lchown instead of chown (otherwise pbs on broken symlinks)
-rw-r--r--perl-install/commands.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/perl-install/commands.pm b/perl-install/commands.pm
index 6719151f1..c57468cb0 100644
--- a/perl-install/commands.pm
+++ b/perl-install/commands.pm
@@ -127,10 +127,11 @@ sub chown_ {
my ($name, $group) = (split('\.'), $_);
my ($uid, $gid) = (getpwnam($name) || $name, getgrnam($group) || $group);
-
+
+ require POSIX;
my $chown; $chown = sub {
foreach (@_) {
- chown $uid, $gid, $_ or die "chown of file $_ failed: $!\n";
+ POSIX::lchown($uid, $gid, $_) or die "chown of file $_ failed: $!\n";
-d $_ && $rec and &$chown(glob_($_));
}
};