aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/rpcbind
Commit message (Collapse)AuthorAgeFilesLines
* Fix typos - remove duplicate "the".Rebecca Cran2011-02-211-1/+1
| | | | | | | | | PR: bin/154928 Submitted by: Eitan Adler <lists at eitanadler.com> MFC after: 3 days Notes: svn path=/head/; revision=218909
* Revert bogus change that snuck into r203972.Warner Losh2010-02-171-2/+0
| | | | Notes: svn path=/head/; revision=203984
* The NetBSD Foundation has given permission to remove clause 3 and 4Warner Losh2010-02-161-7/+2
| | | | | | | | | from their liceense. Obtained from: NetBSD Notes: svn path=/head/; revision=203972
* When you have multiple addresses on the same network on differentWarner Losh2010-02-093-12/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | interfaces (such as when you are part of a carp pool), and you run rpcbind -h to restrict which interfaces have rpc services, rpcbind can none-the-less return addresses that aren't in the -h list. This patch enforces the rule that when you specify -h on the command line, then services returned from rpcbind must be to one of the addresses listed in -h, or be a loopback address (since localhost is implicit when running -h). The root cause of this is the assumption in addrmerge that there can be only one interface that matches a given network IP address. This turns out not to be the case. To retain historical behavior, I didn't try to fix the routine to prefer the address that the request came into, since I didn't know the side effects that might cause in the normal case. My quick analysis suggests that it wouldn't be a problem, but since this code is tricky I opted for the more conservative patch of only restricting the reply when -h is in effect. Hence, this change will have no effect when you are running rpcbind without -h. Reviewed by: alfred@ Sponsored by: iX Systems MFC after: 2 weeks Notes: svn path=/head/; revision=203710
* Initialize fromlen before calling recvfrom to avoid passing in randomWarner Losh2010-02-071-0/+1
| | | | | | | | | stack garbage. Obtained from: NetBSD 1.13 Notes: svn path=/head/; revision=203604
* The last big commit: let usr.sbin/ use WARNS=6 by default.Ed Schouten2010-01-021-0/+2
| | | | Notes: svn path=/head/; revision=201390
* No network addresses in the system isn't a good excuseYaroslav Tykhiy2008-02-141-4/+4
| | | | | | | | | | | | for rpcbind(8) to crash. The crash was due to a boolean variable initialized improperly. Besides fixing the initialization, pick a better name for the variable so that its meaning is clear and no more coding errors appear around it. Notes: svn path=/head/; revision=176290
* Cleanup of userland __P useKevin Lo2007-11-079-100/+100
| | | | Notes: svn path=/head/; revision=173412
* Avoid leaking file descriptorsMatteo Riondato2007-10-231-3/+7
| | | | Notes: svn path=/head/; revision=172901
* Remove a comment I forgot to removeMatteo Riondato2007-06-091-1/+1
| | | | Notes: svn path=/head/; revision=170457
* Correctly inizialize local/unix transport. I broke it in rev.1.15.Matteo Riondato2007-05-011-97/+162
| | | | | | | | PR: bin/1122566 MFC after: 1 week Notes: svn path=/head/; revision=169174
* 1)Make it possible for rpcbind(8) to bind TCP listening socket to an IPMatteo Riondato2007-04-232-236/+181
| | | | | | | | | | | | | | | other than INADDR_ANY. 2) Add the -6 option to specify "IPv6 only". Glanced at by: bms Requested by: bms [2] PR: bin/84494 [1] Approved by: silence from maintainer (~2 weeks) [1] MFC after: 2 weeks Notes: svn path=/head/; revision=168969
* Bump .Dd for revision 1.8.Ceri Davies2006-11-301-1/+1
| | | | Notes: svn path=/head/; revision=164774
* o Xr netconfig(5).Maxim Konovalov2006-11-291-0/+1
| | | | | | | | | PR: docs/105720 Submitted by: koitsu MFC after: 1 week Notes: svn path=/head/; revision=164746
* Reimplementation of world/kernel build options. For details, see:Ruslan Ermilov2006-03-171-1/+2
| | | | | | | | | | | http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061725.html The src.conf(5) manpage is to follow in a few days. Brought to you by: imp, jhb, kris, phk, ru (all bugs are mine) Notes: svn path=/head/; revision=156813
* Remove including of libc sources. All the required functionsDaniel Eischen2006-03-101-8/+2
| | | | | | | | are exported by libc with prototypes in our standard headers. I guess at one time this was necessary, but not any longer. Notes: svn path=/head/; revision=156528
* Don't build IPv6 support if NO_INET6 was definedMatteo Riondato2006-03-061-1/+5
| | | | | | | | | PR: kern/73865 Submitted by: Jeremy Chadwick <freebsd@jdc.parodius.com> MFC after: 3 days Notes: svn path=/head/; revision=156337
* Sort sections.Ruslan Ermilov2005-01-181-3/+3
| | | | Notes: svn path=/head/; revision=140442
* Reflect that -h takes an argument and belatedly bump .Dd for addition of -hDima Dorfman2004-11-071-3/+4
| | | | Notes: svn path=/head/; revision=137328
* Make the usage message match reality about -h and -w.Dima Dorfman2004-11-071-2/+10
| | | | Notes: svn path=/head/; revision=137327
* MFNetBSDMartin Blapp2004-08-161-1/+5
| | | | | | | | | | Decrease log severity to debug if a protocol is not supported by the kernel (rpcbind checks /etc/netconfig if a protocol is available). This avoids "rpcbind: cannot create socket for tcp6" messages at startup on IPv4-only kernels. Notes: svn path=/head/; revision=133789
* Don't pass NULL as an integer.Martin Blapp2003-10-291-1/+1
| | | | | | | Obtained from: NetBSD Notes: svn path=/head/; revision=121657
* Don't compare a char to NULL.Martin Blapp2003-10-292-3/+3
| | | | | | | Obtained from: NetBSD Notes: svn path=/head/; revision=121656
* style.Makefile(5)David E. O'Brien2003-04-041-1/+1
| | | | Notes: svn path=/head/; revision=113091
* Implement nonblocking tpc-connections. rpcgen -m does stillMartin Blapp2003-01-162-5/+14
| | | | | | | | | | | produce backcompatible code. Reviewed by: rwatson Obtained from: NetBSD MFC after: 1 day Notes: svn path=/head/; revision=109363
* Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,Jens Schweikhardt2003-01-013-6/+6
| | | | | | | especially in troff files. Notes: svn path=/head/; revision=108533
* Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/Jens Schweikhardt2002-12-301-1/+1
| | | | | | | Add FreeBSD Id tag where missing. Notes: svn path=/head/; revision=108470
* Change the name for the local unix-socket based protocolMartin Blapp2002-12-162-6/+13
| | | | | | | | | | | | from "unix" back to "local". Add some compat stuff so both ways work for some time. Reviewed by: phk Approved by: imp (UPDATING) Requested by: iedowse, lukem@netbsd.org Notes: svn path=/head/; revision=107952
* Check if rpcbind is already running and print a warning.Martin Blapp2002-12-101-0/+13
| | | | | | | | | | | | Fixes segfault if rpcbind is started up a second time. Solution has been taken from mountd(8). Reviewed by: phk Approved by: re (rwatson) Notes: svn path=/head/; revision=107725
* mdoc(7) police:Ruslan Ermilov2002-11-271-6/+12
| | | | | | | | | | Added the -h option to the synopsis, documented the -a option, sorted options descriptions according to style(9). Approved by: re Notes: svn path=/head/; revision=107313
* Add 'break' to empty 'default' 'switch' statements.Alfred Perlstein2002-10-071-4/+4
| | | | | | | Requested by: mike Notes: svn path=/head/; revision=104593
* WARNS=3 safety (mostly), use __unused for unused params and unsigned whereAlfred Perlstein2002-10-0710-40/+40
| | | | | | | needed to avoid warnings about comparing signed and unsigned values. Notes: svn path=/head/; revision=104592
* fix line wrap.Alfred Perlstein2002-10-071-15/+30
| | | | Notes: svn path=/head/; revision=104590
* cast xdr_rpcblist_ptr to xdrproc_t to silence warnings.Alfred Perlstein2002-10-071-4/+4
| | | | Notes: svn path=/head/; revision=104589
* Add ';' after 'default:' labels to avoid 'deprecated use of label at endAlfred Perlstein2002-10-071-0/+4
| | | | | | | of compound statement' warnings. Notes: svn path=/head/; revision=104588
* Don't pass a NULL pointer to syslog(3).Alfred Perlstein2002-10-071-0/+1
| | | | | | | Submitted by: kris Notes: svn path=/head/; revision=104587
* use IPV6_V6ONLY instead of non standard IPV6_BINDV6ONLY.Hajimu UMEMOTO2002-07-221-1/+1
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=100505
* The .Nm utilityPhilippe Charnier2002-07-141-6/+9
| | | | Notes: svn path=/head/; revision=99968
* Add -h option to rpcbind, used to specify what address to bind to forAlfred Perlstein2002-07-112-51/+223
| | | | | | | | | UDP requests. Submitted by: mbr Notes: svn path=/head/; revision=99774
* Stop this program's abuse of malloc(3). Its return value doesn't need theseJuli Mallett2002-05-174-17/+14
| | | | | | | | ugly explicit casts, and its argument doesn't need explicitly cast to u_int, especially if sizeof() is being used. Notes: svn path=/head/; revision=96788
* Capitalize the first word in sentences, and put periods at the end ofDima Dorfman2001-08-201-3/+3
| | | | | | | sentences. Notes: svn path=/head/; revision=81929
* Perform a major cleanup of the usr.sbin Makefiles.David E. O'Brien2001-07-201-10/+10
| | | | | | | | These are not perfectly in agreement with each other style-wise, but they are orders of orders of magnitude more consistent style-wise than before. Notes: svn path=/head/; revision=80029
* Free things in the right orderBrian Somers2001-07-161-1/+1
| | | | Notes: svn path=/head/; revision=79806
* This is a selection of essentially cosmetic changes:Ian Dowse2001-07-142-38/+42
| | | | | | | | | | | | | | | | | - Use '\0' for a char instead of NULL. - Explicitly compare against the global `nullstring' to determine if a non-NULL uaddr is not malloc'd. - Remove some unnecessary casting of the argument to free(). - In rpcbproc_callit_com(), move the freeing of m_uaddr to the cleanup code at the end of the function. - To avoid confusion and possible alignment problems, change netbufdup() to allocate the netbuf struct and the sockaddr buffer separately, and change netbuffree() accordingly. This makes it produce netbufs that are consistent with all other netbufs in rpcbind. Notes: svn path=/head/; revision=79723
* Fix a memory leak in check_bound() by freeing the buffer area ofIan Dowse2001-07-141-0/+2
| | | | | | | the netbuf before freeing the netbuf structure itself. Notes: svn path=/head/; revision=79722
* Add missing #include <stdio.h>.Ian Dowse2001-07-141-1/+2
| | | | | | | | Fix an off-by-one error in logit() when determining if a procedure number has a known name. Notes: svn path=/head/; revision=79721
* Simplify to bitmaskcmp() to use the obvious approach instead ofIan Dowse2001-07-141-22/+19
| | | | | | | | | | | | | | | comparing bit by bit. Make the logic in in6_fillscopeid() match that in our ifconfig(8): only set the scope ID if there is one in the address and none in sin6_scope_id. Correct a comment in network_init() that didn't make sense; it was probably never updated after it was pasted from similar code in addrmerge(). Notes: svn path=/head/; revision=79720
* Use snprintf instead of sprintf.Ian Dowse2001-07-141-4/+5
| | | | Notes: svn path=/head/; revision=79719
* Avoid a harmless compiler warning, and add a missing \n to aIan Dowse2001-07-141-1/+3
| | | | | | | | | debugging fprintf. Submitted by: Martin Blapp <mb@imp.ch> Notes: svn path=/head/; revision=79718
* Clean up the addrmerge() function, which was over-complicated andIan Dowse2001-06-241-136/+120
| | | | | | | | | | | | | | | | | | | | contained a number of memory leaks. The changes include: - Add a comment describing what addrmerge() does. - Deal with 0.0.0.0./::. or AF_LOCAL callers correctly. - Use rpcbind_get_conf() instead of getnetconfigent() so we don't have to remember to free the returned netconfig struct. - Make just one pass through the ifaddrs list; we can pick up a fallback interface address in the same pass as the netmask comparison. - Define and use SA2SIN* macros to avoid the need for loads of protocol-specific local variables. - Use mostly protocol-independent code for building the netbuf version of the address to be returned. - Use the common cleanup code for virtually all error and non-error cases, fixing a number of memory leaks. Notes: svn path=/head/; revision=78705