summaryrefslogtreecommitdiffstats
path: root/libmount/src/context_mount.c
Commit message (Collapse)AuthorAgeFilesLines
...
* libmount: correctly interpret '*' from /etc/filesystemsKarel Zak2012-11-261-1/+2
| | | | | | | | | | | - single line with '*' in /etc/filesystems means that libmount has to read /proc/filesystems, otherwise /proc/filesystems has to be ignored - mount(2) ENODEV is no reason to break the do_mount_by_pattern() loop when trying to mount by /{etc,proc}/filesystems Reported-by: NeilBrown <neilb@suse.de> Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: fix support of comma-separated fs types listsGleb Fotengauer-Malinovskiy2012-11-161-3/+7
| | | | | | | | | | | | | | | | # grep cdrom /etc/fstab /dev/sr0 /media/cdrom udf,iso9660 ro,noauto,user,utf8 0 0 # mount /media/cdrom mount: unknown filesystem type 'udf,iso9660' # mount -t udf,iso9660 /dev/sr0 /media/cdrom mount: /dev/sr0 is write-protected, mounting read-only [kzak@redhat.com: - add some comments - don't try to found external helpers for the types] Signed-off-by: Gleb Fotengauer-Malinovskiy <glebfm@altlinux.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* textual: typo fixesGilles Espinasse2012-10-021-1/+1
| | | | Signed-off-by: Gilles Espinasse <g.esp@free.fr>
* libmount: don't remove user= when executed by rootKarel Zak2012-09-121-8/+4Star
| | | | | | | | | | | | | | The original mount(8) allows to store arbitrary user= option to mtab file if called by root user. For example: # mount -f foo /bar -t xxx -o rw,user=kzak the new mount removes the 'user=' and 'users' options at all for root user. This is regression. The original functionality is necessary by 'sshfs' where fuse writes to mtab file by mount(8). Reported-by: Juergen Daubert <jue@jue.li> (and 'horrorStruck' on IRC) Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: segfaults if neither /etc/filesystems nor/proc/filesystems existsKarel Zak2012-09-121-0/+3
| | | | | Reported-by: Juergen Daubert <jue@jue.li> Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: deduplicate SELinux mount optionsKarel Zak2012-08-011-0/+9
| | | | | | | | | | We already have a clue about SELinux specific mount options in libmount, so it makes sense to deduplicate the options as Linux kernel does not support duplicate SELinux options. (SELinux kernel stuff somehow ignores standard Linux mount conventions...) Requested-by: Niels de Vos <ndevos@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: fix trivial typosPetr Uzel2012-06-151-2/+2
| | | | Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
* libmount: plug a memory leak in exec_helper()Petr Uzel2012-06-151-0/+1
| | | | | | | | | | | | | | | valgrind --leak-check=full ./sys-utils/mount -t cifs //127.0.0.1/users /mnt/smb -o user=root,password=linux .... ==21359== 28 bytes in 1 blocks are definitely lost in loss record 1 of 1 ==21359== at 0x4C298B2: realloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==21359== by 0x415780: __mnt_optstr_append_option (optstr.c:188) ==21359== by 0x415CB5: mnt_optstr_set_option (optstr.c:387) ==21359== by 0x40D778: do_mount (context_mount.c:192) ==21359== by 0x40E6A9: mnt_context_do_mount (context_mount.c:685) ==21359== by 0x40EB7B: mnt_context_mount (context_mount.c:786) ==21359== by 0x4058B0: main (mount.c:918) Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
* libmount: don't use nosuid,noexec,nodev for cifs user=fooKarel Zak2012-06-141-2/+27
| | | | | | | | | | | | | | | | mount -t cifs //127.0.0.1/users /mnt/smb -o user=root,password=linux is incorrectly translated to mount.cifs -o noexec,nosuid,nodev,user=root,password=linux ... The command mount(8) should be sensitive to "user" (without "=<name>") only. The correct cifs command line is: mount.cifs -o user=root,password=linux Addresses: https://bugzilla.novell.com/show_bug.cgi?id=766157 Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: don't generate empty option stringsKarel Zak2012-06-141-0/+11
| | | | | | | | | | | | mount -t foo something /mnt/test -o user=root,password=linux generates "rw,noexec,nosuid,nodev,password=linux,,user=root" options string for /sbin/mount.foo, the ",," is incorrect. Signed-off-by: Karel Zak <kzak@redhat.com>
* Fix typos in comments and wall's man pageBernhard Voelker2012-06-051-1/+1
| | | | | | | | | | | Culprits identified again by (newer) misspellings: $ git ls-files | misspellings -f - | grep -v '^po/' * wall: Fix typo in man page. * Fix typos in source code comments. Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
* libmount: add MNT_ERR_MOUNTOPTKarel Zak2012-05-281-0/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: fix mount by patternKarel Zak2012-04-241-1/+4
| | | | | | | | | | | mount /foo /bar without entry in /etc/fstab the mount command tries all filesystems from /{etc,proc}/filesystems. We should NOT call mount(2) more then once if the syscall returns for example ENOENT, acceptable is only EINVAL. Signed-off-by: Karel Zak <kzak@redhat.com>
* Fix typos found by misspellingsBernhard Voelker2012-04-231-2/+2
| | | | | | | | | | | | | | | The tool misspellings (https://github.com/lyda/misspell-check) detected several typos. Command used: $ git ls-files | grep -v ^po/ | misspellings -f - * isosize: Fix typo in usage string. * configure.ac: Fix typo in help string of --enable-most-builds option. * fdisk: Fix typo in man page. * libblkid, blkid, mount: Likewise. * Fix various typos in docs and in source code comments. Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
* mount: fix recursively propagation mountingDong Hao2012-03-211-2/+3
| | | | | | | | | | | Provide the recursive flag of propagation mounting. Recursive flag could be used together with propagation flag. [kzak@redhat.com: - add MS_SILENT to acceptable propagation flags, - fix new code in libmount too] Signed-off-by: Karel Zak <kzak@redhat.com> Signed-off-by: Dong Hao <haodong@linux.vnet.ibm.com>
* libmount: cleanup flags usageKarel Zak2012-03-071-5/+5
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: cosmetic changes around "none"Karel Zak2012-03-021-2/+5
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: allow empty source for mount(2) syscallKarel Zak2012-02-281-1/+3
| | | | | Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=797438 Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: use mount.<type> -s for NFS onlyKarel Zak2012-02-271-1/+6
| | | | | | | Unfortunately, it seems that for example mount.cifs don't care about the API, so we need exception like the original mount(8). Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: cleanup docsKarel Zak2012-02-221-2/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: use #ifdef fr selinux specific variablesKarel Zak2012-02-031-2/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: remove dead assigmentKarel Zak2012-02-021-1/+0Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: don't pass comments=/x-* to mount.<type> helpersKarel Zak2012-01-251-4/+28
| | | | | | | This patch add a new flag MNT_NOHLPS for mount options map, options with this flag will not be passed to /sbin/mount.<type> helpers. Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: fix bugs detected by [smatch scan]Karel Zak2012-01-171-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add post-mount checks to detect ro/rwKarel Zak2012-01-161-6/+34
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: allow to toggle ro/rw and mount againKarel Zak2012-01-131-1/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: allow to use UUID and LABEL for owner/group mount options in fstabKarel Zak2012-01-131-5/+19
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add functions to export syscall/helpers statusKarel Zak2012-01-131-0/+12
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: consolidate MNT_FS_* codeKarel Zak2012-01-021-3/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add support for mount -a --forkKarel Zak2011-12-021-5/+23
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: fix trivial typos in debugging outputPetr Uzel2011-11-091-2/+2
| | | | Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
* libmount: fix use of logical '&&' with constant operandFrancesco Cosoleto2011-09-271-1/+1
| | | | | | Found by clang. Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
* libmount: remove 'seclabel' on remount, improve for 2.6.39Karel Zak2011-07-251-7/+29
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: remove unnecessary includes, mask API as stableKarel Zak2011-07-251-9/+0Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: clean up docsKarel Zak2011-07-251-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: cleanup docsKarel Zak2011-07-231-6/+12
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add support for mount -aKarel Zak2011-06-231-1/+116
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: use top-level directory for libmount rather than shlibs/mountKarel Zak2011-06-091-0/+639
Signed-off-by: Karel Zak <kzak@redhat.com>