History log of /freebsd-10-stable/usr.sbin/bootparamd/bootparamd/bootparamd.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 320780 07-Jul-2017 asomers

MFC r318790, r319336

r318790:
Fix a buffer overflow in bootparamd(8)

If /etc/bootparams contains a line with an excessively long pathname, and a
client asks for that path, then bootparamd will overflow a buffer and crash
while parsing that line. This is not remotely exploitable since it requires
a malformed /etc/bootparams file.

Reported by: Coverity
CID: 1305954
Sponsored by: Spectra Logic Corp

r319336:
Fix uninitialized variable in bootparamd.c

Restore line that was accidentally deleted in change 318790

Reported by: Coverity
CID: 1375855
X-MFC-With: 318790
Sponsored by: Spectra Logic Corp


# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 229403 03-Jan-2012 ed

Replace index() and rindex() calls with strchr() and strrchr().

The index() and rindex() functions were marked LEGACY in the 2001
revision of POSIX and were subsequently removed from the 2008 revision.
The strchr() and strrchr() functions are part of the C standard.

This makes the source code a lot more consistent, as most of these C
files also call into other str*() routines. In fact, about a dozen
already perform strchr() calls.


# 201521 04-Jan-2010 ed

Unbreak bootparamd when setting WITHOUT_NIS.

Submitted by: bf1783 googlemail com


# 175823 30-Jan-2008 rink

Fix bootparamd on 64 bit platforms - at least amd64 was broken due to the
code believing long == 64 bits and using it to store/compare IPv4 addresses.

PR: bin/112163
Submitted by: Tyler Spivey <tspivey@pcdesk.net>
Reviewed by: imp
Approved by: imp (mentor)
MFC after: 1 week


# 173412 07-Nov-2007 kevlo

Cleanup of userland __P use


# 137675 13-Nov-2004 bz

Add knob NO_NIS (fka NO_YP_LIBC) and make world compileable when set.
If turned on no NIS support and related programs will be built.

Lost parts rediscovered by: Danny Braniss <danny at cs.huji.ac.il>
PR: bin/68303
No objections: des, gshapiro, nectar
Reviewed by: ru
Approved by: rwatson (mentor)
MFC after: 2 weeks


# 121554 26-Oct-2003 peter

Make this compile cleanly. Switch to using rpcgen to generate
code that can be compiled on an ansi-C compiler, so that it puts the
xdrproc_t casts in. This also implies a slight function name change.


# 50479 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 36794 09-Jun-1998 imp

o be careful about buffer overflows
o Use snprintf rather than sprintf

This is only lightly tested.


# 30570 19-Oct-1997 joerg

Fix a number of buffer overflow conditions.

PR: bin/4610
Submitted by: David Holland (dholland@burgundy.eecs.harvard.edu)


# 29102 04-Sep-1997 charnier

Use err(3). Add usage and prototypes. Remove Xref: Diskless(8) does not
exist. Use An/Aq macros for Author.


# 22997 22-Feb-1997 peter

Revert $FreeBSD$ to $Id$


# 22954 20-Feb-1997 mpp

#include <string.h> to help silence -Wall.


# 21673 14-Jan-1997 jkh

Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.


# 9718 25-Jul-1995 wpaul

main.c:
- use daemon() to daemonify ourselves
- the 'Usage' printf() was missing an argument
- remove declaration of rindex and #include <string.h> instead

bootparam.c:
- get rid of local declarations of YP functions and include headers
from /usr/include/rpcsvc instead.


# 8857 30-May-1995 rgrimes

Remove trailing whitespace.


# 6752 26-Feb-1995 wpaul

This commit was generated by cvs2svn to compensate for changes in r6751,
which included commits to RCS files with non-trunk default branches.


# 6751 26-Feb-1995 wpaul

Obtained from: The Xkernel source distribution

I hope I'm doing this right.

This is an initial version of bootparamd for FreeBSD based on a public
domain rpc.bootparamd implementation by a gentleman named Klas Heggemann.
This program has apparently been around for a while. The README explicitly
lists the code as public domain, so I guess it's safe to use.

This program is needed for booting diskless SunOS and Solaris machines.
rarpd is also required, but that's in the works too.

I have made two changes to this code:

- Implemented NIS lookups. If /etc/bootparams contains a '+' then the
bootparams map is consulted.

- Allow 0.0.0.0 as a user-specified router address. The SunOS rpc.bootparamd
returns this value in many cases.