Commit Graph

11 Commits

Author SHA1 Message Date
Simon Deziel
8ce4555a79 systemd: don't run ModemManager in containers
This assumes the needed modem hardware is typically not available
inside containers. If however, the local admin configures the container
to get access to the hardware in question, ModemManager can be
instructed to run in that specific container by doing:

`sudo systemctl edit ModemManager.service`

Then entering the following text in the editor:

  [Unit]
  # Remove condition of "not container"
  ConditionVirtualization=

Upon saving/exiting, ModemManager can then be started with:

`sudo systemctl start ModemManager.service`

Signed-off-by: Simon Deziel <simon@sdeziel.info>
2022-03-14 10:30:45 -04: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
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
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
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
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
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
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
222825d642 systemd: include systemd unit file support
Allow having systemd handling the life cycle of the ModemManager process.
2013-02-06 17:32:59 +01:00