Commit Graph

308 Commits

Author SHA1 Message Date
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
Brian S. Dean
a04ea1b860 Provide a better error message when the /dev entry is non-existant.
Due to the old message, I spent way more time debugging a diskless
root problem than it should have taken.
2001-01-25 17:29:07 +00:00
Dag-Erling Smørgrav
c4b267dc7e Retire kernfs (userland part). 2000-12-28 12:59:57 +00:00
Ruslan Ermilov
1252c1bb05 Prepare for mdoc(7)NG. 2000-12-18 15:16:24 +00:00
Ruslan Ermilov
7f8047281e mdoc(7) police: misc minor fixes. 2000-11-23 08:18:10 +00:00
Alexey Zelkin
e867267b31 o get rid lfs mentions
o remove non-mdoc groff's instructions
2000-11-22 17:56:21 +00:00
Alexey Zelkin
5a4420e314 We do not support lfs. Remove it from list of remountable fs'es. 2000-11-22 17:54:56 +00:00
Ruslan Ermilov
7c7fb079b9 mdoc(7) police: use the new features of the Nm macro. 2000-11-20 16:52:27 +00:00
Nik Clayton
1ce9f3171c .Xr to mount_ext2fs, mount_hpfs, mount_linprocfs, mount_nwfs, and
mount_std.

PR:		docs/20369
Submitted by:	bmah
2000-10-29 14:45:36 +00:00
Sheldon Hearn
e4bc2e3400 Explain the notion that additional mount options may be described
in mount_XXX manual pages.  Remove explicit mention of NFS mount
options, since they are accurately described by this rule.

PR:		20814
2000-08-28 08:52:59 +00:00
Sheldon Hearn
c62ffab640 Only print information about reads and writes when the -v flag (for
verbose mode) is specified.  This should really have been the case
when this extra cruft was first introduced in rev 1.23.

PR:		20710
Reported by:	Mike Meyer <mwm@mired.org>
2000-08-23 09:59:25 +00:00
Warner Losh
595a9d6ebc optreset is declared in unistd.h now. 2000-08-16 07:36:30 +00:00
Kirk McKusick
115f72d0d8 Add the snapshot option to mount_ufs. 2000-07-06 01:50:05 +00:00
Nik Clayton
57c68d4526 Removed xref to mount_lfs, this died in 2.mumble.
PR:             docs/18272
Submitted by:   Michael Lucas <mwlucas@blackhelicopters.org>
2000-04-30 22:08:13 +00:00
Sheldon Hearn
ef8f7ac935 Remove single-space hard sentence breaks. These degrade the quality
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.
2000-03-01 11:27:47 +00:00
Alfred Perlstein
bf1a227441 Don't scare the users.
Kirk argees that the comment about corruption caused by switching the flags
on an already mounted manpage are bogus, it doesn't happen.

Ok by: mckusick
2000-02-22 01:40:43 +00:00
Brian Feldman
ab80d6fabc This is another in Martin Blapp's N-series of mount-related cleanups :)
Changes are:
 - rpc.umntall is called at the right places now in /etc/rc*
 - rpc.umntall timeout has been lowered from two days (too high) to one
 - verbose messages in rpc.umntall have been clarified
 - kill double entries in /var/db/mounttab when rpc.umntall is invoked
 - ${early_nfs_mounts} has been removed from /etc/rc
 - patched mount(8) -p to print different pass/dump values for ufs filesystems.
   (last patch recieved from dan <bugg@bugg.strangled.net>)

