Commit Graph

72 Commits

Author SHA1 Message Date
Aleksander Morgado
e7a6bb7504 data,fcc-unlock: add example unlock scripts
Added scripts for Foxconn SDX55, Quectel EM120, and several old Sierra
Wireless manufactured devices:
 * Installed but not used by default, the user needs to setup manual
   links from ${pkgdatadir}/fcc-unlock.available.d, to
   ${pkgsysconfdir}/fcc-unlock.d in order to enable them.
 * Installed with rights only for the owner, so that the dispatcher in
   ModemManager can validate them.
 * They rely on $PATH to find the qmicli/mbimcli tools.

In addition to these scripts, per-vid:pid links are created in the
same ${pkgdatadir}/fcc-unlock.available.d directory, specifying which
are the specific devices that require the FCC unlock operation.

This patch also creates the ${pkgsysconfdir}/fcc-unlock.d and
${pkglibdir}/fcc-unlock.d directories where ModemManager looks for the
enabled tools.

Note that the meson setup doesn't support creating/deleting links
officially yet, so we use a workaround using meson.add_install_script
that is not perfect (i.e. doesn't handle the symlink removal during
uninstall). See https://github.com/mesonbuild/meson/issues/1602
2021-11-18 11:20:41 +01:00
Iñigo Martínez
77d1c24361 build: Port to meson
meson is a build system focused on speed an ease of use, which
helps speeding up the software development. This patch adds meson
support along autotools.
2021-09-07 10:55:43 +00:00
Arnaud Ferraris
d5c16382c5 service: add QIPCRTR address family
With the recently added support for modems using QRTR, ModemManager
needs to have access to the corresponding address family so it can
interact with the modem.

Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
2021-05-21 14:50:07 +02:00
Undef
a381622304 service: Fix Mobile Data on EG25
This allows mobile data to work on the EG25 (and probably other modems).
2021-05-20 11:07:37 +00:00
Michal Mazur
dfc04cbc2e iface-modem-3gpp: define new API to disable facility locks 2021-04-30 18:40:29 +00:00
Aleksander Morgado
10aa516f07 iface-modem-3gpp-profile-manager: new interface for profile management
This interface will provide support for the profile management
operations in different modem types.

This initial commit introduces support for the interface and provides
handlers for the methods that may be called in the interface.
2021-04-29 10:13:22 +00:00
Aleksander Morgado
a74c1c9bd8 data,icon: resize to fit the contents 2021-04-14 13:03:12 +02:00
Aleksander Morgado
09619e8cc4 data: added valgrind suppressions file imported from NM 2019-12-02 13:40:32 +01:00
Aleksander Morgado
55c3f7d3f6 systemd: always start MM after polkit service if enabling policy
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/113
2019-10-11 08:40:37 +00:00
Aleksander Morgado
8a652179de policy: USSD policy requires user authentication in strict mode 2019-09-25 13:08:32 +02:00
Aleksander Morgado
958c243489 polkit,conf: trivial comment update regarding Signal.Setup() 2019-09-25 13:08:32 +02:00
Aleksander Morgado
110f6fd021 polkit,conf: add missing firmware management methods 2019-09-25 13:08:32 +02:00
Aleksander Morgado
2e5af74db8 polkit,conf: add missing OMA methods 2019-09-25 13:08:32 +02:00
Aleksander Morgado
7a7b3aa5cb polkit,time: protect GetNetworkTime() with a new 'Time' policy rule 2019-09-25 13:08:32 +02:00
Aleksander Morgado
be2500b02a polkit,conf: add missing supplementary voice service methods 2019-09-25 12:24:35 +02:00
Aleksander Morgado
01acd9a0d9 polkit,conf: add missing InjectAssistanceData 2019-09-25 12:24:13 +02:00
Aleksander Morgado
9e24d1c12f polkit,conf: add missing SetInitialEpsBearerSettings 2019-09-25 12:23:59 +02:00
Aleksander Morgado
614c7fbc7e polkit,conf: add missing SetEpsUeModeOperation 2019-09-25 12:23:44 +02:00
Aleksander Morgado
f2182a73bf polkit,conf: add missing SetCurrentCapabilities 2019-09-25 12:21:48 +02:00
Aleksander Morgado
3696a009c5 polkit,conf: add missing SetPowerState 2019-09-25 12:21:32 +02:00
Aleksander Morgado
d3e75eec97 policy,conf: use SetCurrentBands instead of SetBands 2019-09-25 12:21:12 +02:00
Mohammed Sadiq
e21e7ddfae policy: Use SetCurrentModes instead of SetAllowedModes
There is no DBus API for SetAllowedModes, but only for SetCurrentModes.
2019-09-24 19:10:31 +05:30
Bob Ham
e34699cc9e policy: Call method name should be SendDtmf rather than SendTone
The method on MMBaseCall is send_tone but the D-Bus method call is
SendDtmf.  Without this patch, calls return
org.freedesktop.DBus.Error.AccessDenied.
2018-12-07 16:47:43 +00:00
Lubomir Rintel
cf3f3ffcd0 service: set User=root so that gio doesn't have to look into /etc/passwd
GVfs' libgvfsdbus.so GIo module, when automatically loaded, attempts to
discover if there's a session D-Bus instance to use. It tries real hard
to get the socket name it would use -- in absence of XDG_RUNTIME_DIR it
decides to make it up with user's home directory. When HOME is unset
too, it just tries to figure it out by looking into /etc/passwd. Which
upsets SELinux that would better not see us looking into it.

