summaryrefslogtreecommitdiff
path: root/src/sdpd-server.c
Commit message (Collapse)AuthorAgeFilesLines
* sdpd: Fix leaking buffers stored in cstates cacheLuiz Augusto von Dentz2021-11-121-10/+10
| | | | | | | | | | | | | | These buffer shall only be keep in cache for as long as they are needed so this would cleanup any client cstates in the following conditions: - There is no cstate on the response - No continuation can be found for cstate - Different request opcode - Respond with an error - Client disconnect Fixes: https://github.com/bluez/bluez/security/advisories/GHSA-3fqg-r8j5-f5xq
* src: Inclusive language changesArchie Pusaka2021-09-211-4/+4
| | | | | | | | | | | | BT core spec 5.3 promotes the usage of inclusive languages. This CL replaces some terms with the more appropriate counterparts, such as "central", "peripheral", "accept list", and "reject list". Note that some suggestions come from https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf Also use "primary" to refer the global mgmt struct. Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* src: Cleanup deprecated symbolic file permissionsBrian Gix2021-02-231-1/+1
|
* src: Add SPDX License IdentifierTedd Ho-Jeong An2020-09-211-14/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds SPDX License Identifier and removes the license text. ------------------------------------- License COUNT ------------------------------------- LGPL-2.1-or-later : 62 GPL-2.0-or-later : 51 BSD-2-Clause : 2 License: LGPL-2.1-or-later src/adv_monitor.c src/adv_monitor.h src/shared/mainloop-glib.c src/shared/btp.c src/shared/tester.c src/shared/btsnoop.c src/shared/gatt-helpers.h src/shared/log.h src/shared/util.h src/shared/mainloop-ell.c src/shared/hci-crypto.c src/shared/mainloop.c src/shared/hfp.h src/shared/mainloop-notify.c src/shared/io-mainloop.c src/shared/btsnoop.h src/shared/uhid.h src/shared/util.c src/shared/ringbuf.c src/shared/btp.h src/shared/shell.h src/shared/io-glib.c src/shared/queue.h src/shared/gatt-server.h src/shared/crypto.c src/shared/crypto.h src/shared/io-ell.c src/shared/timeout-glib.c src/shared/mgmt.c src/shared/gatt-db.c src/shared/mainloop-notify.h src/shared/hfp.c src/shared/timeout-ell.c src/shared/shell.c src/shared/hci.c src/shared/log.c src/shared/ringbuf.h src/shared/gatt-helpers.c src/shared/queue.c src/shared/tty.h src/shared/timeout-mainloop.c src/shared/tester.h src/shared/gap.h src/shared/mgmt.h src/shared/gatt-db.h src/shared/uhid.c src/shared/mainloop.h src/shared/timeout.h src/shared/att-types.h src/shared/pcap.c src/shared/gap.c src/shared/att.c src/shared/pcap.h src/shared/hci.h src/shared/gatt-client.h src/shared/io.h src/shared/gatt-client.c src/shared/ad.c src/shared/att.h src/shared/gatt-server.c src/shared/hci-crypto.h src/shared/ad.h License: GPL-2.0-or-later src/attrib-server.h src/advertising.h src/textfile.c src/attrib-server.c src/uinput.h src/log.h src/eir.h src/sdpd.h src/sdpd-request.c src/service.h src/sdpd-database.c src/adapter.h src/plugin.h src/uuid-helper.h src/plugin.c src/main.c src/sdp-xml.c src/error.h src/oui.c src/device.c src/agent.h src/sdp-client.c src/oui.h src/device.h src/gatt-database.c src/error.c src/backtrace.c src/sdpd-server.c src/adapter.c src/log.c src/agent.c src/backtrace.h src/sdp-xml.h src/hcid.h src/dbus-common.h src/uuid-helper.c src/storage.c src/profile.c src/advertising.c src/storage.h src/dbus-common.c src/profile.h src/sdpd-service.c src/eir.c src/sdp-client.h src/gatt-database.h src/gatt-client.h src/rfkill.c src/gatt-client.c src/service.c src/textfile.h License: BSD-2-Clause src/shared/ecc.h src/shared/ecc.c
* build: Move declaration of _GNU_SOURCE back into individual source filesMarcel Holtmann2018-12-061-0/+1
|
* core: Fix wrong expectations for the return of recv()Vinicius Costa Gomes2016-08-121-1/+1
| | | | | | | | | | | | Since commit b5f34f9420b50 "Bluetooth: Fix bt_sock_recvmsg return value" in the kernel, Bluetooth sockets of type SOCK_SEQPACKET, when read() will return the size of the packet received, which can be larger than the the buffer passed by user space. In this case the problem was causing a disconnection soon after the reception of an SDP request. Reported by: Alban Browaeys <prahal@yahoo.com>
* core: Start SDP server only for BR/EDR or dual mode operationMarcel Holtmann2015-11-081-2/+1
|
* core: Use local libbluetooth includesMarcel Holtmann2015-02-281-6/+5
|
* sdp: Add initial support for MPSSzymon Janc2015-02-171-0/+1
| | | | | | | | | | | | | This allows to register Multi Profile Specification record with proper MPSD bits set depending on currently registered services. Service Name: Multi Profile Service RecHandle: 0x10001 Service Class ID List: "" (0x113b) Profile Descriptor List: "" (0x113a) Version: 0x0100
* sdp: Fix requests with invalid sizeArtem Rakhov2014-06-301-1/+5
| | | | | | | | | | | | | | | | | | This patch fixes processing of SDP requests which have wrong PDU size in header. Every SDP request consists of two parts: header and data. Header always contains 3 values: request code (identifies it's type), transaction ID (in order to match response with request), and data's size. According to Bluetooth specification, when the data's size is wrong, SDP server should return SDP_ErrorResponse with "Invalid PDU Size" parameter. But now the server doesn't respond at all, and corresponding socket on client's side crashes. The patch actually reverts commit 388761cdc8f8a1293bb0b1a5bd576b5fb41616ca, because the size of request should be checked inside handle_request() function in order to be able to respond with SDP_ErrorResponse, instead of stopping the connection.
* Don't register Device ID record on sdp server startSzymon Janc2013-10-101-5/+0
| | | | | | | This makes SDP code no longer depends on main_opts. DID record is now registered from main() after sdp server was started. This is OK since mainloop is not yet running and record will be present when first request comes.
* sdp: Check for correct pkt size received instead of errorAndrei Emeltchenko2013-10-021-1/+1
| | | | Check that the full header is received in recv().
* sdp: Check correct number of bytes received in recvAndrei Emeltchenko2013-09-181-1/+1
| | | | Instead of checking for error check that correct number of bytes received.
* core: Remove redundant includes from sdpd-*.cFrederic Danis2013-07-121-3/+0
|
* core: Avoid using main_opts structure inside SDP service handlingMarcel Holtmann2013-01-031-1/+2
|
* core: Limit SDP unix socket to owner and group accessMarcel Holtmann2012-12-221-1/+1
|
* Revert "Ensure config.h is included by using CPPFLAGS"Johan Hedberg2012-12-071-0/+4
| | | | | | | | | | | | | | This reverts commit 8a03376544b046a84301847d1594f6c3674983ff. The patch needs to be split up and the gdbus/ changes were bogus compared to the original commit message. Conflicts: Makefile.am Makefile.obexd profiles/cyclingspeed/cyclingspeed.c profiles/heartrate/heartrate.c src/error.c
* Ensure config.h is included by using CPPFLAGSLucas De Marchi2012-12-051-4/+0
| | | | | | | | | | Instead of trying to include config.h in each file over the tree and possibly forgetting to include it, give a "-include config.h" argument to the compiler so it's guaranteed that a) it will be included for all source files and b) it will be the first header included. gdbus/ directory is left out, since it would break other projects using it.
* Parse config DeviceID string on bluetoothd startupSzymon Janc2012-03-281-15/+4
| | | | | | | Instead of parsing config DeviceID string on sdp server startup, parse it in main while reading config file. This allow to store logical DID values in main_opts (instead of raw config string) and make use of them in bluetoothd code.
* Fix closing of SDP server socketsJohan Hedberg2010-12-271-14/+19
| | | | | | | | | | | The existing code relied on set_close_on_unref which doesn't work as long as the io watch callbacks hold on to their own reference. To fix this it's better to track the watch id's instead of the IO channels and do g_source_remove instead of g_io_channel_unref. This isn't a particularly critical fd leak since these are created once on bluetoothd startup and closed on exit, however they do help clean up the valgrind fd-leak report.
* Move logging.{c,h} to log.{c,h}Gustavo F. Padovan2010-05-211-1/+1
| | | | Try to make log stuff more similar to ConnMan and oFono.
* Add missing check for listen returnLuiz Augusto Von Dentz2010-03-241-2/+8
|
* Update copyright informationMarcel Holtmann2010-01-011-1/+1
|
* Fix memory leakJohan Hedberg2009-02-241-0/+1
|
* Minor whitespace fixesJohan Hedberg2009-02-241-1/+1
|
* Update copyright informationMarcel Holtmann2009-01-011-1/+1
|
* Move hcid to src directory and rename it to bluetoothdMarcel Holtmann2008-07-291-0/+280