OpenBSD CVS

CVS log for src/sbin/mount_nfs/mount_nfs.c


[BACK] Up to [local] / src / sbin / mount_nfs

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.55 / (download) - annotate - [select for diffs], Wed Jan 22 06:24:08 2020 UTC (4 years, 4 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, HEAD
Changes since 1.54: +2 -2 lines
Diff to previous 1.54 (colored)

remove semicolons not needed after } statements. ok deraadt

Revision 1.54 / (download) - annotate - [select for diffs], Fri Jan 5 08:13:31 2018 UTC (6 years, 4 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.53: +1 -2 lines
Diff to previous 1.53 (colored)

Remove useless <sys/socketvar.h> includes.

ok kettenis@, visa@, claudio@, deraadt@

Revision 1.53 / (download) - annotate - [select for diffs], Fri May 27 19:45:04 2016 UTC (8 years ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.52: +2 -1 lines
Diff to previous 1.52 (colored)

W^X violations are no longer permitted by default.  A kernel log message
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

Revision 1.52 / (download) - annotate - [select for diffs], Fri Jan 16 06:39:59 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9, OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.51: +4 -3 lines
Diff to previous 1.51 (colored)

Replace <sys/param.h> with <limits.h> and other less dirty headers where
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)

Revision 1.51 / (download) - annotate - [select for diffs], Wed May 21 06:23:01 2014 UTC (10 years ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.50: +2 -3 lines
Diff to previous 1.50 (colored)

Use errc/warnc to simplify code.

ok jca@ krw@

Revision 1.50 / (download) - annotate - [select for diffs], Tue May 29 20:04:59 2012 UTC (12 years ago) by jasper
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.49: +2 -2 lines
Diff to previous 1.49 (colored)

Fix tyop in error message; this was copied from/to umount(8)'s umount.c which was just fixed.

Revision 1.49 / (download) - annotate - [select for diffs], Tue Oct 27 23:59:33 2009 UTC (14 years, 7 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.48: +1 -15 lines
Diff to previous 1.48 (colored)

rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and
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

Revision 1.48 / (download) - annotate - [select for diffs], Tue May 12 23:25:08 2009 UTC (15 years ago) by thib
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.47: +1 -3 lines
Diff to previous 1.47 (colored)

don't define _KERNEL. Theres no need and its gross.

Revision 1.47 / (download) - annotate - [select for diffs], Fri Nov 10 17:30:34 2006 UTC (17 years, 6 months ago) by grunk
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3, OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.46: +1 -3 lines
Diff to previous 1.46 (colored)

enable -g again

help from millert@, ok deraadt@ pedro@

Revision 1.46 / (download) - annotate - [select for diffs], Fri Nov 3 15:38:38 2006 UTC (17 years, 7 months ago) by grunk
Branch: MAIN
Changes since 1.45: +27 -26 lines
Diff to previous 1.45 (colored)

storing return value of strtol() in int variable was not safe,
also strtol() result was not checked for under/overflow

thus, rewrite getopt switch/cases with strtonum() and sensible bounds

help from mickey@ millert@, ok millert@, no objections otto@

Revision 1.45 / (download) - annotate - [select for diffs], Fri Jul 28 20:02:49 2006 UTC (17 years, 10 months ago) by sturm
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.44: +2 -1 lines
Diff to previous 1.44 (colored)

permit synchronous mounts

ok pedro

Revision 1.44 / (download) - annotate - [select for diffs], Wed Jun 29 20:50:37 2005 UTC (18 years, 11 months ago) by jaredy
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9, OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.43: +16 -22 lines
Diff to previous 1.43 (colored)

ignore (but still accept) -D and -L

(and other minor cleaning while here:
sync usage, whitespace, fix error messages)

ok millert

Revision 1.43 / (download) - annotate - [select for diffs], Fri Apr 8 20:09:37 2005 UTC (19 years, 1 month ago) by jaredy
Branch: MAIN
Changes since 1.42: +2 -2 lines
Diff to previous 1.42 (colored)

Sync with recent realpath(3) changes:  on failure, don't use the second
argument "resolved", since it is undefined.

ok and help millert, otto

Revision 1.42 / (download) - annotate - [select for diffs], Wed Sep 15 07:10:32 2004 UTC (19 years, 8 months ago) by miod
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.41: +2 -2 lines
Diff to previous 1.41 (colored)

Restore correct noac option parsing.
ok otto@

Revision 1.41 / (download) - annotate - [select for diffs], Fri Aug 20 07:12:00 2004 UTC (19 years, 9 months ago) by otto
Branch: MAIN
CVS Tags: OPENBSD_3_6_BASE, OPENBSD_3_6
Changes since 1.40: +75 -76 lines
Diff to previous 1.40 (colored)

Unbreak processing of options when given a command line with multiple
-o options. All of them are relevant, not only the last one.

ok miod@ claudio@ marius@

Revision 1.40 / (download) - annotate - [select for diffs], Fri Jul 16 00:11:10 2004 UTC (19 years, 10 months ago) by henning
Branch: MAIN
Changes since 1.39: +3 -65 lines
Diff to previous 1.39 (colored)

remove netiso traces, millert deraadt ok

Revision 1.39 / (download) - annotate - [select for diffs], Tue Jun 22 21:12:00 2004 UTC (19 years, 11 months ago) by otto
Branch: MAIN
Changes since 1.38: +103 -90 lines
Diff to previous 1.38 (colored)

Rewrite of getmntopts(), making it more robust and getting rid of
the mount_nfs alternative implementation of the same function. Joint
work with millert@. Fixes PR 3642.

ok pedro@ millert@

Revision 1.38 / (download) - annotate - [select for diffs], Tue May 18 11:07:53 2004 UTC (20 years ago) by otto
Branch: MAIN
Changes since 1.37: +89 -102 lines
Diff to previous 1.37 (colored)

Backout changes accidentally committed in prvious commit.

Revision 1.37 / (download) - annotate - [select for diffs], Tue May 18 10:54:08 2004 UTC (20 years ago) by otto
Branch: MAIN
Changes since 1.36: +103 -90 lines
Diff to previous 1.36 (colored)

Trailers are really wonders of the past. Remove them from man page and
usage. ok millert@

Revision 1.36 / (download) - annotate - [select for diffs], Tue Oct 7 18:35:57 2003 UTC (20 years, 7 months ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.35: +29 -1 lines
Diff to previous 1.35 (colored)

add support for modifying attribute cache parameters
inspired by PR2567, the included diff was wrong tho and not used here
manpage from millert@
ok millert@ on code and jmc@ on manpage

Revision 1.35 / (download) - annotate - [select for diffs], Tue Jul 29 18:38:36 2003 UTC (20 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.34: +2 -2 lines
Diff to previous 1.34 (colored)

spaces

Revision 1.34 / (download) - annotate - [select for diffs], Sun Jul 6 20:52:40 2003 UTC (20 years, 11 months ago) by avsm
Branch: MAIN
Changes since 1.33: +5 -2 lines
Diff to previous 1.33 (colored)

error out on hostspec overflow with a "hostname too long" instead of silently
truncating; deraadt@ ok

Revision 1.33 / (download) - annotate - [select for diffs], Thu Jul 3 22:41:40 2003 UTC (20 years, 11 months ago) by tedu
Branch: MAIN
Changes since 1.32: +4 -3 lines
Diff to previous 1.32 (colored)

use realpath() in helpers instead of doing it ourselves every time.
also fixes pr1662.  from otto moerbeek

Revision 1.32 / (download) - annotate - [select for diffs], Wed Jun 11 06:22:14 2003 UTC (20 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.31: +10 -18 lines
Diff to previous 1.31 (colored)

ansification

Revision 1.31 / (download) - annotate - [select for diffs], Mon Jun 2 20:06:15 2003 UTC (21 years ago) by millert
Branch: MAIN
Changes since 1.30: +2 -6 lines
Diff to previous 1.30 (colored)

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999.  Proofed by myself and Theo.

Revision 1.30 / (download) - annotate - [select for diffs], Tue Apr 29 16:12:17 2003 UTC (21 years, 1 month ago) by millert
Branch: MAIN
Changes since 1.29: +2 -2 lines
Diff to previous 1.29 (colored)

Fix parsing of noac option; noticed and OK by henning@

Revision 1.29 / (download) - annotate - [select for diffs], Sun Jun 9 08:13:08 2002 UTC (21 years, 11 months ago) by todd
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3, OPENBSD_3_2_BASE, OPENBSD_3_2
Changes since 1.28: +2 -2 lines
Diff to previous 1.28 (colored)

rm trailing whitespace

Revision 1.28 / (download) - annotate - [select for diffs], Thu Mar 21 21:16:07 2002 UTC (22 years, 2 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.27: +5 -5 lines
Diff to previous 1.27 (colored)

o sync usage() to man page
o -l does not require an argument
o getopt() returns -1 not EOF
From Brian Poole

Revision 1.27 / (download) - annotate - [select for diffs], Sat Feb 16 21:27:36 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
Changes since 1.26: +7 -7 lines
Diff to previous 1.26 (colored)

Part one of userland __P removal.  Done with a simple regexp with some minor hand editing to make comments line up correctly.  Another pass is forthcoming that handles the cases that could not be done automatically.

Revision 1.26 / (download) - annotate - [select for diffs], Sat Dec 1 19:13:48 2001 UTC (22 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.25: +2 -3 lines
Diff to previous 1.25 (colored)

remove unused variables

Revision 1.25 / (download) - annotate - [select for diffs], Mon Nov 5 07:39:16 2001 UTC (22 years, 7 months ago) by mpech
Branch: MAIN
Changes since 1.24: +6 -6 lines
Diff to previous 1.24 (colored)

kill more registers;

millert@ ok

Revision 1.24 / (download) - annotate - [select for diffs], Wed Oct 3 18:50:07 2001 UTC (22 years, 8 months ago) by hin
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.23: +7 -180 lines
Diff to previous 1.23 (colored)

Remove all traces of Kerberised NFS; it never worked in OpenBSD, but it
has been in the userland tools and the manpages for ages.

Spotted by Lars Hansson <lars@unet.net.ph>

Ok deraadt@

Revision 1.23 / (download) - annotate - [select for diffs], Fri Jul 13 18:19:24 2001 UTC (22 years, 10 months ago) by csapuntz
Branch: MAIN
Changes since 1.22: +12 -1 lines
Diff to previous 1.22 (colored)

Add noac flag to disable attribute caching

Revision 1.22 / (download) - annotate - [select for diffs], Sat Jul 7 18:26:15 2001 UTC (22 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.21: +3 -4 lines
Diff to previous 1.21 (colored)

major -Wall cleanup, almost complete

Revision 1.21 / (download) - annotate - [select for diffs], Sat Jul 7 00:19:52 2001 UTC (22 years, 11 months ago) by millert
Branch: MAIN
Changes since 1.20: +10 -4 lines
Diff to previous 1.20 (colored)

Initialize missing parts of struct nfs_args nfsdefargs

Revision 1.20 / (download) - annotate - [select for diffs], Sun Jun 24 17:03:19 2001 UTC (22 years, 11 months ago) by csapuntz
Branch: MAIN
Changes since 1.19: +3 -20 lines
Diff to previous 1.19 (colored)



Get rid of NQNFS options

Revision 1.19 / (download) - annotate - [select for diffs], Fri May 11 18:09:08 2001 UTC (23 years ago) by mickey
Branch: MAIN
Changes since 1.18: +4 -7 lines
Diff to previous 1.18 (colored)

use strlcpy instead of strncpy+a[len-1]='\0'

Revision 1.17.4.1 / (download) - annotate - [select for diffs], Fri Oct 6 20:40:27 2000 UTC (23 years, 8 months ago) by jason
Branch: OPENBSD_2_7
Changes since 1.17: +2 -2 lines
Diff to previous 1.17 (colored) next main 1.18 (colored)

Pull in patch from current (more to come...):
Fix (millert):
warnx?/errx? paranoia (use "%s" not a bare string unless it is a
constant).  These are not security holes but it is worth fixing
them anyway both for robustness and so folks looking for examples
in the tree are not misled into doing something potentially dangerous.
Furthermore, it is a bad idea to assume that pathnames will not
include '%' in them and that error routines don't return strings
with '%' in them (especially in light of the possibility of locales).

Revision 1.18 / (download) - annotate - [select for diffs], Fri Jun 30 16:00:08 2000 UTC (23 years, 11 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE, OPENBSD_2_9, OPENBSD_2_8_BASE, OPENBSD_2_8
Changes since 1.17: +2 -2 lines
Diff to previous 1.17 (colored)

warnx?/errx? paranoia (use "%s" not a bare string unless it is a
constant).  These are not security holes but it is worth fixing
them anyway both for robustness and so folks looking for examples
in the tree are not misled into doing something potentially dangerous.
Furthermore, it is a bad idea to assume that pathnames will not
include '%' in them and that error routines don't return strings
with '%' in them (especially in light of the possibility of locales).

Revision 1.17 / (download) - annotate - [select for diffs], Thu Jun 17 20:53:28 1999 UTC (24 years, 11 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_7_BASE, OPENBSD_2_6_BASE, OPENBSD_2_6
Branch point for: OPENBSD_2_7
Changes since 1.16: +3 -15 lines
Diff to previous 1.16 (colored)

go back to UDP mounts by default until NFS/TCP is fixed

Revision 1.16 / (download) - annotate - [select for diffs], Mon May 31 17:26:12 1999 UTC (25 years ago) by millert
Branch: MAIN
Changes since 1.15: +16 -4 lines
Diff to previous 1.15 (colored)

Use connection-oriented transport (ie: TCP) when possible.  This makes
the default trasport for NFSV3 be TCP like most other OS's.

Revision 1.15 / (download) - annotate - [select for diffs], Sat May 16 06:28:00 1998 UTC (26 years ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_5_BASE, OPENBSD_2_5, OPENBSD_2_4_BASE, OPENBSD_2_4
Changes since 1.14: +3 -2 lines
Diff to previous 1.14 (colored)

call pmap_getport() with correct proto; tron

Revision 1.14 / (download) - annotate - [select for diffs], Tue Nov 11 18:36:38 1997 UTC (26 years, 6 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_3_BASE, OPENBSD_2_3
Changes since 1.13: +2 -3 lines
Diff to previous 1.13 (colored)

use nfsproto variable; tron@lyssa.owl.de

Revision 1.13 / (download) - annotate - [select for diffs], Wed Aug 20 05:10:23 1997 UTC (26 years, 9 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_2_BASE, OPENBSD_2_2
Changes since 1.12: +7 -3 lines
Diff to previous 1.12 (colored)

Print "Filesystem not supported by kernel" not "Operation not supported by
device" (EOPNOTSUPP) so the real problem is obvious.  Idea from Peter Seebach
<seebs@taniemarie.solon.com>.

Revision 1.12 / (download) - annotate - [select for diffs], Mon Aug 18 03:11:24 1997 UTC (26 years, 9 months ago) by millert
Branch: MAIN
Changes since 1.11: +2 -2 lines
Diff to previous 1.11 (colored)

#include <string.h> not <strings.h> -- Yes, I'm a weanie...

Revision 1.11 / (download) - annotate - [select for diffs], Sun Jun 29 11:10:31 1997 UTC (26 years, 11 months ago) by provos
Branch: MAIN
Changes since 1.10: +2 -2 lines
Diff to previous 1.10 (colored)

new location of des.h

Revision 1.10 / (download) - annotate - [select for diffs], Wed Jun 25 18:23:59 1997 UTC (26 years, 11 months ago) by kstailey
Branch: MAIN
Changes since 1.9: +3 -3 lines
Diff to previous 1.9 (colored)

(foo *)0 -> NULL

Revision 1.9 / (download) - annotate - [select for diffs], Sun Apr 20 15:37:26 1997 UTC (27 years, 1 month ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_1_BASE, OPENBSD_2_1
Changes since 1.8: +24 -19 lines
Diff to previous 1.8 (colored)

support for -o port=N; provos

Revision 1.8 / (download) - annotate - [select for diffs], Thu Dec 12 10:33:23 1996 UTC (27 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.7: +2 -2 lines
Diff to previous 1.7 (colored)

i studdderr wheenn i tyttype

Revision 1.7 / (download) - annotate - [select for diffs], Thu Dec 12 10:28:28 1996 UTC (27 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.6: +2 -2 lines
Diff to previous 1.6 (colored)

cannot use err() here

Revision 1.6 / (download) - annotate - [select for diffs], Tue May 28 12:37:57 1996 UTC (28 years ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_0_BASE, OPENBSD_2_0
Changes since 1.5: +26 -8 lines
Diff to previous 1.5 (colored)

Be stricter when checking NQNFS and version combinations

Revision 1.5 / (download) - annotate - [select for diffs], Wed May 8 08:53:03 1996 UTC (28 years, 1 month ago) by niklas
Branch: MAIN
Changes since 1.4: +4 -3 lines
Diff to previous 1.4 (colored)

Clarified warning messages a bit

Revision 1.4 / (download) - annotate - [select for diffs], Sun Apr 21 23:46:50 1996 UTC (28 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.3: +4 -4 lines
Diff to previous 1.3 (colored)

sync to netbsd 960418

Revision 1.3 / (download) - annotate - [select for diffs], Thu Mar 21 00:16:03 1996 UTC (28 years, 2 months ago) by niklas
Branch: MAIN
Changes since 1.2: +270 -51 lines
Diff to previous 1.2 (colored)

From NetBSD: Merge of 960317

Revision 1.2 / (download) - annotate - [select for diffs], Wed Dec 27 00:23:49 1995 UTC (28 years, 5 months ago) by tholo
Branch: MAIN
Changes since 1.1: +1 -1 lines
Diff to previous 1.1 (colored)

Do not use hard-coded realm name

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Wed Oct 18 08:43:40 1995 UTC (28 years, 7 months ago) by deraadt
CVS Tags: netbsd_1_1
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

initial import of NetBSD tree

Revision 1.1 / (download) - annotate - [select for diffs], Wed Oct 18 08:43:40 1995 UTC (28 years, 7 months ago) by deraadt
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.