We trigger the load of the GIo modules, by using the GFile API to access
the the ports in /dev. They're utterly uesless to us, but there doesn't
seem to be a way to disable their load. Oh well.

For now, let's just ensure HOME is set and the problematic path in glib
is not taken.
2018-06-13 10:32:51 +00:00
Aleksander Morgado
984625165e i18n: deprecate intltool and use only gettext 0.19.8
Instead of mixing both intltool and gettext, which not always work
correctly together, this patch obsoletes intltool and uses only
gettext, which includes support for translating XML files with ITS
rules.

See migration steps for GNOME projects here:
  https://wiki.gnome.org/MigratingFromIntltoolToGettext

The gettext ITS rules for polkit policy files are imported from the
upstream polkit repository. We don't use the polkit-installed rule
files yet because there is no tagged release that contains those files
yet, so we cannot build-depend on any specific polkit version.
  https://bugs.freedesktop.org/show_bug.cgi?id=96940
2017-09-07 13:04:34 +02:00
Aleksander Morgado
d639359320 polkit: add missing Location interface method rules
https://bugs.freedesktop.org/show_bug.cgi?id=102182
2017-08-12 19:39:10 +02:00
Aleksander Morgado
0e854644db systemd: drop After=syslog.target rule
syslog implementations are using socket activation nowadays, so an
explicit ordering is not necessary anymore. Plus, syslog.target was
already dropped from systemd in v198.

Reported-by: Michael Biebl <biebl@debian.org>
2017-06-18 10:01:11 +02:00
Lubomir Rintel
ccea14ac47 systemd: tighten the service security a bit
What's left enabled:

* Access to /dev -- obviously
* CAP_SYS_ADMIN -- this is needed by TIOCSSERIAL only. Too bad this also
  allows TIOCSTI, which allows for code injection unless something else
  (SELinux) disallows access to ttys with shells.
  Maybe kernel should use CAP_SYS_TTY_CONFIG for this.
* socket(AF_NETLINK) -- udev & kernel device changes
* socket(AF_UNIX) -- D-Bus
2016-10-24 13:15:15 +02:00
Aleksander Morgado
c4a584416a core: allow disabling auto-scan and notifying ports one by one via API
This commit enables a new core ModemManager daemon option, so that automatic
detection of available modems is totally disabled: '--no-auto-scan'. Note that
this option also replaces the previously used '--test-no-auto-scan' option,
which was only used during tests.

