Commit Graph

187 Commits

Author SHA1 Message Date
Maxim Konovalov
6e74fb9dff o Extend rev. 1.75 and restore an ability to specify a non-default
quota files location.

Submitted by:	Kostik Belousov
2006-05-10 14:40:40 +00:00
Giorgos Keramidas
3ae7ea6834 When there are no mount options, an implicit "rw" should be printed in
the output of ``mount -p''.

Approved by:	rodrigc
2006-03-03 02:46:15 +00:00
Craig Rodrigues
88e2c33564 If we specify: mount -u (update), without specifying an
additional -r (read-only) flag or or -w (read-write) flag,
then assume we want, mount -u -w.

When doing a mount update, this will implicitly pass a "noro" mount
option down to the VFS layer.
vfs_mergeopts() in vfs_mount.c will then remove the "ro" mount option
if it exists in the mount options for a mounted file system.
This means that "mount -u" works the same as "mount -u -w"
and will convert a read-only mount to read-write.
2006-02-25 05:09:47 +00:00
Craig Rodrigues
7c5347ae86 Update text to reflect that:
- mount(8) now calls the nmount(2) system call directly, not mount(2)
- specifying a filesystem type with -t will not automatically
  invoke an external /sbin/mount_XXXX program....this only happens for
  certain file system types.  For all other file system types, nmount(2)
  is called directly.
2006-02-25 00:47:53 +00:00
Pawel Jakub Dawidek
093a8c9e1b s/<space><tab>/<tab>/ 2006-01-24 15:26:36 +00:00
Pawel Jakub Dawidek
90742659d7 Resolve the mount point's path with realpath(2) before checking if file
system is mounted. This prevevents duplicated mounts.

The change I made against the original patch is to fall back to the given
path on realpath(2) failure instead of exiting with an error.

Submitted by:	Andreas Kohn <andreas@syndrom23.de>
PR:		bin/89782
MFC after:	3 days
2006-01-18 11:00:34 +00:00
Pav Lucistnik
09b03f4714 - Xref mount_reiserfs(8)
PR:		docs/90902
Submitted by:	Scott Robbins <scottro@nyc.rr.com>
MFC after:	3 days
2006-01-10 15:56:46 +00:00
Craig Rodrigues
cf9e56b04e For reiserfs, pass mount parameters directly to nmount() instead
of forking an external mount_reiserfs program.

Reviewed by:	dumbbell
2005-12-12 19:51:37 +00:00
Craig Rodrigues
f6db44904f Remove workaround for old GCC bugs.
Submitted by:	ru
2005-12-03 19:59:35 +00:00
Craig Rodrigues
748e259bc4 Simplify parsing of mount options by passing
"rw" option down to kernel, since vfs_donmount() can now parse it.
2005-12-03 01:57:58 +00:00
Craig Rodrigues
30cb180f7c Remove unsupported "dev" option from comments of mntopts.h.
Requested by:	jkoshy
2005-12-02 03:55:02 +00:00
Craig Rodrigues
2207c7648e Remove MNT_NODEV mount option. In RELENG_6, MNT_NODEV was a no-op.
The presence of MNT_NODEV was confusing the am-utils autoconf scripts.

PR:	conf/79715
2005-11-29 00:28:17 +00:00
Tai-hwa Liang
6973ce04c4 Fixing a regression introduced in rev1.72 by connecting cd9660 to the
external mounting program list as well; otherwise, entry like the following
in /etc/fstab wouldn't work:

	/dev/acd0	/mnt/cdrom	cd9660	ro,-C=big5	0	0

Reviewed by:	rodrigc
2005-11-24 17:35:05 +00:00
Ruslan Ermilov
8bec746911 Fix prototype. 2005-11-24 14:27:53 +00:00
Craig Rodrigues
7f2444598a Remove UFS-specific parts from mount(8).
For mounting UFS, all mount options are passed directly to nmount(),
without any UFS-specific logic.
2005-11-23 23:22:56 +00:00
Craig Rodrigues
35d6c7f50e Do not pass userquota and groupquota mount options to nmount().
These options are read from fstab by quotacheck(8), but are not
valid mount options that need to be passed down the the filesystem.

