summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rw-r--r--urpm/sys.pm9
2 files changed, 8 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 85ad0ef0..69fa8f33 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,4 @@
+- use /proc/self/mountinfo for ro filesystem checks mga#11319
- polkit: only use pkexec when not already root
Version 7.28 - 5 November 2013
diff --git a/urpm/sys.pm b/urpm/sys.pm
index bfe0e719..3b9eee49 100644
--- a/urpm/sys.pm
+++ b/urpm/sys.pm
@@ -162,6 +162,11 @@ sub proc_mounts() {
@l;
}
+sub proc_self_mountinfo() {
+ my @l = cat_('/proc/self/mountinfo') or warn "Can't read /proc/self/mountinfo: $!\n";
+ @l;
+}
+
sub trim_until_d {
my ($dir) = @_;
foreach (proc_mounts()) {
@@ -179,8 +184,8 @@ Checks if the main filesystems are writable for urpmi to install files in
=cut
sub check_fs_writable () {
- foreach (proc_mounts()) {
- (undef, our $mountpoint, undef, my $opts) = split ' ';
+ foreach (proc_self_mountinfo()) {
+ (undef, undef, undef, undef, our $mountpoint, my $opts) = split ' ';
if ($opts =~ /(?:^|,)ro(?:,|$)/ && $mountpoint =~ m!^(/|/usr|/s?bin)\z!) {
return 0;
}