Submitted by:	Martin Blapp <mbr@imp.ch>, dan <bugg@bugg.strangled.net>
2000-01-15 14:28:14 +00:00
Eivind Eklund
2b184c5087 Fix tab completion mounts (like /cdrom/)
Submitted by:	Martin Blapp <mb@imp.ch>
1999-12-26 16:34:53 +00:00
Kirk McKusick
461bb71e4f Print out the filesystem read counts now collected by the kernel.
Submitted by:	Craig A Soules <soules+@andrew.cmu.edu>
Reviewed by:	Kirk McKusick <mckusick@mckusick.com>
1999-12-01 02:16:51 +00:00
Brian Feldman
cf96af72d5 Fix a few things:
1. Get rid of the evilly bogus strdup(fstab) and  free if (fstab == "")
   as in umount.
2. Don't use /etc/fstab info if the mount instance does not exactly match
   the fstab entry.
3. Reversed the mountpoint checking order in getmntpt().
4. Clarify the "not mounted" error message in mount -u.  The previous
   "unknown special file or file system" wasn't quite right.
5. Get rid of a 1-byte memory leak;  this was reported by jhb.

Submitted by:	Martin Blapp <mb@imp.ch>
1999-10-30 17:40:10 +00:00
Brian Feldman
2eb072e493 Let a file with '@' or ':' in it take precedence over defaulting to
nfs.
1999-10-10 15:52:21 +00:00
Poul-Henning Kamp
73dd316734 mount* fixes from Martin Blapp <mb@imp.ch>:
Made mount more userfriendly (bad slashes are now filtered out)
        and we remove in mount_nfs trailing slashes if there are any.

        Fixed mount_xxx binarys to resolve with realpath(3)
        the mountpoint.

        Translate the deprecated nfs-syntax with '@' to ':' .
        The ':' syntax has now precedence, but '@' still works.
        Notify the user that the '@' syntax should not be used.

PR: 7846
PR: 13692
Submitted by:   Martin Blapp <mb@imp.ch>
Reviewed by:    phk
1999-10-09 11:54:14 +00:00
Nick Hibma
af2ea5aae6 - Fixed some cases in which mount was segfaulting.
Original patch from Adrian. Martin added a check for free().

- Included the filesystem type in output of mount

PR:            bin/13143
Submitted-By:  Martin Blapp <mblapp@kassiopeja.lan.attic.ch>
1999-10-08 19:54:32 +00:00
David E. O'Brien
534e0080ae Document the "noasync" option. 1999-09-28 15:49:47 +00:00
Peter Wemm
7f3dea244c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
Nik Clayton
1ba1d54c41 Add $Id$ to these manpages.
Approved by:            bde
1999-07-12 20:04:59 +00:00
Joseph Koshy
5880814dc3 Null commit.
>  PR:		bin/6399
>  Submitted by:	David Malone <dwmalone@maths.tcd.ie>

Also reviewed by:	bde
1999-05-07 05:31:01 +00:00
Joseph Koshy
18af604492 1. Enhanced syntax for mount(8). The -o option now supports two 'meta'
options:

    -o fstab	brings in filesystem options specified in /etc/fstab
    -o current	incorporates the current set of options for the file
		system

   The rightmost option wins in the case of conflicting options being
   specified.

   E.g.:-

   # mount -u -o current,nosuid /home

   will preserve the current mount options while adding the 'nosuid' flag.

2. Rewording of manual page to be hopefully clearer; small -Wall
   cleanups.

Thanks to David Malone for his patience and willingness to work
multiple patches on request.