Noticed by:	maxim
2005-11-23 20:17:27 +00:00
Craig Rodrigues
b1e6b7123d For mounting a UFS filesystem, call nmount() directly, instead of having
special logic which called mount() in a separate mount_ufs() function.
2005-11-21 22:07:54 +00:00
Craig Rodrigues
d9fa6ce711 Do not pass noauto to nmount() or external mount program.
Noticed by:	maxim
2005-11-16 02:13:27 +00:00
Craig Rodrigues
9fce8c898e In build_iovec(), if passed in len is -1, check to see if
val is NULL before doing strlen() to calculate new len.

Submitted by:	maxim
2005-11-14 17:39:00 +00:00
Craig Rodrigues
b19e74ca20 - Make size parameter to build_iovec() a size_t, not an int
- Add build_iovec_argf() helper function, for help converting old
  mount options which used the mount_argf() function for the mount() syscall.

Discussed with:	phk
2005-11-13 01:27:57 +00:00
Craig Rodrigues
6f5f1a6b3e - Minor fixes to raise WARNS level to 6.
- Teach the mount program to call the nmount() syscall directly
- Preserve existing method of calling mount() for UFS, until we clean things
  up.
- Preserve existing method of forking and calling external mount programs for
  mfs, msdosfs, nfs, nfs4, ntfs, nwfs, nullfs, portalfs, reiserfs, smbfs,
  udf, umapfs, unionfs
- devfs, linprocfs, procfs, ext2fs call nmount() syscall directly, since
  that is all those external mount programs were doing

Reviewed by:	phk
Discussed on:	arch
2005-11-12 20:12:56 +00:00
Craig Rodrigues
066b4c1658 Switch from K&R-style C prototypes to ISO/ANSI-style C prototypes. 2005-10-07 06:39:08 +00:00
Craig Rodrigues
429cd02cab Bump WARNS up to 3. 2005-10-07 02:22:48 +00:00
Craig Rodrigues
aedf10aca9 In prmount(), use an unsigned int variable to eliminate
'comparison between signed and unsigned' compiler warning.
2005-10-07 02:22:04 +00:00
Craig Rodrigues
e24dc56a22 Switch from K&R-style C prototypes to ISO/ANSI-style C prototypes.
Make prototype in extern.h match prototype in mount_ufs.c
2005-10-07 02:18:20 +00:00
Christian Brueffer
e16a2150d3 Remove Xref to mount_hpfs(8), it's not hooked up to the build.
Approved by:	re (blanket)
MFC after:	3 days
2005-06-16 21:35:33 +00:00
Xin LI
46b7a14ba4 Use MOPT_END in favor of MOPT_NULL, which better describes the purporse
of the macro.
2005-06-10 09:51:43 +00:00
Xin LI
73ac45052f Add a handy macro to represent null mount option, MOPT_NULL, and make
use of the macro in sbin/mount*'s, by replacing:

	mopts[] = {
	    MOPT_STDOPTS,
	    { NULL }
	}

With:
	mopts[] = {
	    MOPT_STDOPTS,
	    MOPT_NULL
	}

This change will help to reduce the situation that we don't explicitly
initialize "struct mntopt"'s.  It should not contribute to any
functional/logical changes as far as I can tell.
2005-06-01 09:39:36 +00:00
Colin Percival
6e34b4796d When executing mount_foo, pass "mount_foo" as argv[0] instead of "foo".
This unbreaks "/rescue/mount -t foo" -- previously it was necessary to
explicitly call "/rescue/mount_foo".

Hints from:	gordon
X-MFC after:	3 days (if approved by re@)
2005-03-26 04:45:53 +00:00
Colin Percival
18a3dd1e34 Add verbiage to the description of the noexec mount option clarifying
that it really wasn't intended as a security feature.

