Bug#642527: libquota-perl: Quota::getqcarg() fails to detect root device if /etc/mtab is symlinked to /proc/self/mounts

Paul Hink paul.hink at hostsharing.net
Fri Sep 23 13:16:00 UTC 2011


Package: libquota-perl
Version: 1.6.4+dfsg-1
Severity: important


If /etc/mtab is not a normal file but a symlink to /proc/self/mounts,
Quota::getqcarg() fails to detect the correct root device. It takes the
first entry matching "/" which is "rootfs" instead of the device
containing the "real" root partition:

| $ ls -la /etc/mtab
| lrwxrwxrwx 1 root root 17 Sep 17 14:57 /etc/mtab -> /proc/self/mounts
| $ grep ' / ' /etc/mtab
| rootfs / rootfs rw 0 0
| /dev/vda1 / xfs rw,relatime,attr2,nobarrier,logbufs=8,logbsize=256k,usrquota,grpquota 0 0
| $ perl -e 'use Quota; print Quota::getqcarg("/") . "\n";'
| rootfs
| $

The man page explicitly recommends to use the value returned by
Quota::getqcarg() as the $dev argument for Quota::query() and/or
Quota::setqlim(). This, in turn, makes query() and setqlim() fail for
the root filesystem.

-- System Information:
Debian Release: 6.0.2
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: i386 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/6 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash

Versions of packages libquota-perl depends on:
ii  libc6                  2.11.2-10         Embedded GNU C Library: Shared lib
ii  perl                   5.10.1-17squeeze2 Larry Wall's Practical Extraction 
ii  perl-base [perlapi-5.1 5.10.1-17squeeze2 minimal Perl system

libquota-perl recommends no packages.

libquota-perl suggests no packages.

-- no debconf information





More information about the pkg-perl-maintainers mailing list