Commit graph

341 commits

Author SHA1 Message Date
Gavin Atkinson d452fb8af7 Add another example to mount(8) on using the "-o" argument.
PR:		docs/157389
Submitted by:	Warren Block <wblock wonkity.com>
MFC after:	1 week
2011-06-06 13:24:54 +00:00
Rick Macklem 859aaa883e Another man page update related to the switchover of the
NFS clients done by r221124.
This is a content change.

Submitted by:	jh
2011-04-29 01:14:12 +00:00
Rick Macklem 4309e17add This patch changes head so that the default NFS client is now the new
NFS client (which I guess is no longer experimental). The fstype "newnfs"
is now "nfs" and the regular/old NFS client is now fstype "oldnfs".
Although mounts via fstype "nfs" will usually work without userland
changes, an updated mount_nfs(8) binary is needed for kernels built with
"options NFSCL" but not "options NFSCLIENT". Updated mount_nfs(8) and
mount(8) binaries are needed to do mounts for fstype "oldnfs".
The GENERIC kernel configs have been changed to use options
NFSCL and NFSD (the new client and server) instead of NFSCLIENT and NFSSERVER.
For kernels being used on diskless NFS root systems, "options NFSCL"
must be in the kernel config.
Discussed on freebsd-fs@.
2011-04-27 17:51:51 +00:00
Doug Barton 2960733f48 Revert r217871. 2011-02-25 20:49:07 +00:00
Doug Barton 096d9150f6 Clarify the availability of the noatime option on network file systems 2011-01-26 05:06:11 +00:00
Joel Dahl f041f6a7b7 Remove the advertising clause from UCB copyrighted files in sbin. This
is in accordance with the information at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change
2010-12-12 21:26:12 +00:00
Kirk McKusick 18709a09ed Delete /sys/ufs/ffs/README.snapshot as it is no longer relevant.
Drop reference to it in mount(8).

MFC:	3 days
2010-11-20 18:40:50 +00:00
Jaakko Heinonen 72da547037 Fix printing of the "rw" mount option in fstab(5) format (-p option).
fstab(5) format requires that one of "rw", "rq" or "ro" is always
specified.

PR:		bin/123021
Reviewed by:	keramida, rodrigc
MFC after:	2 weeks
2010-09-30 13:31:35 +00:00
Jilles Tjoelker 7f482407a3 Clarify devfs manpages slightly.
mount(8): add xref to devfs(5)
devfs(5): change example to something more likely to be useful (it is not
necessary to mount a devfs on /dev manually, but for chroots/jails it is
often needed), mention since when devfs is preferred to device nodes on ufs

PR:		146600
MFC after:	2 weeks
2010-05-29 20:24:01 +00:00
Ulrich Spörlein 0afc94c17a mdoc: move CAVEATS, BUGS and SECURITY CONSIDERATIONS sections to the
bottom of the manpages and order them consistently.

GNU groff doesn't care about the ordering, and doesn't even mention
CAVEATS and SECURITY CONSIDERATIONS as common sections and where to put
them.