Wording mostly by: simon
Discussed with:	secteam
2005-03-23 04:17:48 +00:00
Ruslan Ermilov
8d646af581 Sync program's usage() with manpage's SYNOPSIS. 2005-02-10 09:19:34 +00:00
Ruslan Ermilov
6087df9e8b Sort sections. 2005-01-18 10:09:38 +00:00
Josef El-Rayes
8e5c1e59fb Fix typo.
Noticed by:	clement
2004-12-26 18:06:05 +00:00
Ruslan Ermilov
798dec9dfb Revert last change. It doesn't break mount(8) reporting
but allows a "nodev" in /etc/fstab, etc.
2004-11-30 19:36:40 +00:00
Ruslan Ermilov
5f04702815 Fix the mount(8) status reporting, now that MNT_NODEV is a no-op (zero).
Asked to commit by:	phk
2004-11-29 09:35:01 +00:00
Xin LI
a4c40dd85d Avoid comparing pointer against a numerical value by adding a * in
front of it.

Reviewed by:	phk
2004-11-25 16:14:27 +00:00
Poul-Henning Kamp
3e7c7ae093 Add a convenience function for building nmount iov arrays. 2004-11-25 13:31:46 +00:00
Poul-Henning Kamp
53805858d2 Fix bug: don't let "synco" match "sync" 2004-11-25 13:24:46 +00:00
Ruslan Ermilov
d04b5dfe6c Assorted markup, grammar, and spelling fixes. 2004-05-17 08:35:43 +00:00
Bosko Milekic
2aebb586db The previous change to mount(8) to report ufs or ufs2 used
libufs, which only works for Charlie root.

This change reverts the introduction of libufs and moves the
check into the kernel.  Since the f_fstypename is the same
for both ufs and ufs2, we check fs_magic for presence of
ufs2 and copy "ufs2" explicitly instead.

Submitted by: Christian S.J. Peron <maneo@bsdpro.com>
2004-04-26 15:13:46 +00:00
Mark Murray
4c723140a4 Remove advertising clause from University of California Regent's license,
per letter dated July 22, 1999.

Approved by: core, imp
2004-04-09 19:58:40 +00:00
Robert Watson
90b9e3f199 Correct the definition of the multilabel flag: it enables multilabel
MAC support on the file system, if supported, which causes MAC to treat
each object as having its own label, rather than using a single label
for all objects on the file system.  This doesn't have to be used in
combination with the tunefs/newfs flags -- it's an alternative.
2004-03-26 03:26:15 +00:00
Christian Brueffer
0e9efd1904 s/considred/considered/ 2004-03-04 00:52:16 +00:00
Greg Lehey
c6d1415d6a Report the difference between ufs and ufs2.
Submitted by:	"Christian S.J. Peron" <maneo@bsdpro.com>
2004-02-17 08:43:05 +00:00
Tom Rhodes
ed1b9fc97a Reorder Xrefs in SEE ALSO. 2004-02-10 06:44:41 +00:00
Tom Rhodes
f00a5dbd49 Update to inform users of acls and multilabel options. Add Xrefs to the
more relevant manual pages.

PR:		62394
Submitted by:	Marc Silver <marcs@draenor.org>
2004-02-10 06:33:29 +00:00
Jacques Vidrine
ddb842ccb6 Correct a typo and unbreak the build.
Pointy hat to:	pjd
2004-02-03 04:03:19 +00:00
Pawel Jakub Dawidek
dc9c6194b5 Made use of MNT_USER flag and inform about user responsible for mount
in those cases:
1. File system was mounted by an unprivileged user.
2. File system was mounted by an unprivileged root user.
3. File system was mounted by a privileged non-root user.

Point 1 is when file system was mounted by unprivileged user
(sysctl vfs.usermount was equal to 1 then).

Point 2 is when file system was mounted by root, while sysctl
security.bsd.suser_enabled is set to 0 and sysctl vfs.usermount
is set to 1.

Point 3 is because we want to be ready for capabilities.

Reviewed by:	rwatson
Approved by:	scottl (mentor)
2004-02-02 18:37:30 +00:00
Guido van Rooij
c14d21f6cf Style(9) option sorting
Submitted by:	Ruslan Ermilov <ru@FreeBSD.org>
2004-01-29 15:14:03 +00:00
Guido van Rooij
6f7cdc55f1 Fix manpage and usage() to reflect that -a can be used in combination
with -o

Submitted by:	Ruslan Ermilov <ru@FreeBSD.org>
Pointed out by: Ceri Davies <ceri@submonkey.net
2004-01-29 14:42:26 +00:00