Commit Graph

27 Commits

Author SHA1 Message Date
plunky 516fe55a41 fix offset/indent of list 2017-12-21 08:59:27 +00:00
christos a80110f6b6 need <sys/stat.h> 2017-01-10 21:08:48 +00:00
riastradh 6cb10275d0 Merge riastradh-drm2 to HEAD. 2014-03-18 18:20:35 +00:00
wiz d860f590d4 Fix typo ("then" instead of "than") 2013-12-09 09:35:16 +00:00
wiz a5684d07dd Use Mt for email addresses. 2013-07-20 21:39:55 +00:00
christos d97d3aebdc - use poll() instead of select()
- make everything static
- knf
- consistently check for == -1 for syscall errors
- isatty(fd) == tcgetattr(fd), don't do it twice
- make error messages more consistent
- use sig_atomic_t for variable set inside signal handler
2011-07-18 21:51:06 +00:00
plunky 412b8db41e only modify the termios structure when tty_in is verifiably a terminal 2011-07-18 15:44:17 +00:00
wiz 5140adc8f3 Sort sections. 2010-11-03 12:21:50 +00:00
plunky a4d969557b In server mode, relax the requirement to specify a channel number. If
one is not given, attempt to allocate the first unused one.
2010-11-03 08:27:27 +00:00
plunky ff185da4c9 -s can be used in server mode too 2010-11-02 19:44:09 +00:00
plunky 48b6f8e46b Add a new feature, allow to specify an alternative PSM value for the
RFCOMM protocol to use in client or server mode. Also, handle the case
where service search of the remote device returns non-standard PSM.
2009-09-24 18:30:37 +00:00
plunky 9b85369a0a use system provided MAX(a, b) macro instead of defining our own 2009-05-21 14:44:01 +00:00
plunky a092292999 update rfcomm_sppd to use the new Service Discovery API 2009-05-12 18:43:35 +00:00
plunky 8cea406d3c does no longer need libsdp 2009-05-12 13:13:34 +00:00
plunky 539b5ab318 Ensure that these programs continue to build while I am in the
process of updating the Service Discovery Protocol API.
2009-05-07 18:08:55 +00:00
lukem 98e5374ccb Remove the \n and tabs from the __COPYRIGHT() strings.
Tweak to use a consistent format.
2008-07-21 14:19:20 +00:00
wiz 8ed18604e6 Drop trailing whitespace. Fix typo and casing. 2007-12-02 20:41:40 +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
dsl 858e924206 Fix 64bit build, strlen() doesn't return int. 2007-04-21 10:39:30 +00:00
plunky f5db72e7b7 Add 'service level' security for L2CAP and RFCOMM connections, following
the Linux (BlueZ) API.

    - L2CAP or RFCOMM connections can require the baseband radio link
    mode be any of:
	authenticated (devices are paired)
	encrypted (implies authentication)
	secured (encryption, plus generate new link key)

    - for sockets, the mode is set using setsockopt(2) and the socket
    connection will be aborted if the mode change fails.

    - mode settings will be applied during connection establishment, and
    for safety, we enter a wait state and will only proceed when the mode
    settings are successfuly set.

    - It is possible to change the mode on already open connections, but
    not possible to guarantee that data already queued (from either end)
    will not be delivered. (this is a feature, not a bug)

    - bthidev(4) and rfcomm_sppd(1) support "auth", "encrypt" and
    "secure" options

    - btdevctl(8) by default enables "auth" for HIDs, and "encrypt" for
    keyboards (which are required to support it)
2007-04-21 06:15:22 +00:00
plunky 89f52265ce fix warnings produced by -Wextra
fix warnings produced by lack of const
2007-03-31 07:14:44 +00:00
plunky ca0b33b2ff cut and paste error meant you could only use "-s <num>" as the last
option on the commandline..
2007-03-08 19:13:14 +00:00
plunky e55e3c248c only turn off input processing if it is on 2007-03-08 19:10:49 +00:00
plunky d7e75bcc12 rework the -c and -s options to make them a bit more consistent.
when EOF is reached, we are done.
2007-03-01 21:44:30 +00:00
wiz c8db62531e Sort sections. New sentence, new line. 2007-02-01 06:54:40 +00:00
plunky defc1075ef This comprises a rewrite, which
- adds a server mode for incoming bluetooth connections
	- does not cfmakeraw the slave tty as this caused problems
	- does not hold open the slave tty as this prevented multiple opens
	- modifies the termios for stdio so that this can be used directly
	  by a user.
2007-01-31 08:12:21 +00:00
gdamore a5c89047c0 Initial import of bluetooth stack on behalf of Iain Hibbert. (plunky@,
NetBSD Foundation Membership still pending.)  This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.
2006-06-19 15:44:33 +00:00