PR:		bin/6399
Submitted by:	David Malone <dwmalone@maths.tcd.ie>
1999-05-07 05:22:08 +00:00
Guy Helmer
a7efcd4bab modload -> kldload and add ref to kldload(8) in See Also section.
Submitted by:	Nathan Ahlstrom <nrahlstr@winternet.com>
1999-04-08 13:59:42 +00:00
Bruce Evans
98201b0c60 Fixed `mount -a -u ...'. Rev.1.19 broke this by trying too hard to
avoid mounting filesystems multiple times.

PR:		10572
Submitted by:	Cy Schubert <cy@cschuber.net.gov.bc.ca>
1999-03-16 22:26:51 +00:00
Bruce Evans
ba2f0650b6 Removed ROOTSLICE_HUNT. The root device is now found better by
getvfsent() in most cases.  (The main exception is when /etc/fstab
still hasn't been converted to use a slice for the root device, the
root device is a SCSI device, and the /dev/sd* inode for this device
still hasn't been renamed to /dev/da*.)
1999-01-09 16:28:33 +00:00
Dag-Erling Smørgrav
bdd042f095 Warn about "mount -u" bug. 1998-10-16 00:06:56 +00:00
Joseph Koshy
ce60232381 Add a CAVEAT section documenting the minimum permissions required for a mount
point to be traversable in both directions by all users.

PR: 7172
1998-07-09 05:49:58 +00:00
Philippe Charnier
bcb1d8469d Remove unused #includes. Spelling. Add rcsid. Do not dot terminate err()
strings.
1998-07-06 07:12:38 +00:00
Bruce Evans
677b9b3f7c Print the write counts if they are nonzero even if we're mounted
readonly, since they tell us about previous write activity.

Use the correct format to print the write counts.
1998-06-08 14:08:54 +00:00
Dmitrij Tejblum
0580d32288 Remove extraneous ")" from output. 1998-05-17 21:57:17 +00:00
Wolfram Schneider
5ddc8ded1d New mount option nosymfollow. If enabled, the kernel lookup()
function will not follow symbolic links on the mounted
file system and return EACCES (Permission denied).
1998-04-08 18:31:59 +00:00
Peter Wemm
1cd2698705 Don't print the 'writes: sync & async' stuff if we're mounted readonly
or if the fs isn't keeping the stats..
1998-03-27 10:52:13 +00:00
John Polstra
fbc4f4fd31 Fix a type mismatch between a scanf format string and the
corresponding argument.
1998-03-08 23:57:00 +00:00
Steve Price
227776616a Make this compile again.
PR:		5948
Submitted by:	Brian Feldman
1998-03-08 19:03:05 +00:00
Mike Smith
95f37fa61f If we are mounting the root filesystem, and we're accessing it through
something that might refer to the compatability slice rather than the
correct slice entry, try all the possible slice entries first.

This is a compatability hack to deal with the case where the kernel has
correctly mounted the root filesystem out of its slice, but the user
has not updated their /etc/fstab file to reflect this.  A diagnostic
is emitted if the mount succeeds, indicating that the file should be
updated.

This is a prelude to fixing the kernel to behave as alluded to above.
Reviewed by:	(discussed with) julian, phk
1998-03-08 14:50:04 +00:00
Julian Elischer
b1897c197c Reviewed by: dyson@freebsd.org (john Dyson), dg@root.com (david greenman)
Submitted by:	Kirk McKusick (mcKusick@mckusick.com)
Obtained from:  WHistle development tree
1998-03-08 09:59:44 +00:00
Bruce Evans
f1d7b4203c Converted putfsent() to Lite2 mount interface - don't use numeric
filesystem types.
1998-02-13 04:54:27 +00:00
Bruce Evans
87f01287d2 Removed definition of _NEW_VFSCONF. The new vfsconf interface is now
the default.
1998-01-20 10:40:18 +00:00
Steve Price
8546f807e0 Add mount_devfs(8) to the SEE ALSO section.
PR:		5125
1997-12-01 00:44:16 +00:00
Julian Elischer
52bf64c787 Reviewed by: hackers@freebsd.org in general
Obtained from: Whistle Communications tree

Add an option to the way UFS works dependent on the SUID bit of directories
This changes makes things a whole lot simpler on systems running as
fileservers for PCs and MACS. to enable the new code you must
1/ enable option SUIDDIR on the kernel.
2/ mount the filesystem with option suiddir.
hopefully this makes it difficult enough for people to
do this accidentally.
see the new chmod(2) man page for detailed info.
1997-11-13 00:28:51 +00:00
KATO Takenori
75b714ac11 Add noclusterr and noclusterw options. The noclusterr and noclusterw
disable clustered read and write, respectively.

Reviewed by:	bde
1997-09-27 13:44:17 +00:00
Bruce Evans
958294d6f6 Removed duplicate MOPT_FORCE and sorted the first one. Rev.1.5 and
Lite2 messed up the ordering differently.
1997-08-25 21:14:22 +00:00
Bruce Evans
8e30c09987 Moved getmntops() stuff back to mntopt.h so that it is visible in other
mount utilities.
1997-08-25 21:02:21 +00:00
Bruce Evans
fa02b62ae7 Backed out previous commit - don't clobber the (normally equivalent)
default for NOSHARED.
1997-08-25 20:38:35 +00:00
Steve Price
30761f8783 Forgot to cvs add this new file. 1997-08-24 21:28:38 +00:00
Steve Price
fba1c154b2 Try to avoid mounting filesystems multiple times. Also while
I'm here do some -Wall cleaning.

PR:		kern/1839
Reviewed and corrected by:	joerg
1997-08-24 21:02:51 +00:00
Joerg Wunsch
6caa839def Mention the various reasons for messages of the form:
xxxxx filesystem is not available

Inspired by:  PR 3311, and a following discussion with Mikhail
1997-08-24 17:51:12 +00:00
Steve Price
951122de0a Always include the section name in the .Xr macro and cleanup
.Nm macro usage.

PR:		docs/3940
Submitted by:	Kazuo Horikawa <k-horik@yk.rim.or.jp>
1997-08-24 02:27:08 +00:00
Mike Smith
0a9bd6b010 Fix parsing of mount options with '=' in their name.
PR:		bin/3027
Submitted by:	Louis Mamakos <louie@TransSys.COM>
1997-04-30 05:48:22 +00:00
Andrey A. Chernov
7c506958f1 Change vfork to fork, too many memory-clobbering actions present in child 1997-04-23 23:04:58 +00:00
Warner Losh
8d64695c7c compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
1997-03-29 03:33:12 +00:00
Bruce Evans
74cf460b66 Finished (?) merging with Lite2: cleaned up #include mess; fixed merging
errors (mis-sorted prototypes, duplicated MNT_NOATIME, duplicated NULL
mntopts fixup).

Updated getopt() usage.

Fixed style bugs in FreeBSD changes (one or two per line for putfsent()
stuff).
1997-03-12 18:35:10 +00:00
Peter Wemm
c06fe0a05e Merge from Lite2
- use new getvfsbyname() interface and mount(2) interface

**DANGER WILL ROBINSON!!**  You must be running a -current kernel
from within a week or so in order for this to work!
1997-03-11 12:28:00 +00:00
Bruce Evans
2822751af3 This commit was generated by cvs2svn to compensate for changes in r23412,
which included commits to RCS files with non-trunk default branches.
1997-03-05 17:51:21 +00:00
Bruce Evans
92e2d9bed5 Attempt to import Lite2's mount. 1997-03-05 17:51:21 +00:00
Peter Wemm
c0ec1f37ef Revert $FreeBSD$ to $Id$ 1997-02-22 14:40:44 +00:00
Jordan K. Hubbard
1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
Andrey A. Chernov
677ab44579 Add mount_msdos(8) reference
2.2 candidate
1996-11-10 02:21:05 +00:00
David Greenman
fa9471546d Added description of "noatime" option. 1996-09-08 13:28:12 +00:00
David Greenman
55e50ace1e Implemented user side of "noatime" mount option. This option disables
the file access time update on reads and can be useful in reducing
filesystem overhead in cases where the access time is not important (like
Usenet news spools).
1996-09-03 07:13:56 +00:00
Wolfram Schneider
b8923d4cc0 [HISTORY] command appeared in Version 1 AT&T UNIX
Obtained from: A Quarter Century of UNIX, Peter H. Salus, page 41
1996-08-29 18:06:19 +00:00
Jordan K. Hubbard
a257a45ecd I have added a new option -p to the mount command. This was
inspired by SunOS version of mount which uses option -p to
indicate that the mount information should be printed in fstab
format.
This is a neat way to create a new fstab file to use later when
one has modified the mount points or mount options or added or
removed mount some mount points. You just type

	mount -p > /etc/fstab.new

and there is your new fstab file ready to be used though you
will of course have to add any necessary noauto flags manually.

[Committers note:  This also seems to do the wrong thing for AMD
 mounts, but in the more average case this is a nifty feature nonetheless
 and one can always edit the bogus entries out]

Submitted-By: Jukka Ukkonen <jau@jau.csc.fi>
1996-07-21 23:34:04 +00:00
Wolfram Schneider
b23472acb2 Document that suid wrapper like suidperl(1) break option 'nosuid'. 1996-07-02 23:18:38 +00:00
Satoshi Asami
b6cf6bb275 Change the messages slightly when there is no "mount_type" executable
found when the user specifies "mount -t type".  Instead of printing
out one message for each path element (/sbin, /usr/sbin), it prints
out:

mount: exec mount_type not found in /sbin, /usr/sbin: No such file or directory

The code is quite long for such a stupid little piece of aesthesism
but it is very straghtforward so I guess it's ok.  Besides, I don't
want to do a "char foo[100];" and have malloc break down when someone
decides to add a few more paths to a variable that's far apart from
this code. :)

By the way, there is no malloc() off-by-one error for the '\0' at the
end of the string although I don't explicitly add 1 to the length.
The code allocates strlen(path element)+2 bytes for each path element,
and doesn't use the last two bytes (for the delimiting ", ").

Reviewed by:	the list (I hope)
1996-03-15 00:14:09 +00:00
Mike Pritchard
d5f6aa5f24 Backout my changes to disallow "mount /mnt /mnt" until I can verify
that nfs mounts work again (I locked up my home machine testing it and can't
see what happened until I get home from work tonight).
1996-03-11 20:01:17 +00:00
Mike Pritchard
bd70de3eaf Only restrict the user from doing something like "mount /mnt /mnt"
for file system types that actually cause a panic (ufs, msdos, cd9660).
This makes /proc mountable again.
1996-03-11 00:22:28 +00:00
Mike Pritchard
d48b626da3 Do not allow the caller to specify the same path for the special
device file and the mount point.  This prevents the "unexpected recursive
lock" panic from happening.

This is a temporary fix.  A kernel fix would be much much more ugly than
this, and still wouldn't be the "right" way to fix it.  After some
of Terry's file system rework is installed, it will be possible to
properly fix this problem in a clean manner.  Until then,
this change should prevent use from getting a problem report
on this every month or so (and I just noticed that someone in
one of the freebsd news groups was complaining about this problem, too).
1996-03-10 00:20:28 +00:00
Jordan K. Hubbard
66fa281751 Close PR#17. This may be a contraversal fix in that now mount will
spit out two error lines for a bogus filesystem type, e.g:

root@time-> mount -t foo /dev/sd0a /mnt
mount: exec /sbin/mount_foo for /mnt: No such file or directory
mount: exec /usr/sbin/mount_foo for /mnt: No such file or directory

But I would submit that if you're even going to scan multiple directories
for a mount_foo (which I actually think is somewhat bogus - if it's not
in /sbin, you're probably in big trouble anyway), you should emit an error
for each one.  I got multiple complaints (in addition to the PR) that the
existing behavior was very confusing.
1996-03-03 08:44:22 +00:00
Mike Pritchard
c4c23c4df8 Another round of various man page cleanups. 1996-02-09 17:25:57 +00:00
David Greenman
c4e9518794 Document the -a option, and mention ``noauto''. 1995-08-26 06:06:15 +00:00
David Greenman
89beb278f7 The changes for adding the "noauto" option were mostly wrong. MNT_NOAUTO
is a kernel flag, and the kernel definately doesn't need to know about
it.
1995-08-26 05:39:53 +00:00
Jordan K. Hubbard
5411032ad5 Sigh. This isn't my night. I forgot the manpage updates too!
Thanks, Andrey.
1995-08-23 14:14:32 +00:00
Jordan K. Hubbard
81b9534dc5 Add a "noauto" flag so that you can do things like prevent your system
from not coming up multiuser just because you have a CD mount in fstab
but no CD in the drive.
Submitted by:	"Full Name Not Supplied" <simon@masi.ibp.fr>
1995-08-23 12:59:27 +00:00
Rodney W. Grimes
5ebc7e6281 Remove trailing whitespace. 1995-05-30 06:12:45 +00:00
David Greenman
1469eec81e Fixed incompleteness that would allow dirty filesystems to get mounted
when the single user shell was terminated. These changes disallow mounting
or R/W upgrading filesystems that are dirty unless "-f" (force) option
is used with mount. /etc/rc has been modified to abort the startup if
one or more non-nfs partitions fail to mount.

Reviewed by:	Poul-Henning Kamp, Rod Grimes
1995-05-15 08:39:37 +00:00
David Greenman
e83d87f1fc Fix force flag: It is not a "negative" flag. Add MNT_FORCE to the acceptable
options for UFS (which fixes another bug).
1995-05-12 23:39:15 +00:00
Bruce Evans
48ab66a1f5 Fix another bogon in the change before the last. 1995-02-16 11:23:25 +00:00
David Greenman
792016e7a4 Woops, last change wasn't done quite right...fixed. 1995-02-15 14:45:08 +00:00
David Greenman
8a978495e7 Verify that the last component of the mount point path exists and is
a directory - allows for better error reporting.
1995-02-15 14:20:50 +00:00
Garrett Wollman
93eb556775 Document the requirements of dynamic loading on mounting order. Cross-ref
to vfsload(3).
1995-01-22 22:54:56 +00:00
Garrett Wollman
3fa88dec7f Add support for filesystem-specific `-o' options, and re-implement the
most common cd9660 and nfs options like God intended them.  (It is now
possible to say

	mount -o ro,soft,bg,intr there:/foo/bar /foo/bar

again.)  This whole getmntopt() business is an incredible botch;
it never should have been anything more than a wrapper around
getsubopt(3).  Because if the way the current hackaround is implemented,
options which take arguments (like the old `rsize' and `wsize') are still
unavailable, and must be accessed the new, broken way.

(It's unimaginable how Berkeley managed to screw up one of the few things
about NFS that Sun actually got right to begin with!)
1994-11-01 23:51:53 +00:00
Andrey A. Chernov
0fd4e043f4 Add code to skip "userquota"/"groupquota" options needed for
quotaon/quotacheck
1994-09-29 16:39:26 +00:00
Garrett Wollman
c974f9c6a6 Use getvfs* functions to map between VFS types and names.
Automatically load UFS if it is not present but is loadable.
(This won't happen now, but could happen if we fix NFS diskless support.)
1994-09-22 02:07:33 +00:00
Garrett Wollman
404c1a5fc1 Convert to our man installation style. Also fixed long-standing bug
in `fastboot'/`fasthalt' in which the interpreter would hang around
after `reboot' or `halt' is run, causing an irritating ``Killed'' message.
1994-08-05 02:42:42 +00:00
David Greenman
e05db2e2a5 Fixed NULL pointer dereference that occured when any options were
specified.
1994-08-02 11:42:10 +00:00
Rodney W. Grimes
8fae3551ec BSD 4.4 Lite sbin Sources
Note:  XNSrouted and routed NOT imported here, they shall be imported with
usr.sbin.
1994-05-26 06:35:07 +00:00