Along with the new ModemManager option, a new ReportKernelEvent() method in
the API is defined, which allows notifying the daemon of which interfaces it
should be accessing, as well as the main details of each interface. The only
mandatory parameters in the new method are 'action' (add/remove), 'name' (the
name of the interface) and 'subsystem' (the subsystem of the interface).

The mmcli tool has support for using the new api method via several new options:

 * The '--report-kernel-event' option allows specifying device ports one by
   one, and is a direct mapping of the ReportKernelEvent() method:
     $ sudo mmcli --report-kernel-event="action=add,name=wwan0,subsystem=net"
     $ sudo mmcli --report-kernel-event="action=add,name=cdc-wdm0,subsystem=usbmisc"

 * The '--report-kernel-event-auto-scan' option uses udev monitoring to notify
   events automatically to the daemon. This allows to operate in a way
   equivalent to the default daemon operation (with implicit auto-scan).

Worth noting that the ReportKernelEvent() method is only usable when
'--no-auto-scan' is explicitly used in the daemon. An error will be reported if
the method is tried while standard udev monitoring is enabled (implicit if
auto scan isn't explicitly disabled in the daemon).

If mmcli is going to be used only to report 'real time' events, an optional
'--initial-kernel-events=[PATH]' may be given in the ModemManager call to
automatically process a set of port kernel events one by one on boot. The file
may e.g. contain:
  action=add,name=wwan0,subsystem=net
  action=add,name=cdc-wdm0,subsystem=usbmisc
2016-09-29 15:43:05 +02:00
Aleksander Morgado
d5bc19f7db policy: fix minor typo 2015-08-02 10:39:48 +02:00
Aleksander Morgado
69585b1374 polkit: added Voice policy rule 2015-08-02 10:39:48 +02:00
David Herrmann
99da30059f policy: don't prevent us from receiving signals
By using:
    <deny send_destination="org.freedesktop.ModemManager1"/>

..we prevent anyone on the system from sending us signals, even if we
subscribed to them. This is clearly not what this line intended. More
importantly, we silently break mm-auth-provider-polkit, as we never
receiver 'changed' signals via PolkitAuthority. Right now, this is not
required by the implementation of PolkitAuthority, but ModemManager
should not place restrictions on the implementation of external
libraries.

So make sure we only prevent Method-Calls to be sent to us. Any other
message that we didn't expect is automatically discarded by gdbus,
anyway.

Without this change, debugging dbus policies constantly shows messages
that Polkit couldn't send the 'changed' signal to ModemManager. This is
suppressed in non-debugging mode. But it would make debugging a lot
easier, if we'd avoid force-dropping those events and not clutter the
debug-log.
2015-07-15 15:04:43 +02:00
Aleksander Morgado
c8572c8098 polkit: fix Location.Setup() authorization rules 2014-07-11 18:56:37 +02:00
Aleksander Morgado
6bdcd7cb22 data: add icon 2014-03-09 22:15:16 +01:00
Aleksander Morgado
247a945950 context: new '--test-plugin-dir' to allow specifying where the plugins are 2014-02-13 13:41:50 +01:00
Aleksander Morgado
ea362ce18e service,tests: run in MM in debug mode in service tests 2014-02-13 13:41:47 +01:00
Aleksander Morgado
65f87561c5 context: new '--test-enable' to enable the Test interface 2014-02-13 13:41:25 +01:00
Aleksander Morgado
243720414e context: new '--test-no-auto-scan' to avoid automatic scanning for devices 2014-02-13 13:41:23 +01:00
Aleksander Morgado
bf57da537d context: new '--test-session' allows launching the MM daemon in the session bus 2014-02-13 13:41:20 +01:00
Aleksander Morgado
46ff06ff80 service,tests: new DBus service file for tests 2014-02-13 13:41:17 +01:00
Aleksander Morgado
37115dee93 api,introspection: new 'Signal' interface for extended signal quality 2013-08-21 12:33:09 +02:00
Aleksander Morgado
74056e02ce build: fix dbus activation file generation
https://bugzilla.gnome.org/show_bug.cgi?id=704711
2013-07-23 11:04:29 +02:00
Aleksander Morgado
a05bd76564 systemd: schedule to restart the service on-abort
See https://bugzilla.gnome.org/show_bug.cgi?id=701229.
2013-06-25 12:02:42 +02:00
Aleksander Morgado
223db868a8 dbus: no need for systemd and nosystemd setups of the service file
We can just merge them.
2013-06-23 12:08:03 +02:00
Aleksander Morgado
ce6777c53b Revert "systemd: simplify unit file"
This reverts commit 91898aa8b0.

See additional comments in the following bug:

  https://bugzilla.gnome.org/show_bug.cgi?id=701229

Basically, 'mask' and 'unmask' operations are not the ones we should be using
or suggesting; and the Alias= for the DBus file is the correct way to go.
2013-06-23 11:47:41 +02:00
Aleksander Morgado
0c7265de29 build: new strict & permissive polkit policies in '--with-polkit'
The '--with-polkit' configure switch now supports more options than just yes
or no:

 * strict: Active user needs to explicitly authenticate when peforming an
   operation defined in the Device.Control, Messaging, Location or Contacts
   interfaces. Polkit policy is set to 'auth_self_keep'.

 * permissive: Active user doesn't need to explicitly authenticate when
   peforming an operation defined in the Device.Control, Messaging, Location or
   Contacts interfaces. Polkit policy is set to 'yes'.

 * none: don't use polkit.

If '--with-polkit' is not given, usage will be automatically decided based on
the presence of the Polkit headers in the system (if headers found, strict
policy will be applied, otherwise none).

Also:
 * '--with-polkit' is equivalent to '--with-polkit=strict'
 * '--with-polkit=yes' is equivalent to '--with-polkit=strict'
 * '--with-polkit=no' is equivalent to '--with-polkit=none'
 * '--without-polkit' is equivalent to '--with-polkit=none'

By default, ModemManager will always apply the strict policy, in order to
protect the user from unwanted operations in the modem (e.g. getting the PIN
locked forever after wrong PIN/PUK unlock attempts).

https://bugzilla.gnome.org/show_bug.cgi?id=701740
2013-06-13 09:21:52 +02:00
Aleksander Morgado
a00f1d7428 build: fix distcheck 2013-06-06 10:16:22 +02:00
Aleksander Morgado
91898aa8b0 systemd: simplify unit file
Avoid setting up the Alias rule, which was a helper to let us 'disable' the
systemd service including dbus-activations. Without the Alias, 'disable' will
still let starting ModemManager through dbus-activation. If you really want to
fully disallow starting MM also through dbus-activation, you should 'mask' and
'unmask' the service.

E.g.:
 $ sudo systemctl mask ModemManager
ln -s '/dev/null' '/etc/systemd/system/ModemManager.service'

 $ sudo mmcli -L
error: couldn't find the ModemManager process in the bus

 $ sudo systemctl unmask ModemManager
rm '/etc/systemd/system/ModemManager.service'

 $ sudo mmcli -L
No modems were found

https://bugzilla.gnome.org/show_bug.cgi?id=701229
2013-06-06 10:07:17 +02:00
Aleksander Morgado
3ed1cb2e1d docs: don't require 'dia' to build the docs
These diagrams are not expected to change much, so just include the generated
PNGs in the repository, and remove 'dia' from the prerequisites to build the
documentation.
2013-05-26 19:16:39 +02:00
Dan Williams
f3ad2e5bb5 trivial: fix typo 2013-02-06 11:59:16 -06:00