26 Commits (3b7b2cf34eba11fa988c80f6244e82abbd3c794a)

Author SHA1 Message Date
Bart Ribbers 3166700f4d
Don't link to systemd twice
We link (in a proper CMake way) later a bit below this line, and that
actually works on systems using e.g. elogind too.
4 years ago
Bart Ribbers 4f57437ce1
Add pkgconfig file
Without it, -lapplauncherd is undefined and it can not be used to
compile other applications with it. I needed this to get
mapplauncherd-qt to compile
4 years ago
Simo Piiroinen 833b551af1 [mapplauncerd] Sandboxed application boosters. JB#53844 OMP#JOLLA-43
When booster is executing in sandbox as an applicatiom booster, it
needs to verify that command line received from invoker matches
Exec line in application desktop file, application launch is allowed,
and permissions granted are as was expected at the time of booster
launch.

Provide booster-generic@.service that can be used for instantiating
sandboxed application boosters.

D-Bus ipc with sailjaild is modified version of similar code in
sailjailclient. The biggest difference is that this version uses
private connection via libdbus to avoid leaving stray dbus connections
or threads behind when transferring control to application code
without use of exec*() functions.

Remove cap_sys_ptrace from booster executable as makes it impossible
to run the booster within a no-new-privs sandbox.

Fix socket passing from booster instance to booster daemon so that it
works also when invoker is running in different namespace than booster
instance (invoker pid might be unresolvable).

Replace ad-hoc booster argument parsing with getopt_long().

Fix issues with argv handling: using const pointers for non-const
data, passing data by reference between objects that might have
different lifespans and never releasing the dynamically allocated
arrays.

Fix issues with env passing: duplicating invoker env at booster
side as-is can lead to problems like loss of customg session
bus socket address that has been set up by firejail.

If booster bumps into command read problems, bailout immediately
instead of relying on out-of sequence data possibly triggering
exit due to unknown commands.

As an enabler for sharing code between invoker (written in c) and
daemon (written in c++), modify Logger class used by c++ code so
that it is just a wrapper for logging functionality used by invoker.

Signed-off-by: Simo Piiroinen <simo.piiroinen@jolla.com>
4 years ago
Bart Ribbers 75aafafa6e
Respect GNUInstallDirs
This allows packagers to set the proper directories to install stuff
too using CMAKE_INSTALL_PREFIX, CMAKE_INSTALL_LIBDIR, etc.

Also make installing systemd unit files optional, for systemd without
systemd, but enable them by default
5 years ago
Bart Ribbers e5707b8f3f
Fix linking to systemd when elogind is used instead
This is mainly useful for non-glibc systems. Yes, systemd doesn't even run
on non-glibc systems, but elogind does and this way it links to both systemd
and elogind.

However due to switching the way we link to systemd, we now also make
sure systemd is actually installed on the system before we even try to
compile, thus preventing compiler errors when systemd isn't present.
5 years ago
Tomi Leppänen 82acc16141 [mapplauncherd] Drop capabilities before launching process. Contributes to JB#53620
Signed-off-by: Tomi Leppänen <tomi.leppanen@jolla.com>
5 years ago
Niels Breet e4cc3b8f79 [aarch64] Use macros, not hardcoded paths. Contributes to JB#49681 6 years ago
Sergey Chupligin fcac0eb973 Fix build with new systemd 9 years ago
Robin Burchell 6ad8d7ac16 [mapplauncherd] Remove splash support.
This feature only encourages poor application interactivity: anything which is
sufficiently slow to require a splash screen should be made faster instead.

In addition to that, the feature is poorly implemented (X11-specific), and thus
useless. Rip it out, and remove the last dependency on X11 from applauncherd.
12 years ago
John Brooks b6e9aa171b [mapplauncherd] Remove applauncherd and refactor boosters into independent processes
Having a single applauncherd process with boosters as plugins is a
flawed idea: most notably, it's not possible to have two boosters with
conflicting libraries, like Qt4 and Qt5.

A much cleaner solution is to turn libapplauncherd into a support
library for boosters, and have each booster run as an independent
process.
13 years ago
John Brooks 13fcb649bb Set USE_X11 for launcherlib 13 years ago
John Brooks 8a2ebc8b0b Remove unnecessary use of Qt in launcherlib and ebooster 13 years ago
Pekka Lundstrom 23aa7485ce Added systemd notification. Fixes NEMO#637
Signed-off-by: Pekka Lundstrom <pekka.lundstrom@jollamobile.com>
13 years ago
John Brooks 63ba6b77df Move eventhandler to mdeclarativecache
EventHandler is only used by qdeclarativebooster and its derivatives
at the moment. It can't be included in libapplauncherd, because of the
Qt dependency, but it needs to be available for out-of-tree plugins.
Putting it into libmdeclarativecache seems like the most reasonable
option at present.
13 years ago
John Brooks b955e3f9fe Use launcherlib from qdeclarativebooster 13 years ago
John Brooks 2d39416ea7 Install libapplauncherd as a proper library
Headers are now installed, it has a soname, and is installed to /usr/lib
properly.
13 years ago
Pertti Kellomäki 47899b7607 Changes: Implementation of the applauncherd-mcompositor communication for splash screen.
Sets pid, wmclass, portrait splash image, landscape splash
         image, and pixmap id in the _MEEGO_SPLASH_SCREEN X11 property
         of the compositor window.  Pid is the booster/application
         pid, wmclass is derived from the application binary name,
         splash images are the parameters given for --splash and
         --splash-landscape. The pixmap id is set to the empty stirng.

RevBy: Antti Kervinen
15 years ago
Antti Kervinen 0d74c5c35d Fixes: NB#217662 - applauncherd depends on WRT
Changes: Library preloading warnings not printed unless --debug is given.

RevBy: Jussi Lind
15 years ago
Alexey Shilov 4b6b9888c5 Fixes: NB#217376 - Applauncherd writes log messages, but not to syslog
RevBy: Jussi Lind
15 years ago
Juha Lintula 7d65a7de19 Changes: single-instance support, invoker bad exit status removed, check file added
RevBy: Jussi Lind, Juha Lintula
15 years ago
Jussi Lind 4a0d5de729 Changes: Boosters loaded as plugins.
Details: Boosters are in separate dirs under src/ and are compiled/loaded as plugins.
15 years ago
Jussi Lind 32ed9c650b Changes: Install libapplauncherd.so to /usr/lib/applauncherd/libapplaucherd.so
RevBy: TrustMe
15 years ago
Alexey Shilov 0c9adf06e2 Changes: get rid of monitor booster 15 years ago
Jussi Lind d9af11ef65 Changes: Launcher library exports only main()
RevBy: Alexey Shilov
15 years ago
Jussi Lind c624a676f6 Changes: Install /usr/bin/applauncherd.launcher to /usr/lib/libapplauncherd.so
due to dh_strip problems and because it's not -pie.

RevBy: Alexey Shilov
15 years ago
Jussi Lind c263e56c42 Changes: Basic implementation of library-based launcher. 15 years ago