| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If --enable-mbim-username isn't explicitly used, we should just check for the
root user UID, without using getpwnam(). See e.g. these SELinux warnings:
SELinux is preventing /usr/bin/bash from read access on the file /etc/passwd.
***** Plugin catchall (100. confidence) suggests **************************
If you believe that bash should be allowed read access on the passwd file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do allow this access for now by executing:
# grep mbim-proxy /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
not-opened errors
We're forcing close the MbimDevice whenever we detect a not-opened error; so if we
afterwards get more commands from the clients, don't just timeout the requests, instead
return our own generated function error messages specifying not-opened.
|
| |
|
|
|
|
| |
To be used by the proxy to mimic modem-generated commands.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(mbim-proxy:17046): GLib-CRITICAL **: g_byte_array_remove_range: assertion 'array' failed
Program received signal SIGTRAP, Trace/breakpoint trap.
0x00007ffff7316ae0 in g_logv () from /usr/lib/libglib-2.0.so.0
(gdb) bt
#0 0x00007ffff7316ae0 in g_logv () from /usr/lib/libglib-2.0.so.0
#1 0x00007ffff7316d1f in g_log () from /usr/lib/libglib-2.0.so.0
#2 0x00007ffff72e49ba in g_byte_array_remove_range () from /usr/lib/libglib-2.0.so.0
#3 0x00007ffff7bb126d in parse_response (self=0x618100) at mbim-device.c:642
#4 0x00007ffff7bb151c in data_available (source=0x64ab60, condition=G_IO_IN, self=0x618100) at mbim-device.c:708
#5 0x00007ffff730f91d in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#6 0x00007ffff730fcf8 in ?? () from /usr/lib/libglib-2.0.so.0
#7 0x00007ffff7310022 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#8 0x000000000040153b in main (argc=1, argv=0x7fffffffeac8) at mbim-proxy.c:243
(gdb) fr 3
#3 0x00007ffff7bb126d in parse_response (self=0x618100) at mbim-device.c:642
642 g_byte_array_remove_range (self->priv->response, 0, in_length);
(gdb) p self->priv->response
$1 = (GByteArray *) 0x0
|
|
|
|
| |
within transactions
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The MBIM "Command", "Open" and "Close" request messages can be replied using
either a type specific response (e.g. "Command Done", or "Open Done" or "Close
Done" or instead using a generic "Function Error" message.
In order to ease the users of the library to look for errors in the received
responses, the new mbim_message_response_get_result() method expects
any of those two previous messages.
We also bump version of the library to 1.11.1, to indicate when the new API
was introduced, but this is Not a real release.
|
|
|
|
| |
Or we won't get e.g. NotOpened errors forwarded through the MbimProxy.
|
| |
|
| |
|
|
|
|
|
| |
Fixing a bug in the previous commit to add udev rules for MBIM proxy
devices.
|
|
|
|
|
|
| |
Adding a udev rule to change ownership of all MBIM devices to the
configured user specified at compile time using --enable-mbim-username
flag.
|
|
|
|
|
|
| |
See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=772325
Signed-off-by: Boris Egorov <egorov@linux.com>
|
|
|
|
|
|
|
| |
Allows to check whether the user is allowed to use the MBIM device.
Also fixes mbim_proxy_open() to make sure we always set the GError when FALSE is
returned.
|
|
|
|
|
| |
This shouldn't be a proxy-only setting. We're going to chown the MBIM devices to
this specific user, so we'll re-use this setting for that as well.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, the MBIM proxy process assumes that it is run as root user and
that all incoming client connection users are also root.
However, it's not always preferable to run the MBIM proxy as root for
security reasons. On some platforms, the MBIM proxy could be constrained
to run as a less-privileged user and specially granted the permission to
access the MBIM device. So, adding a compile time flag in libmbim to check
for the specified user, rather than assume it to be the root user. If the flag is
not sent, it'll revert to the existing behaviour of checking for
user=root(i.e UID=0)
|
|
|
|
|
|
| |
The standard timeout/idle methods will attach the sources to the default
context, not the thread default context. So, create the GSources ourselves
and attach them to the thread default context.
|
|
|
|
|
|
|
|
|
| |
If NULL is specified in g_source_attach() it will attach to the default context,
not to the thread-default one if one was given with
g_main_context_push_thread_default().
This caused that MbimDevices started in the non-main thread would still attach
their socket listening sources to the GMainContext in the main thread.
|
| |
|
| |
|
|
|
|
| |
libtool versioning was also updated to reflect the API break.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Currently we're defaulting to enable the standard services list; so whenever
clients want to re-configure their standard services list (e.g. just enabling
some of the indications), we just end up having the full standard list again.
So, avoid multiple re-configures in the device, just compare and only send the
new setup to the device if the global list changes.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Otherwise we'll go writing out of bounds.
|
| |
|
|
|
|
|
|
| |
The size of the standard services list needs to be 1 + the number of services to
include; so explicitly use that logic when computing the size, instead of
relying on another unrelated enum value.
|
|
|
|
| |
Which will be easier to test via unit tests
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
A device being 'gone' doesn't only mean that it was disconnected and we can no
longer talk to it; it may also be that the proxy couldn't perform the full open
sequence and therefore it removes it from its records.
|
| |
|
| |
|
| |
|