| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Reported-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
|
|
|
|
|
|
|
|
|
| |
append_context reallocates memory, invalidating extra_opts1. As a
result my_free(extra_opts1) crashes.
Signed-off-by: Kirill Elagin <kirelagin@gmail.com>
Signed-off-by: Nikita Ofitserov <himikof@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
| |
From: Nicolas Francois <nicolas.francois@centraliens.net>
Addresses: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=530681#15
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
|
|
|
|
|
|
| |
Reported-by: Micah Anderson <micah@debian.org>
Addresses: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=558653
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
|
|
|
|
|
|
| |
Reported-by: Reuben Thomas <rrt@sc3d.org>
Addresses: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=603096
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
|
|
|
|
|
|
| |
Reported-by: Lars Wirzenius <liw@liw.fi>
Addresses: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=605007
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
|
|
|
|
|
|
| |
Reported-by: Francis Russell <francis+dbts@unchartedbackwaters.co.uk>
Addresses: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=599550
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
|
|
|
|
|
|
|
| |
Addresses: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508572
Addresses: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=572403
Addresses: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508412
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since util-linux commit f4612577c942a3683b97632ad0b49671897c2070,
umount stat(2)s its argument to check whether it can be associated
with some loop device. This could hang with broken NFS mounts.
Fix by first checking mtab if umount's argument is mounted and only if
we fail, check if there is a loop device associated.
http://marc.info/?l=util-linux-ng&m=130924963804836&w=2
Reported-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
# mount <device|dir>
The current code looks for a device and then for a mountpoint in
/etc/fstab. This is not user friendly solution. People usually use
# mount /dir
to mount any filesystem. It makes more sense to check for mountpoint
and if not found then for device.
This is also important for bind mounts, for example if you have in
your fstab:
/dev/sda1 /mnt/foo auto defaults
/mnt/foo /mnt/bar none bind
then
# mount /mnt/foo
should be interpreted as the first entry and /dev/sda1 should be
mounted.
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=716483
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
| |
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=691338
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Bh and nobh mount option has been deprecated in ext4
(206f7ab4f49a2021fcb8687f25395be77711ddee) and in ext3
(4c4d3901225518ed1a4c938ba15ba09842a00770)
so remove those options from documentation.
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
|
|
|
|
|
| |
Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=709681
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
| |
It's pretty tricky to detect that a bind mount from fstab is already
mounted on system without /etc/mtab. Let's use functionality from
libmount.
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=701176
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
# echo 'tmpd /tmp/x tmpfs' >> /etc/fstab
# mkdir /tmp/x
# mount -a
segfault
Reported-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
| |
getopt.c:80:13: warning: ‘set_initial_shell’ declared ‘static’ but
never defined
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
| |
The mnt_update_table() is able to create a mtab lock now.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
CVE-2011-1677)
http://thread.gmane.org/gmane.comp.security.oss.general/4374
Based on CVE-2011-1089.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
http://thread.gmane.org/gmane.comp.security.oss.general/4374
Changes:
- force mount(8) to use /etc/mtab.tmp file every time. The original
code used the tmp file for remount/move operations only.
- call and check fflush() return code for the tmp file
Note mount(8) blocks all signals when writing to mtab, so it's not
affected by SIGXFSZ and the mtab lock file is always removed.
This patch does not fix the same issue in umount(8) and libmount.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
| |
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=694648
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
| |
Addresses: https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/755193
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
| |
The UMOUNT_NOFOLLOW umount2() flag is supported since kernel 2.6.34.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
This reverts commit c56226697342ddd663492f77768e7a7cb8e579a1.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Originally the "uhelper=" was ignored for root, now the umount command
calls /sbin/umount.<uhelper> always.
This change is necessary for things like pam_mount where a device has
to be uninitialized by uhelper rather than directly umounted by
umount(2).
Note that all uhelpers has to be linked with libmount or execute
umount -fake -i /mountpoint
to remove mountpoint entry from /etc/mtab or /dev/.mount/utab.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
The quiet mount option was in collision with vfat and hfs mount
options. The option was also undocumented -- so it's probably safe to
rename the option than add some ugly hacks or exceptions for vfat/hfs
to the mount(8) code.
Reported-by: https://bugzilla.redhat.com/show_bug.cgi?id=622089
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
|
|
|
|
|
| |
Reported-by: silvan minghetti <bu1137@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
| |
Addresses: https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/726283
Reported-by: Greg Brockman <gdb@gregbrockman.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
| |
It does not make sense to have writable large arrays of "struct
option" on the stack.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make it possible to unmount a filesystem on a loop device if it is
specified by associated backing file. It does not attempt to unmount
anything if there are more than one loop device associated with the
given file.
Umount looks for associated loopdevice(s) only if umount is called
with the regular file as an argument.
Before:
mount -o loop -t ext2 img mnt
umount -v img
> Could not find /home/puzel/upstream/util-linux/img in mtab
> umount: img: not mounted
After:
mount -o loop -t ext2 img mnt
umount -v img
> img is associated with /dev/loop0, trying to unmount it
> /dev/loop0 has been unmounted
[kzak@redhat.com: - fix memory leak in lomount.c]
Addresses: https://bugzilla.novell.com/show_bug.cgi?id=666161
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
|
|
|
|
|
|
|
|
| |
Solaris lacks err, errx, warn and warnx. This also means the err.h header
doesn't exist. Removed err.h include from all files, and included err.h from
c.h instead if it exists, otherwise alternatives are provided.
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
| |
Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=476964
Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=676100
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
mount does not parse parse offset= option if it is followed by other
options. In umount, the parsing is done with the get_value() function.
This patch moves get_value to fstab.c (with new name get_option_value())
and fixes mount to use the function.
[kzak@redhat.com: - rename to get_option_value()
- use fstab.c rather than sundries.c]
Novell bugzilla: #666150
Reported-by: Ludwig Nussel <ludwig.nussel@suse.de>
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
| |
Also constify the option array.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
|
|
|
|
|
| |
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=665376
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
| |
- replace mnt_ with libmnt_ prefix for types (the old prefix was too generic)
- remove typedef, use struct everywhere
- use shorter functions names (s/userspace/user/; s/mountflags/mflags/)
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
| |
The mount.h file name is too generic.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
| |
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=651035
Signed-off-by: Karel Zak <kzak@redhat.com>
|
| |
|
|
|
|
|
| |
Reported-by: silvan minghetti <bu1137@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|