| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Matthias Koenig <mkoenig@suse.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
loop back mounting emits two system calls: mount and mlockall.
mount is obviously needed. mlockall is needed for encryption.
As the result both CAP_SYS_ADMIN and CAP_IPC_LOCK are needed
to do loopback mounting.
The problem is that CAP_IPC_LOCK is always needed through my
command doesn't need encryption.
With the following patch, mount calls mlockall only when
encryption is needed.
Signed-off-by: Masatake YAMATO <jet@gyve.org>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
| |
The mount(8) calls external mount programs (/sbin/mount.<type>)
without the loop=/dev/loopN option. This patch fix this bug.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Fix race in losetup
Retry acquiring a loop device if set_loop failed with EBUSY
Signed-Off-By: Matthias Koenig <mkoenig@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Fix race in mount -o loop
Retry acquiring a loop device if the setup failed with EBUSY.
Signed-Off-By: Matthias Koenig <mkoenig@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
| |
The current version of libvolume_id exports the encoding function for the
symlinks names, so slashes in labels and other chars, that don't really fit
into symlink names, will work as expected with LABEL=.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The losetup provides an -f option to discover an unused loop device. As
implemented, it is racy. The problem is that -f prints the loop device
to stdout only when used standalone. This means a script has to do:
lodev=$(losetup -f)
losetup $lodev $filename
which is racy if another script may be running.
This patch add a new option '-s'. The '-s' option prints device name
if the -f option and a file argument are present. For example:
lodev=$(losetup -f -s $filename)
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch scrubs anything related to SWAPON_NEEDS_TWO_ARGS as this is only
relevant for < linux-1.3.2 and i say it's about time we let it go.
I also cleaned up the system call fallback logic as the _syscall#() macros are
the deprecated interface in favor of the real syscall() function.
The asm/page.h gets the boot as nothing in swapon.c utilizes defines from it
while unistd.h gets always included as defines/functions are used from it other
than just swapon().
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch improves a way how the mount works with SPECes (devname,
LABEL or UUID) and nodes (mountpoints) from command line.
The patch adds support for mixed usage of SPECes -- it means on
command line is different SPEC than in the /etc/fstab file. For
example:
command line:
mount LABEL=foo
fstab:
UID=915b048a-998d-4ee5-9e6b-7fcaaf34d3c5 /mnt/foo auto default
The mount command doesn't strictly require same SPEC on command line
and in fstab anymore. You can be more creative and mix UUID, LABEL
or device name.
This implementation is more effective that convert *all* entries from
/etc/fstab to a real devnames.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
| |
The getfs_by_dir() and getfs_by_devname() have to be able to work
with canonicalized and also with non-canonicalized paths.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The patch:
commit 61d9d2ff1cb0e28e2b88099bbc5b919fa5004fce
Date: Wed Dec 27 23:35:56 2006 +0100
added debug mode to the mount command. It was mistake. It's better to
use old verbose mode instead a new debug mode. This patch transform
all staff from debug mode to to verbose mode.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
| |
The mount blindly uses a SPEC from command line and tries to found the
SPEC in /etc/fstab. It's better to parse the SPEC and search by UUID,
LABEL or devname only.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
| |
Signed-off-by: Stepan Kasal <skasal@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
| |
Signed-off-by: Matthias Koenig <mkoenig@suse.de>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
| |
The functions have to check for NULL pointer.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
| |
The blkid_get_cache() parses /etc/blkid.tab, it's better do it only
when we really need to resolve a spec (label or uuid).
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The blkid supports NAME=value parsing, but use the library for
this simple task is overkill. (The libblkid requires initialized
blkid cache all time, for all calls.)
This patch makes the fsprobe_get_devname_for_mounting() and
fsprobe_get_devname() generic for all fsprobe implementations.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
| |
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
| |
This patch removes old FS detection code and enables
blkid code only when HAVE_BLKID is defined.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
| |
It's not used.
Signed-off-by: Stepan Kasal <skasal@redhat.com>
|
|
|
|
|
|
|
| |
Do not use header swapargs.h, generated by script swap.configure;
use the standard AC_DEFINE method in configure.ac.
Signed-off-by: Stepan Kasal <skasal@redhat.com>
|
|
|
|
|
|
|
| |
Preprocessor options belong to *_CPPFLAGS; add $(AM_CPPFLAGS) as we
want to amend it, not override.
Signed-off-by: Stepan Kasal <skasal@redhat.com>
|
|
|
|
|
|
| |
Replace two immerced #ifdef's by an #if with a compound conditional.
Signed-off-by: Stepan Kasal <skasal@redhat.com>
|
|
|
|
|
|
| |
Style change: init the *_LDADD vars, then amend them with +=.
Signed-off-by: Stepan Kasal <skasal@redhat.com>
|
|
|
|
|
|
|
| |
Build lib/*.c individually for each project which uses it, so that the
right set of flags is applied each time.
Signed-off-by: Stepan Kasal <skasal@redhat.com>
|
|
|
|
|
|
|
| |
Major part of mount_SOURCES and umount_SOURCES is the same; factor it
out to a new make variable.
Signed-off-by: Stepan Kasal <skasal@redhat.com>
|
|
|
|
|
|
|
| |
Programs which are usually installed with the setuid bit do need their own
CFLAGS and LDFLAGS. SUID_LDFLAGS is analogic to SUID_CFLAGS.
Signed-off-by: Stepan Kasal <skasal@redhat.com>
|
|
|
|
|
|
|
| |
SUID_CFLAGS are not meant to override the makefile-wide AM_CFLAGS.
(We do not use AM_CFLAGS currently, but we will.)
Signed-off-by: Stepan Kasal <skasal@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Use /sbin/{u,}mount.nfs{,4} from nfs-utils! The mount command
will use these to mount nfs filesystems instead of internal code.
The /sbin/{u,}mount.nfs{,4} is supported from nfs-utils-1.1.0
(currently -rc1).
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Everywhere in code is
s = xstrconcat3(s, t, u);
that's nonsense use malloc(new_s); free(s); return new_s;
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The parse_opt() routine uses fixed size of string for mount options.
This is useless for future selinux options where is not well defined
size of selinux context name.
The patch also makes code more readable and all option-string
operations share same code.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If mtab does not contain the new entry, then only mc0->prev is updated
to point to absent, but not the old mc0->prev's nxt pointer. Because
we then use the nxt pointers to write the new mtab, absent is not
added to the new mtab.
(Note: fortunately, the mount doesn't use the update_mtab() for new
mounts, but for remount, move and umount only -- kzak)
If mtab is empty, absent->prev should be set to mc0, and not
mc0->prev, as it will be NULL.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The update_mtab deallocates memory which was allocated by caller. It's nice
opportunity for double-free errors.
The patch fix a memory leak if we have to abort before mc0 are freed. The
patch also fix a memory leak when we deallocate old (umounted) entry.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
| |
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
|