diff options
author | Karel Zak | 2011-04-13 10:49:26 +0200 |
---|---|---|
committer | Karel Zak | 2011-04-13 10:49:26 +0200 |
commit | 47a226b7e59ba8fc56603a20eec19ab69c9ccc4e (patch) | |
tree | b2af36ba4966b5e9ae666738f9a7127e8af9558d /mount/umount.c | |
parent | umount: block signals when umounting and updating mtab (CVE-2011-1676, CVE-20... (diff) | |
download | kernel-qcow2-util-linux-47a226b7e59ba8fc56603a20eec19ab69c9ccc4e.tar.gz kernel-qcow2-util-linux-47a226b7e59ba8fc56603a20eec19ab69c9ccc4e.tar.xz kernel-qcow2-util-linux-47a226b7e59ba8fc56603a20eec19ab69c9ccc4e.zip |
mount: use lock from mnt_update_table()
The mnt_update_table() is able to create a mtab lock now.
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'mount/umount.c')
-rw-r--r-- | mount/umount.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/mount/umount.c b/mount/umount.c index c87af6b2c..0349cb3fc 100644 --- a/mount/umount.c +++ b/mount/umount.c @@ -417,12 +417,9 @@ umount_one (const char *spec, const char *node, const char *type, #ifdef HAVE_LIBMOUNT_MOUNT struct libmnt_update *upd = mnt_new_update(); - if (upd && !mnt_update_set_fs(upd, 0, node, NULL)) { - struct libmnt_lock *lc = init_libmount_lock( - mnt_update_get_filename(upd)); - mnt_update_table(upd, lc); - init_libmount_lock(NULL); - } + if (upd && !mnt_update_set_fs(upd, 0, node, NULL)) + mnt_update_table(upd, NULL); + mnt_free_update(upd); #else update_mtab (node, NULL); |