Found by:	mdocml lint run
Reviewed by:	ru
2010-05-13 12:07:55 +00:00
Bjoern A. Zeeb 9df3a16421 As statfs.f_flags are uint64_t the local variables should be as well.
We'll start noticing this with the next flag introduced as the lower
32bit are all used.
As this is old code we might need to do a full tree sweep one day, unless
changing our strategy to use a different `API' for getting/setting flags
along with the rest of the statfs data.

While here compare to 0 explicitly [1].

Suggested by:	kib [1]
Reviewed by:	kib
MFC after:	5 days
2010-03-07 16:45:18 +00:00
Jaakko Heinonen 24e2959e41 - Remove reference to nfs4. mount_nfs4(8) was removed in r192578.
- Add newnfs.
2010-02-10 16:18:28 +00:00
Ed Schouten 10bc3a7f42 ANSIfy almost all applications that use WARNS=6.
I was considering committing all these patches one by one, but as
discussed with brooks@, there is no need to do this. If we ever
need/want to merge these changes back, it is still possible to do this
per application.
2009-12-29 22:53:27 +00:00
Edward Tomasz Napierala 9340fc72e6 Implement NFSv4 ACL support for UFS.
Reviewed by:	rwatson
2009-12-21 19:39:10 +00:00
Edward Tomasz Napierala 40350c1b23 Add links to zfs(8) and zpool(8) to mount(8) manual page. 2009-11-11 12:55:58 +00:00
Ruslan Ermilov 106d839190 Switch the default WARNS level for sbin/ to 6.
Submitted by:	Ulrich Spörlein
2009-10-19 16:00:24 +00:00
Pawel Jakub Dawidek 8abb2a6ed9 Modify mount(8) to skip MNT_IGNORE file systems by default, just like df(1)
does. This is not POLA violation, because there is no single file system in the
base that use MNT_IGNORE currently, although ZFS snapshots will be mounted with
MNT_IGNORE after next commit.

Reviewed by:	kib
MFC after:	3 days
2009-09-14 21:08:22 +00:00
Rick Macklem 011981fd9e Add support for the experimental nfs client to mount_nfs. The
experimental client is used when the fstype is "newnfs" or the "nfsv4"
option is specified. It includes the addition of the option:
  gssname - to specify a client side initiator host based principal name
which is specific to NFSv4.
It also includes a change to mount.c, so that it knows about
mount_newnfs, but not mount_nfs4.

Reviewed by:	dfr
Approved by:	kib (mentor)
2009-05-27 19:56:51 +00:00
Craig Rodrigues c783576970 Add a -o mountprog parameter to mount which explicitly allows
an alternative program to be used for mounting a file system.
Ideally, all file systems
should be converted to pass string arguments to nmount(), so that
/sbin/mount can handle them.  However, certain file systems such as FUSE have
not done this, and want to have their own userland mount programs.

For example, to mount an NTFS file system with the FUSE NTFS driver:

mount -t ntfs -o mountprog=/usr/local/bin/ntfs-3g /dev/acd0 /mnt

or via an fstab entry:

/dev/acd0  /mnt  ntfs    ro,noauto,mountprog=/usr/local/bin/ntfs-3g       0       0

PR:	120784
Requested by: Dominic Fandrey
2009-03-05 08:57:35 +00:00
David E. O'Brien 0e969ed7e0 r187093 failed to keep the lifetime of the pointer suitable for reentrancy.
Fix that.  Also move the current buffer size into the 'cpa' structure.
2009-01-13 06:08:37 +00:00
David E. O'Brien 0035611858 Use a dynamically grown buffer for building the argv for the sub-mounts.
Also fix RCSid spamage.

Inspired by patch from:	Christoph Mallon <christoph.mallon@gmx.de>
2009-01-12 08:22:36 +00:00
David E. O'Brien a86de99566 Explicitly check each mount argv building assignment for buffer over flowing.
Reviewed by:	imp (earlier version of patch)
2009-01-10 20:54:47 +00:00
David E. O'Brien c9c6feb62c style(9) 2008-12-26 22:55:38 +00:00
David E. O'Brien 76c4621653 Make the sub-'argc' static to make it harder to overwrite thru a buffer
overflow.
2008-12-26 22:54:53 +00:00
David E. O'Brien fce5f960ba Be a little bit more pestimistic in argument handling - check if we've
overflown our internal buffer (though after the fact), and s/strncpy/strlcpy/

Reviewed by:	rodrigc
Obtained from:	Juniper Networks
2008-12-18 18:44:46 +00:00
Matteo Riondato bbe9d7da79 Don't return always 0. Return what we get from exec_mountprog or
mount_fs.

PR:		bin/125154
MFC after:	1 day
2008-08-31 20:08:05 +00:00
Ruslan Ermilov ac14190e39 Fix markup. 2008-06-03 09:43:28 +00:00
Konstantin Belousov 6d29a0b6d5 Add note about a reason to use mount(8) instead of mount_somefs.
Reported and proof-readed by:	pho
Discussed with:	rodrigc
MFC after:	3 days
2008-06-03 09:05:04 +00:00
Tom McLaughlin 3592acb12e - Update with a better example which shows that options specific to a
file system may be passed using -o.

Approved by:	remko, rodrigc
2008-03-12 02:09:22 +00:00
Tom McLaughlin a818f1140f - Also change the /sbin/mount_unionfs line I managed to miss just two
lines down to '-o below'.

Approved by:	remko
Noticed by:	rodrigc
Pointyhat by:	me
2008-03-10 20:44:27 +00:00
Tom McLaughlin 39d63c55af - unionfs -b option is deprecated in favor of '-o below' as per
mount_unionfs(8).

Approved by:	remko
2008-03-10 19:03:55 +00:00
Yaroslav Tykhiy 4ffb7f518d Correct the description of getmnt_silent: unknown options are silently
ignored if this variable is non-zero, which is quite logical given the
variable's name.
2008-02-17 20:25:25 +00:00
Matteo Riondato b42024b241 Fix mount -p and mount -u -ocurrent on gjournaled FS
PR:		bin/120162
Submitted by:	Niki Denev
MFC after:	1 week
2008-02-04 07:37:56 +00:00
Matteo Riondato 031ea52f84 Fix printing of unionfs mounts when using the -p option
PR:		 bin/75585
MFC after:	1 week
2008-02-03 17:23:58 +00:00
John Baldwin ef37e89d5d Properly sort 'sync' in the list of options passed to -o.
MFC after:	3 days
2007-11-27 20:37:16 +00:00
Craig Rodrigues 65c1534b06 Remove stale reference to mount_std. 2007-10-19 05:29:18 +00:00
Rong-En Fan 534046e301 - Remove UMAP filesystem. It was disconnected from build three years ago,
and it is seriously broken.

Discussed on:   freebsd-arch@
Approved by:	re (mux)
2007-06-25 05:06:57 +00:00
Poul-Henning Kamp 306d73d61e Align -p output in TAB built columns suitable for /etc/fstab. 2007-04-13 21:30:47 +00:00
Craig Rodrigues 5b54856414 Print warning that "-t msdos" is deprecated and being converted to
"-t msdosfs".  The conversion has been happening since 1.43, but
no equivalent conversion happens in "umount -t", which led to some
confusion with some users.

PR:		79296
Submitted by:	Nobuhiro Yasutomi <nobuhiro yasutomi nifty ne jp>
2007-02-06 05:57:40 +00:00
Pawel Jakub Dawidek e9988ceda3 Use pidfile(3) API to restart mountd(8) on success mount.
This why we won't kill random process if there is a stale PID in
/var/run/mountd.pid.
2007-02-02 23:58:10 +00:00
Craig Rodrigues 011b5486c5 Pass a char buffer parameter with name "errmsg" to nmount().
For filesystems which use vfs_mount_error() to log an error, this
char buffer will be populated with a string error message.
If nmount() fails, in addition to printing out strerror(errno),
print out the "errmsg" populated by vfs_mount_error().
2006-12-07 03:24:43 +00:00
Craig Rodrigues c195c7f618 Fix debugging output of '-d', to more accurately reflect if
we exec an external mount program, or just call nmount()
to mount a filesystem.

Noticed by:	kris
2006-11-14 01:07:42 +00:00
Pawel Jakub Dawidek ac88569c5a Teach mount(8) about MNT_GJOURNAL flag.
MNT_GJOURNAL flag is not a mount-time flag, but it is needed to show
'gjournal' option in mount(8) output.

Sponsored by:	home.pl
2006-10-31 21:54:51 +00:00
Ruslan Ermilov 49a41c4f52 Two tiny style fixes. 2006-10-24 22:16:51 +00:00
Ruslan Ermilov 3cbf527e8d Revert rev. 1.86 by jmallett@ as it breaks "ro" mounts specified
in /etc/fstab.

This has been happening due to the priority inversion; options
specified on the command line should take precedence over options
from fstab over default "noro" option, but since both the default
"noro" and options specified on the command line (-w, -r, -o ...)
were put into the same "options" variable, "noro" took precedence
over fstab "ro" (this is easily visible with "mount -d").

PR:		bin/100164
2006-10-24 22:02:29 +00:00
Ruslan Ermilov 8266d47670 Markup fixes. 2006-09-18 11:55:10 +00:00
Dag-Erling Smørgrav 7410947271 Fix markup snafu.
Spotted by:	ru
2006-09-14 13:47:55 +00:00
Daniel Gerzo d6649c2569 Re-word the description of the "async" flag.
Suggested by: Milos Vyletel (mv@rulez.sk)
Reviewed by: ru
Approved by: keramida (mentor), trhodes (mentor)
2006-09-08 13:47:39 +00:00
Dag-Erling Smørgrav 4b4f91707c Teach mount(8) about a 'late' keyword, which means the file system should
not be mounted unless the -l flag was specified.

Add an rc script, mountlate, which basically runs 'mount -a -l'.  It runs
after DAEMON but before LOGIN.

This is useful for things like loopback mounts, because mountcritremote
runs before mountd  / nfsd (since /usr might be a remote file system), so
an attempt to mount a loopback network file system in mountcritremote will
fail.

Also add a progress message to mountcritlocal, for the sake of symmetry
with similar messages in mountcritremote and mountlate.

Reviewed by:	freebsd-rc
MFC after:	3 weeks
2006-07-12 16:05:51 +00:00
Juli Mallett 4796c6cc6e Minor style tweaks while nearby. Namely ANSIfy and parens on return values. 2006-06-10 01:44:57 +00:00
Juli Mallett 5256cc2152 Rather than using specified_ro to parse the options list an extra time, and
keeping a flag to check whether we actually wanted to mount the filesystem
readonly, setup the options list so that we start off by assuming rw is what's
desired and let later flags change that.
2006-06-10 01:37:00 +00:00
Craig Rodrigues 19996233cc Fix "mount -u -o ro".
Requested by:	maxim
2006-06-02 17:53:46 +00:00
Craig Rodrigues 067eb35dd0 Remove reference to mount_procfs(8), add reference to procfs(5).
mount(8) doesn't use mount_procfs(8), and instead passes an fstype
of "procfs" directly to nmount().
2006-05-19 00:04:18 +00:00
Craig Rodrigues c002dbe6a7 Remove reference to mount_ext2fs(8), add reference to ext2fs(5).
mount no longer invokes mount_ext2fs, it calls nmount() directly
with fstype "ext2fs".
2006-05-17 23:29:11 +00:00
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
Guido van Rooij 13cbdf24e5 Unbreak -o fstab and -o current in combination with -a
MFC after:	2 weeks
2004-01-29 13:16:51 +00:00
Eric Anholt 01a9bce5ee Allow trailing slashes for MNT_UPDATE case (mount -u), too.
PR:		bin/59144
Submitted by:	Stefan Farfeleder <stefan@fafoe.narf.at>
2004-01-07 05:37:56 +00:00
Tom Rhodes adfdbe2253 Style change 2003-12-07 23:02:16 +00:00
Ian Dowse 96c65ccb2f Print out the file system access statistics using uintmax_t types
instead of casting the unsigned 64-bit values to longs.

Suggested by:	bde
2003-12-07 17:00:14 +00:00
Ian Dowse 05779418cd Don't include the file system ID in the output of `mount -v' if it
is all zeros. The kernel now consistently zeroes FSIDs for non-root
users, so there's no point in printing these.

