Commit Graph

63 Commits

Author SHA1 Message Date
martin
ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
christos
019362ec2a - unlink the warmstart file first and then open it exclusively.
(From Brian Ginsbach)
- ifdef the whole file #ifdef WARMSTART to save space.
2007-10-12 21:24:01 +00:00
dsl
b504fee486 Depracate ND_DEBUG and BIND_DEBUG in favour of RPCBIND_DEBUG.
Add commented out entries for RPCBIND_DEBUG and SVC_RUN_DEBUG in Makefile.
2007-08-27 19:53:32 +00:00
dsl
3d3a92a528 This code has been broken for ~ 20 years!
Initialise the 'fromlen' parameter for recvfrom() prior to the call, instead
of passing in a 'random' value off the stack.
This should fix the problems with ypbind on current.
I suspect the old kernel was not objecting to -ve buffer lengths.
2007-08-27 19:51:50 +00:00
christos
2219d66ee7 PR/36440: Martin Husemann: rpcbind complains about non-errors.
Don't complain about EAFNOSUPPORT.
2007-06-04 18:00:51 +00:00
tls
36a21907e2 Since Christos cleaned up the use of libc internals here, we can switch
these from USE_SSP to USE_FORT as they should be.
2007-05-28 18:12:06 +00:00
christos
599840187d get rid of libc cruft. requested by tls 2007-05-28 14:49:15 +00:00
tls
4147a3c54a Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the
FORTIFY_SOURCE feature of libssp, thus checking the size of arguments to
various string and memory copy and set functions (as well as a few system
calls and other miscellany) where known at function entry.  RedHat has
evidently built all "core system packages" with this option for some time.

This option should be used at the top of Makefiles (or Makefile.inc where
this is used for subdirectories) but after any setting of LIB.

This is only useful for userland code, and cannot be used in libc or in
any code which includes the libc internals, because it overrides certain
libc functions with macros.  Some effort has been made to make USE_FORT=yes
work correctly for a full-system build by having the bsd.sys.mk logic
disable the feature where it should not be used (libc, libssp iteself,
the kernel) but no attempt has been made to build the entire system with
USE_FORT and doing so will doubtless expose numerous bugs and misfeatures.

