summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-10-11 05:44:32 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-10-11 05:44:32 +0000
commit26238ee0048c0e00c2bb5b1cf707baacc59181f5 (patch)
tree627a3005d0babce9cf123c7a1c97a68dbee83833 /urpm.pm
parentc82e8443e4f1ba715a14297cbd141467d6c1dd92 (diff)
downloadurpmi-26238ee0048c0e00c2bb5b1cf707baacc59181f5.tar
urpmi-26238ee0048c0e00c2bb5b1cf707baacc59181f5.tar.gz
urpmi-26238ee0048c0e00c2bb5b1cf707baacc59181f5.tar.bz2
urpmi-26238ee0048c0e00c2bb5b1cf707baacc59181f5.tar.xz
urpmi-26238ee0048c0e00c2bb5b1cf707baacc59181f5.zip
Files copied by urpm should belong to root if possible
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/urpm.pm b/urpm.pm
index beb56b00..6701e5a1 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -686,6 +686,7 @@ sub add_distrib_media {
system("cp", "-p", "-R", $hdlists_file, "$urpm->{cachedir}/partial/hdlists")
? do { $urpm->{error}(N("...copying failed")); return }
: $urpm->{log}(N("...copying done"));
+ chown 0, 0, "$urpm->{cachedir}/partial/hdlists";
} else {
$urpm->{error}(N("unable to access first installation medium (no hdlists file found)")), return;
}
@@ -1070,6 +1071,7 @@ this could happen if you mounted manually the directory when creating the medium
"$urpm->{statedir}/descriptions.$medium->{name}")
? do { $urpm->{error}(N("...copying failed")); $medium->{ignore} = 1 }
: $urpm->{log}(N("...copying done"));
+ chown 0, 0, "$urpm->{statedir}/descriptions.$medium->{name}";
}
#- examine if a distant MD5SUM file is available.
@@ -1163,6 +1165,7 @@ this could happen if you mounted manually the directory when creating the medium
} else {
$options{callback} && $options{callback}('done', $medium->{name});
$urpm->{log}(N("...copying done"));
+ chown 0, 0, "$urpm->{cachedir}/partial/$medium->{hdlist}";
}
}
@@ -1223,6 +1226,7 @@ this could happen if you mounted manually the directory when creating the medium
if (-e $path_list) {
system("cp", "-p", "-R", $path_list, "$urpm->{cachedir}/partial/list")
and do { $urpm->{error}(N("...copying failed")); $error = 1 };
+ chown 0, 0, "$urpm->{cachedir}/partial/list";
}
}
} else {
@@ -1280,6 +1284,7 @@ this could happen if you mounted manually the directory when creating the medium
-e $path_pubkey
and system("cp", "-p", "-R", $path_pubkey, "$urpm->{cachedir}/partial/pubkey")
and do { $urpm->{error}(N("...copying failed")); $error = 1 };
+ chown 0, 0, "$urpm->{cachedir}/partial/pubkey";
}
} else {
#- check for a reconfig.urpmi file (if not already reconfigured)
@@ -1479,6 +1484,7 @@ this could happen if you mounted manually the directory when creating the medium
"$urpm->{cachedir}/partial/$basename")
and $urpm->{error}(N("...copying failed")), $error = 1;
}
+ chown 0, 0, "$urpm->{cachedir}/partial/$basename";
}
eval {
$urpm->{sync}(