Commit Graph

35 Commits

Author SHA1 Message Date
Pedro F. Giffuni
8a16b7a18f General further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.
2017-11-20 19:49:47 +00:00
Warner Losh
fbbd9655e5 Renumber copyright clause 4
Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by:	Jan Schaumann <jschauma@stevens.edu>
Pull Request:	https://github.com/freebsd/freebsd/pull/96
2017-02-28 23:42:47 +00:00
Brooks Davis
b32720888a Add a free_iovec() function to reset iovec's.
The primary purpose is to call nmount() in a loop with new iovec's so
free_iovec takes arguments by reference and resets their values.

Reviewed by:	cem
MFC after:	1 week
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D8513
2016-12-14 21:26:43 +00:00
Edward Tomasz Napierala
3914ddf8a7 Bring in the new automounter, similar to what's provided in most other
UNIX systems, eg. MacOS X and Solaris.  It uses Sun-compatible map format,
has proper kernel support, and LDAP integration.

There are still a few outstanding problems; they will be fixed shortly.

Reviewed by:	allanjude@, emaste@, kib@, wblock@ (earlier versions)
Phabric:	D523
MFC after:	2 weeks
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
2014-08-17 09:44:42 +00:00
Jaakko Heinonen
d325001438 Change checkpath() to not exit on error. This is a prerequisite for
fixing the mount(8) "failok" option.

PR:		163668
Reviewed by:	Garrett Cooper, delphij (previous version)
2012-01-16 19:34:21 +00:00
Edward Tomasz Napierala
9340fc72e6 Implement NFSv4 ACL support for UFS.
Reviewed by:	rwatson
2009-12-21 19:39:10 +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
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
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
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
Poul-Henning Kamp
3e7c7ae093 Add a convenience function for building nmount iov arrays. 2004-11-25 13:31: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
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
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
Warner Losh
854299908c o __P removed
o main prototype removed
2002-03-21 13:14:21 +00:00
Kirk McKusick
115f72d0d8 Add the snapshot option to mount_ufs. 2000-07-06 01:50:05 +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
Peter Wemm
7f3dea244c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +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
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
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
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
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
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
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
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
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
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
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
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