Adjust the system build so that all programs and libraries that are setuid,
directly handle network data (including serial comm data), perform
authentication, or appear likely to have (or have a history of having)
data-driven bugs (e.g. file(1)) are built with USE_FORT=yes by default,
with the exception of libc, which cannot use USE_FORT and thus uses
only USE_SSP by default.  Tested on i386 with no ill results; USE_FORT=no
per-directory or in a system build will disable if desired.
2007-05-28 12:06:17 +00:00
christos
724513abed deal with namespace pollution caused by tcpd. 2007-05-16 14:42:07 +00:00
christos
5b9bddf888 PR/36319: Michael van Elst: rpcinfo -p requires root privileges
Explicitly chmod 777 the local socket.
2007-05-13 21:19:56 +00:00
christos
de327a0164 - WARNS = 4
- De __P
- While starting up, send messages to stderr not syslog.
- Fix error messages
- Don't play with umask and forget to restore it on error
2007-05-13 20:03:46 +00:00
christos
4ef5a01a14 PR/36313: Juergen Hannken-Illjes: Change the name "rpcbind" to "sunrpc"
which is used in the new services.
2007-05-13 13:38:29 +00:00
ginsbach
d59a581d86 Adapt rpcbind(8) to new return value from socket(2) for unsupported
address families.
2006-06-14 16:25:17 +00:00
christos
a43996b8ca Coverity CID 783: Add an assertion for a NULL deref. 2006-05-25 02:37:38 +00:00
christos
79fc501cb4 Coverity CID 2294: Fix memory leak.
While here remove some bogus casts.
2006-05-25 02:35:32 +00:00
christos
1716cd4ef4 Coverity CID 1070: Check for NULL deref that cannot happen. 2006-05-25 02:33:16 +00:00
christos
25b83d98a5 Coverity CID 3653: Fix memory leak. 2006-05-25 02:31:38 +00:00
elad
fb41d90922 Proper bounds access, found by Coverity, CID 1470. 2006-03-17 14:40:11 +00:00
elad
8adb45d48c Fix off-by-one found by Coverity, CID 1529. 2006-03-17 02:56:05 +00:00
jmmv
43e6e3abd2 Capitalize a letter to match other sentences in the list. 2006-01-12 16:45:25 +00:00
lukem
b3a34b7256 Support MKINET6=no building after the -Wuninitalized fix.
Noted by Jukka Salmi in email.
2005-06-07 22:21:57 +00:00
lukem
0fc9160967 appease gcc -Wuninitialized 2005-06-02 09:32:57 +00:00
lukem
7157011597 Only compile in IPv6 support if ${USE_INET6} != "no"
MKINET6 is for providing IPv6 infrastructure.
USE_INET6 is for compiling IPv6 support into the programs (needs MKINET6).
2005-01-10 02:58:58 +00:00
martin
ad1c3f227e Decrease log severity to debug if a protocol is not supported by the
kernel. This avoids "rpcbind: cannot create socket for tcp6" messages
at startup on IPv4-only kernels.
2004-05-20 12:22:23 +00:00
matt
3c12447a00 Make building IPv6 support controllable by MKINET6 2003-12-07 21:57:22 +00:00
fvdl
e183d65fc4 Make a v6 socket v6-only, since rpcbind does host-based checking (all NFS
code already did this).
2003-10-29 17:51:33 +00:00
fvdl
b6d9b01a54 Don't compare a char to NULL. 2003-10-21 02:53:02 +00:00
fvdl
c40a2514bd Don't pass NULL as an integer. 2003-10-21 02:51:37 +00:00
fvdl
bc6fdb757c Don't compare a char to NULL. 2003-10-21 02:50:41 +00:00
itojun
d9f2774c1e use bounded string op 2003-07-13 12:08:28 +00:00
wiz
990562bfef .Nm does not need a dummy argument ("") before punctuation or
for correct formatting of the SYNOPSIS any longer.
2003-02-25 10:34:36 +00:00
fvdl
d4f83aa2bb Use a non-blocking SVC for TCP connections. 2002-11-08 00:14:50 +00:00
mycroft
aae6c28cf9 null commit 2002-09-23 12:44:34 +00:00
itojun
f46e921837 poll.h, not sys/poll.h 2002-09-23 03:36:03 +00:00
lukem
17d72c8a6b use NETBSDSRCDIR as appropriate 2002-09-18 03:54:26 +00:00
itojun
e042104e12 document that access control is provided by libwrap. 2002-08-12 18:47:07 +00:00
cjep
a8f6b3003d Fix typo in a comment (from Onno van der Linden; PR#15792) 2002-03-03 18:17:05 +00:00
wiz
ccd1965ef5 Sort sections, drop a .Pp. 2002-02-02 01:44:31 +00:00
fvdl
0979d803f6 For the local case, return serv_uaddr in addrmerge, not the address
by which the client contacted rpcbind.

Also fix a missing \n in a debug printf.

From Martin Blapp, mb@imp.ch
2001-04-30 00:36:07 +00:00
wiz
7a345e6d38 Fix date, and add RCS Id. 2001-04-26 23:28:42 +00:00
fvdl
a5164578ec For an AF_LOCAL connection, don't attempt to do the address merge dance.
While here, fix some memory leaks in error cases.
2001-04-22 21:43:05 +00:00
cgd
fdfcf1962d labels (even default:) _must_ be followed by statements! usr.bin/fgen/fgen.l 2001-01-16 02:43:37 +00:00
lukem
cb4cea7120 don't use LOG_CONS 2001-01-11 02:44:03 +00:00
jmc
ca4a8d27dc Move routines which fill in tbuf in addrmerge(). The fixes in 1.4 pick a new
interface but don't fill in tbuf which results in clients getting garbage back
in part of the answer. This makes sure there's something in tbuf.

At some point this whole logic should be looked at, as just picking a random
local up interface for non-local requests doesn't feel right.
2001-01-10 05:23:43 +00:00
fvdl
b2475f7e19 Make showmount -e work on lp64be. From Matt Green. While at it, also
fix another occurence of passing &int to xdr_long.
2000-10-20 11:49:40 +00:00
ad
2f4f733952 rpcinfo is in section 8. 2000-10-10 14:34:13 +00:00
fvdl
018ee18dee Do not check unitialized variables as error values. This is generally
frowned upon, or so I hear.
2000-08-03 00:07:22 +00:00
fvdl
ad91c2992c When merging addresses, and no direct match is found, pick the first
configured interface that is preferably not local or point to point.
This appears to be what Solaris does as well.
2000-08-03 00:04:30 +00:00
matt
3ab02a8704 More #include <stdlib.h> string, etc. cleanup 2000-07-04 20:27:35 +00:00
fvdl
a17451fec8 Plug memory leak in error case (would have happened very rarely). 2000-06-22 13:55:18 +00:00