summaryrefslogtreecommitdiffstats
path: root/sbin/mount (follow)
Commit message (Collapse)AuthorAgeFilesLines
* pass down the `skip' flag to the mountfs() function in the case ofrobert2020-12-111-2/+2
| | | | | | | manually mounting a device which is not present in fstab(5) so that the `-s' flag can be used in this case as well. ok millert@, deraadt@
* Adapt to POSIX realpath(3); if it returns NULL, use the mount path as-is.millert2019-07-191-9/+8
| | | | | | Fixes an inability to mount via diskuid. Also use mntpath, not *argv, on error for more accurate messages. OK martijn@ mlarkin@
* When system calls indicate an error they return -1, not some arbitraryderaadt2019-06-282-6/+6
| | | | | | value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
* delete whitespace before a full stop on a text line;schwarze2019-03-101-3/+3
| | | | patch from Alessandro dot Gallo at syssegv dot org
* Mark up mount(8) options with Cm.bentley2018-01-181-16/+16
|
* remove redundant variable declarations in Makefiles, since those areespie2017-07-091-2/+1
| | | | | | the default. okay millert@
* Postpone pledge call until after the getopt switch and hoist the call totb2017-02-061-21/+21
| | | | | | | readlabelfs over it. This avoids a pledge abort due to the fact that the ioctl DIOCGDINFO may not be allowed on the given file: mount /dev/tty /tmp. ok benno
* Some simple cleanup:tb2017-01-251-17/+19
| | | | | | | | | | * check strdup for malloc failure * remove obvious /* NOTREACHED */ * return instead of exit from main * err(1, NULL) instead of err(1, "malloc") * mark usage as __dead ok deraadt
* whitespacetb2017-01-241-3/+2
|
* On noperm mount points honor the permissions of the root directory, sonatano2016-10-061-1/+3
| | | | | | access can be locked down. ok deraadt tb
* fix HISTORY;schwarze2016-10-061-3/+3
| | | | | patches from Sevan Janiyan <venture37 at geeklan dot co dot uk>; verified using minnie.tuhs.org/cgi-bin/utree.pl
* Improve description of the noperm option.natano2016-10-041-4/+10
| | | | ok jmc (on an earlier version of the diff), tb (who found a typo) and deraadt
* sort the options list; also, the full stop in (FFS only.) wasn;tjmc2016-09-101-6/+6
| | | | doing much, so i zapped it;
* Add a noperm mount flag for FFS to be used for building release setsnatano2016-09-103-4/+10
| | | | | | | | | without root privileges. This is only the kernel/mount flag; additional work in the build Makefile's will be necessary such that the files in $DESTDIR are created with correct permissions. tedu couldn't find anything wrong with it in a quick review idea & ok deraadt
* strlen + malloc + snprintf == asprintfakfaew2016-09-041-6/+3
| | | | ok martijn@ deraadt@
* further tweak previous: use the same text for norw as ro; ok tedujmc2016-08-271-2/+2
|
* for completeness, document (no)rw and ro options.tedu2016-08-271-2/+6
|
* kern.usermount is currently a no-op;jmc2016-07-141-16/+3
| | | | ok deraadt
* somebody forgot to look at format string warningstedu2016-06-261-3/+3
|
* Add a bit more verbosity to tmpfs mount(8) output.ajacoutot2016-06-201-1/+16
| | | | | ok millert@ feedback/ok natano@
* a little nicer formatting; from miodjmc2016-06-191-3/+3
|
* sort mount options, and shorten slightly the wxabort text;jmc2016-05-291-7/+7
|
* W^X violations are no longer permitted by default. A kernel log messagederaadt2016-05-273-4/+17
| | | | | | | | | | | | | | | | is generated, and mprotect/mmap return ENOTSUP. If the sysctl(8) flag kern.wxabort is set then a SIGABRT occurs instead, for gdb use or coredump creation. W^X violating programs can be permitted on a ffs/nfs filesystem-basis, using the "wxallowed" mount option. One day far in the future upstream software developers will understand that W^X violations are a tremendously risky practice and that style of programming will be banished outright. Until then, we recommend most users need to use the wxallowed option on their /usr/local filesystem. At least your other filesystems don't permit such programs. ok jca kettenis mlarkin natano
* remove knowledge of MNT_EXKERBderaadt2016-05-251-2/+1
|
* Remove the -x flag from mount_msdos and always assume the execute bitnatano2016-05-211-3/+1
| | | | | | | | | | | for readable directories, while making it subject to the mask option (-m in mount_msdos), so it is still possible to mount with non-executable directories, but with semantics that are easier to comprehend. This makes directory listings with default mount options work again. ok deraadt@
* Use pledge "disklabel" as needed. The theory here is these tools become morederaadt2015-11-231-1/+4
| | | | | resistant against memory correctup, if a corrupt filesystem is given to them. ok krw
* Replace <sys/param.h> with <limits.h> and other less dirty headers wherederaadt2015-01-162-6/+8
| | | | | | | | | possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
* Additional cleanup for procfs removaldoug2014-09-081-3/+2
| | | | ok guenther@
* Delete procfs; it's always had races and is now unused: no one noticed forguenther2014-09-081-8/+1
| | | | | | months that I broke it before the 5.5 release. confirmed as not being required by ports by sthen@, ajacoutot@, dcoppa@
* Convert a couple calloc()s that were originally malloc()s to reallocarray()s.guenther2014-07-171-6/+6
| | | | | | | The child after fork() should use _exit() instead of exit(). Fix comment typo. ok millert@
* add -N to usage()/SYNOPSIS and tweak previous;jmc2014-07-152-14/+7
| | | | | | | rather than adding "net" to the -o list, claudio points out that -o net and -o noauto are really noops, so remove "noauto"; help/ok claudio
* remove the never installed getmntopts.3 page, as well as thejmc2014-07-142-164/+1
| | | | | | corresponding comment in Makefile; ok claudio deraadt
* Introduce a -N option to mount and a 'net' mount option.claudio2014-07-133-6/+36
| | | | | | | | File systems marked with net will not be mounted by default. mount -a -N will mount all those file systems instead. This will be used to mark file systems needing network to work -- in other words which depend on iscsid. "Get it in" deraadt@
* remove the noaccesstime synonym for noatime which was previously added for BSD/OS compatibility.daniel2014-06-242-7/+3
| | | | ok deraadt@, miod@i, millert@
* Xr mount_tmpfs, trivial ok deraadt@espie2013-12-171-2/+3
|
* Revert. It seems people don't agree about which device should be used.ajacoutot2013-09-231-2/+2
| | | | req. by krw@ millert@
* cd0a -> cd0c for consistency with the FAQ.ajacoutot2013-09-231-3/+3
| | | | discussed with and ok miod@
* When mount(1) is run in verbose mode, display f_mntfromspec if it differsjsing2013-04-211-5/+14
| | | | | | from f_mntfromname. ok krw@
* remove unneccessary .Pp;jmc2012-08-231-2/+1
|
* get rid of mount_nnpfsderaadt2012-08-231-3/+2
|
* Make 'mount nfssrv:/path' without mount point work again :landry2012-05-291-4/+3
| | | | | | | | | | - dont error out in realpath() check if argv contains @ or : (ie, is a nfs remote path) - relax getfsspec() call so that it succeeds for nfs remote paths too, not only for duid devices. Now we behave like Linux & FreeBSD (at least).. Prompted by a diff from giovanni@ for xfce4-mount ok jsing@ krw@
* Make mount work when the special is provided as a DUID.jsing2011-04-121-2/+4
| | | | | | Diff from Alexander Polakov. ok phessler@
* Avoid using NULL in non-pointer contexts: use 0 for integer values and '\0'miod2011-04-061-2/+2
| | | | for chars.
* Remove portalfs.thib2011-04-051-3/+2
| | | | | | | | | While it is a terribly cool idea, it's just awful and since noone has stepped up to the plate to keep it up with the current vop state, retire it to the attic. ok krw@, deraadt@, guenther@, miod@. comments from jmc@
* document disklabel uids and move a little text to improve readability; thejmc2010-09-281-12/+23
| | | | | | | duid text was supplied by krw ...after much discussion with jsing and krw ok krw
* rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andderaadt2009-10-272-24/+2
| | | | | | | unmaintainable). these days, people use source. these id's do not provide any benefit, and do hurt the small install media (the 33,000 line diff is essentially mechanical) ok with the idea millert, ok dms
* xfs -> nnpfs;jmc2009-06-041-3/+3
|
* don't define _KERNEL. Theres no need and its gross.thib2009-05-121-4/+2
|
* when describing options that can be passed to mount:jmc2008-11-141-14/+16
| | | | | | | | | | | | - keep the examples in this page and fstab(5) in sync - give an equivalent fstab(5) entry to show how options are specified these changes are necessary because of the differing ways we pass options to mount. while here, zap some .Tn ok otto
* Don't err() out if a fstab line refers to a non-existant mount point.krw2007-11-171-4/+6
| | | | | | | | | | Just print an error message and allow processing to continue. This fixes 'mount -a' so it mounts all the filesystems it can rather than skipping all fstab entries after a non-existant mount point. This also brings us more into line with NetBSD and FreeBSD behaviour. ok deraadt@ jsing@ millert@