Also fix a number of compiler warnings, including two real bugs:
- a bracket placement bug caused `mount -t ufs localhost:/foo /mnt'
  to override the `-t ufs' specification and use mount_nfs.
- an unitialised variable was used instead of _PATH_SYSPATH when
  warning that the mount_* program cound not be found.

Submitted by:	Rudolf Cejka <cejkar@fit.vutbr.cz> (FSID part)
Approved by:	re (scottl)
2003-12-05 09:36:56 +00:00
Tom Rhodes 2998b879f0 style.Makefile: Add a '?' before '=' in WARNS. 2003-10-26 00:35:05 +00:00
Sean Chittenden c80f12d0af Reduce fstab(5)/mount(8) confusion by changing the man pages to say "ro"
instead of "rdonly".  "rdonly" works for mount(8) and mount_std(8) but
not from /etc/fstab, whereas "ro" works for all mount_*(8) commands.
2003-10-22 18:25:49 +00:00
Warner Losh 68dd1ff405 Prefer PATH_MAX to MAXPATHLEN. PATH_MAX has the trailing NUL. 2003-08-07 04:51:41 +00:00
Ian Dowse 38f102c2f6 When mount(8) is invoked with the `-v' flag, display the filesystem
ID for each file system in addition to the normal information.

In umount(8), accept filesystem IDs as well as the usual device and
path names. This makes it possible to unambiguously specify which
file system is to be unmounted even when two or more file systems
share the same device and mountpoint names (e.g. NFS mounts from
the same export into different chroots).

Suggested by:	Dan Nelson <dnelson@allantgroup.com>
2003-07-18 17:43:13 +00:00
Gordon Tetlow a3ba4c65fd Convert fsck and mount to using execvP to find fsck_foo and mount_foo.
This simplifies the code path and makes the default path easy to override
in the /rescue case.

Submitted by:	Tim Kientzle <kientzle@acm.org>
2003-06-29 17:53:48 +00:00
Ruslan Ermilov a0b6213b05 Fixed the markup in the recently added ENVIRONMENT section. 2003-05-17 22:35:35 +00:00
David E. O'Brien c69284ca08 Use __FBSDID() to quiet GCC 3.3 warnings. 2003-05-03 18:41:59 +00:00
Matthew N. Dodd 6e3bc9dad6 Bump the date for recent commits. 2003-04-07 22:58:35 +00:00
Matthew N. Dodd 564b641ef9 Clarify the behavior of PATH_FSTAB with regard to 'tainted' execution.
Requested by:	 ru
2003-04-07 14:21:14 +00:00
Matthew N. Dodd ef258dd967 Implement the '-F' option for mount & umount which allows the user to
specify an alternate fstab file.
2003-04-07 12:56:01 +00:00
Ruslan Ermilov c4b8f0626a mdoc(7) police: kill unnecessary xref. 2003-02-23 01:46:25 +00:00
Joerg Wunsch b4206324a5 Mention the oddities and requirements for mount operations executed by
non-root users.

PR:		docs/42651
Submitted by:	Thomas Seck <tmseck@netcologne.de>
MFC after:	3 days
2003-01-13 19:42:21 +00:00
Tom Rhodes 97d0a1b862 Remove the incorrect information about dump(8) and snapshots. All the
dump(8) issues are assumed to be fixed.

PR:		46224
Submitted By:	Chris Knight <chris@aims.com.au>
Approved By:	re (murray)
2002-12-13 16:35:23 +00:00
Robert Watson 03d94b50e5 Teach mount(8) about MNT_ACLS for the purposes of mount options and
mount option printing.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-10-14 19:40:00 +00:00
Tom Rhodes ce66ddb763 s/filesystem/file system/g as discussed on -developers 2002-08-21 18:11:48 +00:00
Ruslan Ermilov 9acd9d0118 mdoc(7) police: missing markup bits. 2002-08-13 12:03:35 +00:00
Maxime Henrion 26fbf78be1 Update the manpage to match the code. The mount utilities
now don't try to load the filesystem module, the kernel takes
care of this.
2002-08-11 15:17:01 +00:00
Maxime Henrion 526ba6d32b Now that the kernel is able to load modules itself,
remove all the code which was trying to do so.
This code was nasty in several ways, it was hiding
the kernel bug where the kernel was unable to properly
load a module, and it was quitting if it wasn't able
to load the module.  The consequence is that an ABI
breakage of the vfsconf API would have broken *every*
mount utility.
2002-08-03 16:03:21 +00:00
Robert Watson ba0fbe9637 Introduce support for Mandatory Access Control and extensible
kernel access control.

Teach mount(8) to understand the MNT_MULTILABEL flag, which is used
to determine whether a file system operates with individual per-vnode
labels, or treats the entire file system as a single object with a
single (mount) label.  The behavior here will probably evolve some
now that nmount(2) is available and can more flexibly support mount
options.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-08-02 07:02:51 +00:00
Tom Rhodes 299f15612e Add a bit of information on FFS snapshots to the mount(8) manual page.
PR:		30139
Submitted by:	Chris Knight <chris@aims.com.au?
MFC after:	3 days
2002-07-11 21:12:45 +00:00
Philippe Charnier e1205e80e5 The .Nm utility 2002-07-06 19:34:18 +00:00
Tom Rhodes 3468b317cb more file system > filesystem 2002-05-16 04:10:46 +00:00
Maxime Henrion eb4ebb056c Fix a typo : ".Xr mount_udf 8," -> ".Xr mount_udf 8 ,". 2002-05-11 19:32:24 +00:00
Maxime Henrion da85c82b2a Unbreak NFS mounts when mount(8) is invoked as : mount path@server.
Reviewed by:	obrien
2002-04-23 17:24:02 +00:00
Maxime Henrion 003dbca6a6 Do our best to determine if the user is attempting an NFS mount when
the filesystem type isn't given in the command line.  In the case of
an IPv6 address containing ':', one must use the '@' separator for it
to be properly parsed (mount_nfs(8) still needs fixing at the moment
though).

PR:		bin/37230
Reviewed by:	obrien
MFC after:	1 week
2002-04-22 23:03:03 +00:00
David Malone b6925fa918 Add mount_udf and mount_smbfs to crossrefs.
PR:		37200
Submitted by:	Cyrille Lefevre <cyrille.lefevre@laposte.net>
2002-04-21 18:23:58 +00:00
Warner Losh 854299908c o __P removed
o main prototype removed
2002-03-21 13:14:21 +00:00
David E. O'Brien 2d68bf45bf Default to WARNS=2.
Binary builds that cannot handle this must explicitly set WARNS=0.

Reviewed by:	mike
2001-12-04 02:19:58 +00:00
Ruslan Ermilov 15821eba77 <mntopts.h> -> "mntopts.h" in SYNOPSIS.
Submitted by:	bde
2001-10-04 13:11:11 +00:00
Ruslan Ermilov 32eef9aeb1 mdoc(7) police: Use the new .In macro for #include statements. 2001-10-01 16:09:29 +00:00
Ruslan Ermilov 9fe48c6e8d mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 11:04:34 +00:00
Dima Dorfman cafefe8c1b Include missing header files which define functions for which gcc has
builtins (e.g., exit, strcmp).
2001-06-24 23:04:23 +00:00
Ruslan Ermilov 4ccd754686 - VFS_SET(msdos) -> VFS_SET(msdosfs)
- msdos.ko -> msdosfs.ko
- mount_msdos(8) -> mount_msdosfs(8)
- "msdos" -> "msdosfs" compatibility glue in mount(8)
2001-06-01 10:57:26 +00:00
Ruslan Ermilov 0b381bf1fd Remove vestiges of MFS. 2001-06-01 10:07:28 +00:00
Ruslan Ermilov 6ad10804f7 Rename (after a repo-copy) some mount(8) programs:
mount_fdesc -> mount_fdescfs
mount_null -> mount_nullfs
mount_portal -> mount_portalfs
mount_umap -> mount_umapfs
mount_union -> mount_unionfs
2001-05-23 14:58:19 +00:00
Dima Dorfman ad0447715b Implement the -r and -w options as -o ro' and -o noro', respectively. At
least in -w's case, simply unsetting the correct bit in init_flags was not
enough.  The bit may be reset later if, say, the filesystem is marked `ro'
in fstab.  The command line option should override the fstab setting, but
did not.  The implementation of -r was changed for consistency.

PR:		26886
Reviewed by:	archie
2001-05-02 02:16:16 +00:00
Ruslan Ermilov c292c9bd76 mdoc(7) police: fix markup. 2001-04-26 11:47:49 +00:00
Ruslan Ermilov 0a5779d45b - Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.
2001-03-26 14:33:27 +00:00
Ruslan Ermilov fe655281c5 Set the default manual section for sbin/ to 8. 2001-03-20 18:13:31 +00:00
Nik Clayton 01c78dbb09 Add an xref for mount_ntfs.
PR:             docs/24693
Submitted by:   Etienne Vidal <hallik@libertysurf.fr>
2001-02-02 03:08:48 +00:00
Brian S. Dean 20ee96993b Always print out the target device when the mount fails, not just on
ENOENT.
2001-01-25 20:03:38 +00:00