summaryrefslogtreecommitdiffstats
path: root/sbin/mount/mount.c
Commit message (Collapse)AuthorAgeFilesLines
* The previous change to mount(8) to report ufs or ufs2 usedbmilekic2004-04-261-11/+0
| | | | | | | | | | | 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>
* Remove advertising clause from University of California Regent's license,markm2004-04-091-4/+0
| | | | | | per letter dated July 22, 1999. Approved by: core, imp
* Report the difference between ufs and ufs2.grog2004-02-171-3/+14
| | | | Submitted by: "Christian S.J. Peron" <maneo@bsdpro.com>
* Correct a typo and unbreak the build.nectar2004-02-031-1/+1
| | | | Pointy hat to: pjd
* Made use of MNT_USER flag and inform about user responsible for mountpjd2004-02-021-1/+5
| | | | | | | | | | | | | | | | | | | 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)
* Style(9) option sortingguido2004-01-291-1/+1
| | | | Submitted by: Ruslan Ermilov <ru@FreeBSD.org>
* Fix manpage and usage() to reflect that -a can be used in combinationguido2004-01-291-1/+1
| | | | | | | with -o Submitted by: Ruslan Ermilov <ru@FreeBSD.org> Pointed out by: Ceri Davies <ceri@submonkey.net
* Unbreak -o fstab and -o current in combination with -aguido2004-01-291-0/+2
| | | | MFC after: 2 weeks
* Allow trailing slashes for MNT_UPDATE case (mount -u), too.anholt2004-01-071-1/+1
| | | | | PR: bin/59144 Submitted by: Stefan Farfeleder <stefan@fafoe.narf.at>
* Style changetrhodes2003-12-071-1/+1
|
* Print out the file system access statistics using uintmax_t typesiedowse2003-12-071-4/+7
| | | | | | instead of casting the unsigned 64-bit values to longs. Suggested by: bde
* Don't include the file system ID in the output of `mount -v' if itiedowse2003-12-051-10/+12
| | | | | | | | | | | | | | 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)
* Prefer PATH_MAX to MAXPATHLEN. PATH_MAX has the trailing NUL.imp2003-08-071-1/+1
|
* When mount(8) is invoked with the `-v' flag, display the filesystemiedowse2003-07-181-1/+4
| | | | | | | | | | | | 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>
* Convert fsck and mount to using execvP to find fsck_foo and mount_foo.gordon2003-06-291-24/+5
| | | | | | | This simplifies the code path and makes the default path easy to override in the /rescue case. Submitted by: Tim Kientzle <kientzle@acm.org>
* Implement the '-F' option for mount & umount which allows the user tomdodd2003-04-071-2/+5
| | | | specify an alternate fstab file.
* Teach mount(8) about MNT_ACLS for the purposes of mount options andrwatson2002-10-141-0/+2
| | | | | | | mount option printing. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* s/filesystem/file system/g as discussed on -developerstrhodes2002-08-211-4/+4
|
* Introduce support for Mandatory Access Control and extensiblerwatson2002-08-021-0/+2
| | | | | | | | | | | | | | 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
* more file system > filesystemtrhodes2002-05-161-3/+3
|
* Unbreak NFS mounts when mount(8) is invoked as : mount path@server.mux2002-04-231-1/+5
| | | | Reviewed by: obrien
* Do our best to determine if the user is attempting an NFS mount whenmux2002-04-221-6/+19
| | | | | | | | | | | 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
* o __P removedimp2002-03-211-15/+14
| | | | o main prototype removed
* - VFS_SET(msdos) -> VFS_SET(msdosfs)ru2001-06-011-0/+4
| | | | | | - msdos.ko -> msdosfs.ko - mount_msdos(8) -> mount_msdosfs(8) - "msdos" -> "msdosfs" compatibility glue in mount(8)
* Implement the -r and -w options as `-o ro' and `-o noro', respectively. Atdd2001-05-021-2/+2
| | | | | | | | | | 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
* We do not support lfs. Remove it from list of remountable fs'es.phantom2000-11-221-1/+1
|
* Only print information about reads and writes when the -v flag (forsheldonh2000-08-231-6/+8
| | | | | | | | 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>
* This is another in Martin Blapp's N-series of mount-related cleanups :)green2000-01-151-3/+6
| | | | | | | | | | | | | 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>
* Fix tab completion mounts (like /cdrom/)eivind1999-12-261-0/+1
| | | | Submitted by: Martin Blapp <mb@imp.ch>
* Print out the filesystem read counts now collected by the kernel.mckusick1999-12-011-0/+3
| | | | | Submitted by: Craig A Soules <soules+@andrew.cmu.edu> Reviewed by: Kirk McKusick <mckusick@mckusick.com>
* Fix a few things:green1999-10-301-15/+31
| | | | | | | | | | | | | 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>
* Let a file with '@' or ':' in it take precedence over defaulting togreen1999-10-101-2/+4
| | | | nfs.
* mount* fixes from Martin Blapp <mb@imp.ch>:phk1999-10-091-11/+3
| | | | | | | | | | | | | | | | | 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
* - Fixed some cases in which mount was segfaulting.n_hibma1999-10-081-10/+12
| | | | | | | | | 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>
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Null commit.jkoshy1999-05-071-1/+1
| | | | | | | > PR: bin/6399 > Submitted by: David Malone <dwmalone@maths.tcd.ie> Also reviewed by: bde
* 1. Enhanced syntax for mount(8). The -o option now supports two 'meta'jkoshy1999-05-071-31/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Fixed `mount -a -u ...'. Rev.1.19 broke this by trying too hard tobde1999-03-161-2/+3
| | | | | | | avoid mounting filesystems multiple times. PR: 10572 Submitted by: Cy Schubert <cy@cschuber.net.gov.bc.ca>
* Remove unused #includes. Spelling. Add rcsid. Do not dot terminate err()charnier1998-07-061-21/+16
| | | | strings.
* Print the write counts if they are nonzero even if we're mountedbde1998-06-081-4/+3
| | | | | | readonly, since they tell us about previous write activity. Use the correct format to print the write counts.
* Remove extraneous ")" from output.dt1998-05-171-2/+2
|
* New mount option nosymfollow. If enabled, the kernel lookup()wosch1998-04-081-1/+4
| | | | | function will not follow symbolic links on the mounted file system and return EACCES (Permission denied).
* Don't print the 'writes: sync & async' stuff if we're mounted readonlypeter1998-03-271-3/+6
| | | | or if the fs isn't keeping the stats..
* Reviewed by: dyson@freebsd.org (john Dyson), dg@root.com (david greenman)julian1998-03-081-2/+6
| | | | | Submitted by: Kirk McKusick (mcKusick@mckusick.com) Obtained from: WHistle development tree
* Converted putfsent() to Lite2 mount interface - don't use numericbde1998-02-131-2/+2
| | | | filesystem types.
* Reviewed by: hackers@freebsd.org in generaljulian1997-11-131-1/+2
| | | | | | | | | | | | | 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.
* Add noclusterr and noclusterw options. The noclusterr and noclusterwkato1997-09-271-1/+7
| | | | | | disable clustered read and write, respectively. Reviewed by: bde
* Try to avoid mounting filesystems multiple times. Also whilesteve1997-08-241-17/+67
| | | | | | | I'm here do some -Wall cleaning. PR: kern/1839 Reviewed and corrected by: joerg
* Change vfork to fork, too many memory-clobbering actions present in childache1997-04-231-2/+2
|
* Finished (?) merging with Lite2: cleaned up #include mess; fixed mergingbde1997-03-121-62/+48
| | | | | | | | | | 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).
OpenPOWER on IntegriCloud