| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
This patch fixes the unchecked return value(CWE-252) issues reported by
the Coverity.
|
|
|
|
|
|
|
| |
Some PTS clients do not send all the mandatory apparams
when retrieving the phonebook. Clients such as car multimedia systems
cannot be fixed, therefore working around this issue by inserting
default apparams which makes these clients work as well.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Modernize PBAP phonebook-ebook plugin for newer libebook version
of the Evolution Data Server.
The ebook plugin was introduced during GSoC 2011 [1] and allows
BlueZ to share contacts stored in the Evolution Data Server to
connected clients such as car multimedia systems.
With the rise of Mobile Linux thanks to the PinePhone and Librem 5,
this plugin was modernized to compile with newer libebook versions
because the API was changed [2].
[1] http://www.bluez.org/gsoc-eds-backend-of-phonebook-access-profilepbap/
[2] https://wiki.gnome.org/Apps/Evolution/ESourceMigrationGuide
|
|
|
|
|
|
|
|
|
| |
This patch fixes a couple memory leaks.
In filesystem, g_file_get_contents allocates fresh memory to buf.
It needs to be freed after conversion to a GString object.
Destination was missed on an error path as is mld.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
obexd/src/main.c: In function 'main':
obexd/src/main.c:237:13: warning: Deprecated pre-processor symbol
237 | if (g_thread_supported() == FALSE)
| ^~~~~~~~~~~~~~~~~~~~~~~
obexd/src/main.c:238:3: warning: 'g_thread_init' is deprecated
[-Wdeprecated-declarations]
238 | g_thread_init(NULL);
| ^~~~~~~~~~~~~
In file included from /usr/include/glib-2.0/glib.h:111,
from obexd/src/main.c:31:
/usr/include/glib-2.0/glib/deprecated/gthread.h:261:10: note: declared here
261 | void g_thread_init (gpointer vtable);
| ^~~~~~~~~~~~~
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds SPDX License Identifier and removes the license text.
-------------------------------------
License COUNT
-------------------------------------
GPL-2.0-or-later : 65
License: GPL-2.0-or-later
obexd/src/mimetype.c
obexd/src/transport.h
obexd/src/server.c
obexd/src/obex.c
obexd/src/log.h
obexd/src/service.h
obexd/src/plugin.h
obexd/src/plugin.c
obexd/src/main.c
obexd/src/mimetype.h
obexd/src/transport.c
obexd/src/obexd.h
obexd/src/obex.h
obexd/src/obex-priv.h
obexd/src/log.c
obexd/src/map_ap.h
obexd/src/manager.c
obexd/src/service.c
obexd/src/server.h
obexd/src/manager.h
obexd/plugins/opp.c
obexd/plugins/vcard.h
obexd/plugins/pbap.c
obexd/plugins/vcard.c
obexd/plugins/messages.h
obexd/plugins/phonebook.h
obexd/plugins/pcsuite.c
obexd/plugins/messages-tracker.c
obexd/plugins/phonebook-tracker.c
obexd/plugins/irmc.c
obexd/plugins/ftp.c
obexd/plugins/ftp.h
obexd/plugins/filesystem.c
obexd/plugins/messages-dummy.c
obexd/plugins/phonebook-ebook.c
obexd/plugins/syncevolution.c
obexd/plugins/bluetooth.c
obexd/plugins/phonebook-dummy.c
obexd/plugins/filesystem.h
obexd/plugins/mas.c
obexd/client/transport.h
obexd/client/opp.c
obexd/client/pbap.c
obexd/client/transfer.h
obexd/client/opp.h
obexd/client/driver.c
obexd/client/map-event.h
obexd/client/bluetooth.h
obexd/client/sync.h
obexd/client/transport.c
obexd/client/pbap.h
obexd/client/driver.h
obexd/client/transfer.c
obexd/client/ftp.c
obexd/client/map.h
obexd/client/ftp.h
obexd/client/bluetooth.c
obexd/client/manager.c
obexd/client/session.h
obexd/client/session.c
obexd/client/map.c
obexd/client/sync.c
obexd/client/map-event.c
obexd/client/mns.c
obexd/client/manager.h
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A fd is duplicated if dbus type is unix fd, and then it is not closed
even after the file is finished transporting. In the end obexd can not
transport due to the limitation of open-able fd as below.
Warning: invalid file descriptor 1031 in syscall fcntl(DUPFD_CLOEXEC)()
FILE DESCRIPTORS: 1021 open at exit.
Open pf-31 socket 1023:
at 0x5061F1F: fcntl_common (fcntl.c:46)
by 0x5061F1F: fcntl (fcntl.c:79)
by 0x52A1C3D: _dbus_dup (in /lib/x86_64-linux-gnu/libdbus-1.so.3.14.13)
by 0x528C7B8: dbus_message_iter_get_basic (in /lib/x86_64-linux-gnu/libdbus-1.so.3.14.13)
by 0x149E04: profile_new_connection (bluetooth.c:136)
by 0x18AAF2: process_message.isra.3 (object.c:259)
by 0x18B364: generic_message (object.c:1079)
by 0x5290FD2: ??? (in /lib/x86_64-linux-gnu/libdbus-1.so.3.14.13)
by 0x5282623: dbus_connection_dispatch (in /lib/x86_64-linux-gnu/libdbus-1.so.3.14.13)
by 0x1852FF: message_dispatch (mainloop.c:72)
by 0x5505E24: g_main_context_dispatch (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.5400.1)
by 0x55061EF: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.5400.1)
by 0x5506501: g_main_loop_run (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.5400.1)
|
| |
|
|
|
|
|
| |
g_build_filename() returns a newly-allocated string
that must be freed with g_free().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For messages dummy, message listing functionality in implemented in
this patch. The inputs for message listing is derived from the
mlisting.xml file that is to be present in each folder(inbox, sent,
drafts)
> ACL Data RX: Handle 256 flags 0x02 dlen 78
Channel: 64 len 74 [PSM 3 mode 0] {chan 0}
RFCOMM: Unnumbered Info with Header Check (UIH) (0xef)
Address: 0x83 cr 1 dlci 0x20
Control: 0xff poll/final 1
Length: 69
FCS: 0xc4
Credits: 1
83 00 45 cb 00 00 00 02 01 00 0d 00 73 00 65 00 ..E.........s.e.
6e 00 74 00 00 42 00 18 78 2d 62 74 2f 4d 41 50 n.t..B..x-bt/MAP
2d 6d 73 67 2d 6c 69 73 74 69 6e 67 00 4c 00 18 -msg-listing.L..
01 02 00 0b 02 02 00 00 13 01 ff 06 01 00 07 00 ................
08 00 09 01 00 c4 ......
< ACL Data TX: Handle 256 flags 0x00 dlen 1017
Channel: 65 len 1013 [PSM 3 mode 0] {chan 0}
RFCOMM: Unnumbered Info with Header Check (UIH) (0xef)
Address: 0x81 cr 0 dlci 0x20
Control: 0xef poll/final 0
Length: 28675
FCS: 0x02
90 08 63 4c 00 21 12 02 00 0b 19 15 32 30 31 37 ..cL.!......2017
30 36 31 32 54 31 32 32 35 31 33 2d 20 35 33 30 0612T122513- 530
00 0d 01 00 48 08 3f 3c 4d 41 50 2d 6d 73 67 2d ....H.?<MAP-msg-
6c 69 73 74 69 6e 67 20 76 65 72 73 69 6f 6e 3d listing version=
22 31 2e 30 22 3e 3c 6d 73 67 20 68 61 6e 64 6c "1.0"><msg handl
65 3d 22 30 34 30 30 30 30 30 30 30 30 30 30 30 e="0400000000000
30 31 32 22 20 73 75 62 6a 65 63 74 3d 22 4e 6f 012" subject="No
22 20 64 61 74 65 74 69 6d 65 3d 22 32 30 31 37 " datetime="2017
30 35 32 34 54 31 37 30 31 35 37 22 20 73 65 6e 0524T170157" sen
64 65 72 5f 61 64 64 72 65 73 73 69 6e 67 3d 22 der_addressing="
22 20 72 65 63 69 70 69 65 6e 74 5f 61 64 64 72 " recipient_addr
65 73 73 69 6e 67 3d 22 35 34 33 32 31 22 20 74 essing="54321" t
79 70 65 3d 22 53 4d 53 5f 47 53 4d 22 20 72 65 ype="SMS_GSM" re
63 65 70 74 69 6f 6e 5f 73 74 61 74 75 73 3d 22 ception_status="
63 6f 6d 70 6c 65 74 65 22 20 61 74 74 61 63 68 complete" attach
6d 65 6e 74 5f 73 69 7a 65 3d 22 30 22 2f 3e 0a ment_size="0"/>.
... and more
|
|
|
|
|
|
|
| |
In messages-dummy it is not necessary to add parent folder in the
response to folder-lisintg. when tested with some carkit the present
method is not working when navigating to different folders. so removing
it.
|
|
|
|
|
|
| |
vobject_list_get_next_header shall only attempt to call
g_obex_apparam_encode otherwise it will just keep adding the same tag
in a loop.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remote device is not able to fetch call logs from different folder.
It always returns the call logs requested in first request.
Considering a situation to fetch from och and then from cch,
there are two ways to request x-bt/vcard-listing:
Case I:
1. SetPhoneBook to /telecom/och (absolute path)
2. PullvCardListing with name header '' (empty)
Remote devices using this method always calls SetPhoneBook with absolute path
to set the path and we clear the cache when new path is set.
Case II:
1. SetPhoneBook to /telecom (relative path)
2. PullvCardListing with name header 'och'
Remote devices using this method calls SetPhoneBook with '/telecom' only once
and cache is not cleared when second PullvCardListing is made with name header.
This results in cached incorrect list sent to remote device.
Clear cache if name header is present would prevent sending of
cache list as it is not present. Instead it would request to
create new cache based on new name header.
|
|
|
|
| |
omtu and imtu is define as uint16_t in l2cap_get function (use with va_arg).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are two functions in phonebook-dummy that were returning
'int's instead of 'struct dummy_data'
phonebook_create_cache
phonebook_get_entry
As a result, when an obex-client sends the GetSize command, the obexd
on the server segfaults.
Fix this by storing the id and returning the dummy_data struct.
The GetSize test now passes correctly.
|
|
|
|
|
|
|
|
|
|
| |
When the remote device sends the 'CreateFolder' command, obexd
first tries to verify the path in ftp_setpath(). Because we are
creating a new directory, the verify_path() is expected to fail (it does
not exist yet; ENOENT).
Trap that special case and cause the function to fail directly to the
create directory path.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When client queries for the size of a phonebook we fall into a
indefinite loop as g_obex_apparam_encode always returns the same
number of items added to the buffer regardless how often it is
called. In former times where this code wasn't using GObexApparams
a array was reduced each time the headers where added and so we could
easily find out when we've added all headers. However today we need
to solve this a bit differently by also setting the firstpacket flag
when we receive the phonebook size result from the phonebook
implementation which then lets us correctly go through without
falling into a indefinite loop.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The default path is /etc/bluetooth/vcard.vcf which obexd
is not able to access.
obexd[11654]: obexd/src/obex.c:cmd_get() session 0x64edff0
obexd[11654]: GET(0x3), (null)(0xffffffff)
obexd[11654]: obexd/src/obex.c:parse_type() TYPE: text/x-vcard
obexd[11654]: open(/etc/bluetooth/vcard.vcf): Operation not permitted (1)
obexd[11654]: GET(0x3), NOT_FOUND(0x44)
After making this path as obex root folder,
it is able to succeed.
obexd[12246]: obexd/src/obex.c:cmd_get() session 0x64ed830
obexd[12246]: GET(0x3), (null)(0xffffffff)
obexd[12246]: obexd/src/obex.c:parse_type() TYPE: text/x-vcard
obexd[12246]: obexd/src/obex.c:driver_get_headers() name=(null) type=text/x-vcard object=0x8
obexd[12246]: GET(0x3), CONTINUE(0x10)
obexd[12246]: obexd/src/obex.c:send_data() name=(null) type=text/x-vcard file=0x8 size=3061
obexd[12246]: obexd/src/obex.c:driver_read() 73 read
obexd[12246]: obexd/src/obex.c:send_data() name=(null) type=text/x-vcard file=0x8 size=3066
obexd[12246]: obexd/src/obex.c:driver_read() 0 read
obexd[12246]: obexd/src/obex.c:transfer_complete()
|
|
|
|
|
| |
This fix compilation error with musl due to missing (now not needed)
stdint.h include.
|
|
|
|
| |
NULL pointer check for name is done before using the same.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
As described in coding style M10.
|
|
|
|
|
| |
As per spec(5.3.4.4) when MaxListCount headser is missing then
PSE should assume MaxListCount value as MAX (65535)
|
|
|
|
|
| |
Changes made to emit transfer completed to .Transfer1 interface on
ftp reset.
|
|
|
|
| |
This enables transfer management for FTP connections.
|
|
|
|
| |
Changes made to handle method open for mime_notification_registration
|
|
|
|
|
| |
Changes made to add support for MSE local time and timezone offset
parameter along with GetMessageListing response.
|
|
|
|
| |
Add support for the speed-dial and favorite folders.
|
|
|
|
|
|
|
|
|
|
|
|
| |
CC obexd/plugins/obexd-filesystem.o
In file included from obexd/plugins/filesystem.c:40:0:
/usr/include/wait.h:1:2: error: #warning redirecting incorrect
#include <wait.h> to <sys/wait.h> [-Werror=cpp]
#warning redirecting incorrect #include <wait.h> to <sys/wait.h>
^
cc1: all warnings being treated as errors
Makefile:6447: recipe for target 'obexd/plugins/obexd-filesystem.o' failed
make[1]: *** [obexd/plugins/obexd-filesystem.o] Error 1
|
|
|
|
|
| |
outparams can be NULL meaning no application parameters should be added
to the response.
|
|
|
|
|
| |
Some commands don't have any mandatory application parameter which means
inparams can be NULL which should not be treated as a bad request.
|
|
|
|
|
| |
As g_obex_apparam_set_uint16() converts data to big-endian format
internally, do not call htons() prior to it.
|
| |
|
|
|
|
|
|
| |
The old macro PB_LUID_FOLDER had the folder luid on the second level:
/telecom/luid. But the luid folder occurs per IrMC spec on level three
e.g. /telecom/pb/luid.
|
|
|
|
|
|
|
|
| |
This fix following build error:
CC obexd/plugins/obexd-bluetooth.o
obexd/plugins/bluetooth.c:242:6: error: no previous declaration for
‘dict_append_entry’ [-Werror=missing-declarations]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This ix following build errors:
CC obexd/plugins/obexd-bluetooth.o
obexd/plugins/bluetooth.c: In function ‘register_profile_reply’:
obexd/plugins/bluetooth.c:202:10: error: unused variable ‘err’
[-Werror=unused-variable]
obexd/plugins/bluetooth.c: In function ‘name_acquired’:
obexd/plugins/bluetooth.c:367:15: error: unused variable ‘uuid’
[-Werror=unused-variable]
obexd/plugins/bluetooth.c: In function ‘name_released’:
obexd/plugins/bluetooth.c:389:15: error: unused variable ‘uuid’
[-Werror=unused-variable]
obexd/plugins/bluetooth.c: In function ‘bluetooth_start’:
obexd/plugins/bluetooth.c:400:10: error: unused variable ‘ios’
[-Werror=unused-variable]
|
|
|
|
|
|
|
|
|
|
|
|
| |
g_io_channel_unix_new creates a reference which is then passed to
obex_session_start which creates its on reference via g_io_channel_ref
leading to the following leak:
at 0x4A06409: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x3B03C4D89E: g_malloc (in /usr/lib64/libglib-2.0.so.0.3600.3)
by 0x3B03C88224: g_io_channel_unix_new (in /usr/lib64/libglib-2.0.so.0.3600.3)
by 0x418967: profile_new_connection (bluetooth.c:148)
by 0x43D763: process_message.isra.5 (object.c:259)
|
|
|
|
|
|
|
|
|
| |
The error happens whenever RegisterProfile fails the interface is not
unregistered causing any subsequent call to register_profile function
to fail:
obexd[944]: D-Bus failed to register /org/bluez/obex/00005005_0000_1000_8000_0002ee000001
obexd[944]: bluetooth: Failed to register profile (null)
|
|
|
|
|
| |
This replaces dbus_connection_send* with g_dbus_send_message* which do
not alter message order.
|
|
|
|
|
|
|
|
|
| |
The fd needs to be checked as it may not be valid which cause the
following warnings:
==8162== Warning: invalid file descriptor 1031 in syscall fcntl(DUPFD_CLOEXEC)()
(obexd:8162): GLib-WARNING **: giounix.c:412Error while getting flags for FD: Bad file descriptor (9)
|
| |
|
|
|
|
| |
The Session interface wasn't registered when a new transfer arrives.
|
|
|
|
|
| |
Use plain int instead of gint. In glib gint is always a typedef to int,
so it's safe to use it even for callbacks with glib.
|