75 Commits (1137a3ba4b6c75ef9746aea047900f0d52f0360f)

Author SHA1 Message Date
Simo Piiroinen 23846d0db4 [mapplauncherd] Adjust booster socket paths. Fixes JB#53864 OMP#JOLLA-39
Having all booster sockets reside at the same level in /run/user
directory structure makes it difficult to limit what boosters
sandboxed applications have access to.

Move socket files to booster specific sub-directories. And as an enabler
for sandboxed boosters, add another sub-directory level that can be used
for identifying application specific boosters.

As an example, silica-qt booster socket file path changes from

  /run/user/UID/mapplauncherd/silica-qt5

to

  /run/user/UID/mapplauncherd/_default/silica-qt5/socket

and sandboxed silica-qt5 booster for application APP would use

  /run/user/UID/mapplauncherd/_APP/silica-qt5/socket

Signed-off-by: Simo Piiroinen <simo.piiroinen@jolla.com>
5 years ago
Simo Piiroinen 66db6e7063 [mapplauncherd] Cleanup compilation warnings
Comparing signed vs unsigned integers.

Unused static data.

Questionable variable declarations.

Const correctness issues.

Unchecked socket and pipe i/o.

Unchecked chdir() call.

String sender that silently skips null strings while protocol does
not make it possible for receiver to detect such omissions.

Signed-off-by: Simo Piiroinen <simo.piiroinen@jolla.com>
5 years ago
pvuorela 4fd919ca0e Merge branch 'musl' into 'master'
Fix Musl incompabilities

See merge request mer-core/mapplauncherd!16
5 years ago
Bart Ribbers 6d31938929 Fix Musl incompabilities
Without including libgen.h, basename is not available on Musl.
sourceArgv[0] is a const char* which can not be converted to char*, so
cast it instead
RTLD_DEEPBIND is not available on Musl, only on glibc (since 2.3.4)
ARG_MAX is already defined so it has to be renamed
Even according to glibc itself, <bits/socket.h> should never be included
directly and <sys/socket.h> should, which is already done anyway
5 years ago
Tomi Leppänen 26c5406e63 [launcherlib] Set cgroups of sandboxed apps correctly. Fixes JB#52187
Separate cgroups of sandboxed apps. Previously they were all put to the
same group with this change they are in separate groups.

Looking at invoker.c appName and fileName are the same and can be used
interchangeably.

Also change --desktop-file to have a bit more accurate description.

Signed-off-by: Tomi Leppänen <tomi.leppanen@jolla.com>
5 years ago
Martin Jones 627bc74e65 [mapplauncherd] Allow a list of booster types to be provided. Contributes to JB#34267
Allows fallback boosters to be specified, e.g.

invoker -s --type=silica-media,silica-qt5 /usr/bin/jolla-camera
10 years ago
Martin Jones 02c79d3da7 [invoker] Reduce the default respawn delay. Contributes to JB#30107
This was perhaps a reasonable default 5 years ago, but today 1s is plenty.
11 years ago
Giulio Camuffo 6b17aea5d0 [invoker] Use a DBus method to notify lipstick an app is started
This patch adds a new -F/--desktop-file command line option to
invoker which takes a desktop file name as argument. Using it will
notify lipstick that  the app which goes with that desktop file is
being started.
11 years ago
John Brooks 70c1cd2da7 [invoker] Don't add POSIXLY_CORRECT to the environment
As a GNU extension, passing '+' to getopt_long can be used as an
alternative to the POSIXLY_CORRECT environment variable to get the
argument behavior that invoker relies on. Variables set in the invoker
environment will pass onto child processes, and adding this to the
environment would break some applications.
12 years ago
Robin Burchell 85dce78c1b Merge pull request #20 from rburchell/master
[mapplauncherd] When trying to invoke an application fails, fall back to...
12 years ago
Robin Burchell 18a6a1f0e2 [mapplauncherd] When trying to invoke an application fails, fall back to the generic booster.
Falling back to an unboosted exec should be the path of absolute last resort,
nothing more. Failing to do this can result in broken privileges, etc.
12 years ago
John Brooks 9471a69431 [mapplauncherd] Rename invoker --daemon-mode to --keep-oom-score
The old name was vague and didn't indicate the change in behavior at
all. Its documentation also described the behavior incorrectly. If the
-o or --keep-oom-score parameter is passed, the OOM score of the boosted
process will be unchanged. Normally, it will be reset to 0 on launch.

The --daemon-mode parameter is kept as an alias for compatibility.
12 years ago
Thomas Perl 5771a1acd7 [invoker] For launchers, add the first argument to the name 12 years ago
Thomas Perl a07b13b192 [mapplauncherd] Add full path to argv[0] of invoked process
This allows the application to look up its installation prefix (e.g.
/usr) by just looking at argv[0] and calculating relative paths from
there (previously one would need to pass the full path to invoker).
12 years ago
Thomas Perl 52f1fa4798 [mapplauncherd] Update names and mappings of boosters for Qt 5 12 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 25dfb62293 [mapplauncherd] Change booster type to strings
Single-character booster types could potentially conflict when
using out-of-tree boosters, and quickly become confusing.

Old types are mapped for compatibility.
13 years ago
John Brooks 1a09eb0fe5 [mapplauncherd] Put booster sockets under XDG_RUNTIME_DIR
This is a compatibility-breaking change with boosters. The socketId
field is now expected to be a socket name, not a path. Sockets are
placed under ${XDG_RUNTIME_DIR}/mapplauncherd/, defaulting to /tmp/.

Invoker currently expects sockets in that path and named 'booster-X'
where X is the single character booster type. That is expected to
change when types are refactored to use full strings.
13 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 45bf8c61bd Fix NEMO#598: invoker segfaults when run without --type 13 years ago
John Brooks 593ea85036 Remove mbooster 13 years ago
John Brooks 2a5ca47d8b Remove hardcoded booster types from invoker 13 years ago
Robin Burchell 56446432be remove aegis/creds code 13 years ago
John Brooks 48ed517ce8 Fix invoker infinite loop after receiving signals
After receiving a signal, a pipe is written, which is polled by select.
As of ac1ed61, that pipe is never read, causing the select() to
repeatedly trigger and use 100% CPU after receiving any signal that
doesn't cause the process to terminate.

Partial revert of ac1ed61, plus a one-line fix for the select() fd set
13 years ago
Dmitry Rozenshtein c99cc0b7ea Fixes: NB#299083 - apps started via invoker --type m retain applauncher's privileges on D-Bus
RevBy: Alexey Shilov
14 years ago
Juha Lintula ac1ed61ddf Changes: NB#274400 - (invoker modifications)
RevBy: Pertti Kellomäki
14 years ago
Nimika Keshri fa80b9db70 Merge branch 'master' into 1.1
Conflicts:
	debian/changelog
15 years ago
Nimika Keshri c3cba0a91e Changes: New functional tests for invoker.
RevBy: Olli Leppanen
15 years ago
Juha Lintula 438488b6af Fixes: NB#248543 - [SSU]:Error seen at 'invoker: error: Can't send signal to application: No such process '
RevBy: Pertti Kellomaki
15 years ago
Alexey Shilov 1bdcafe2d8 Fixes: NB#261960 - [TASK] "Invoker" should be able to launch applications even when "applauncherd" is not running
RevBy: Pertti Kellomaki
15 years ago
Alexey Shilov c84f5569a4 Fixes: NB#250971 - a booster is wasted with --single-instance
RevBy: Pertti Kellomaki
15 years ago
Jussi Lind 4418db2bce New: Content added to invokerparameters.dox 15 years ago
Alexey Shilov 5069b5988b Changes: suppress coverity tool warnings
RevBy: TrustMe
15 years ago
Alexey Shilov 625ace3e88 Changes: More Coverity tool defect fixes
RevBy: TrustMe
15 years ago
Jussi Lind 1efcadaac3 Changes: Refactored invoker.c
- Comments added / fixed
- invoke_remote() split into two functions
- Some variables renamed

RevBy: Alexey Shilov
15 years ago
Alexey Shilov 9e1f773ac5 Fixes: NB#244103 - Device hangs on closing application in connecting view while configuring MFE account
RevBy: Jussi Lind, Pertti Kellomaki
15 years ago
Alexey Shilov 76ff446549 Fixes: NB#239608 - invoker doesn't forward ^C always
RevBy: Antti Kervinen
15 years ago
Jussi Lind 7663f572bd Changes: Compiler warning about signed/unsigned comparison fixed in invoker.c. DEFAULT_DELAY renamed to EXIT_DELAY.
RevBy: Alexey Shilov
15 years ago
Antti Kervinen cb0a80dde1 Changes: --respawn delay accepts 0
RevBy: Alexey Shilov
15 years ago
Alexey Shilov 6d0d98d627 Changes: update description of -o parameter for invoker
RevBy: Antti Kervinen
15 years ago
Juha Lintula 5539597ebc Changes: Landscape splash-message implemented to protocol between invoker and launcher
RevBy: Antti Kervinen
15 years ago
Alexey Shilov 47653f4e4a Changes: Disable out of memory adjustments command line parameter added to invoker, code refactoring
RevBy: Antti Kervinen
15 years ago
Jussi Lind 28d852e015 New: Basic implementation of the e-booster. 15 years ago
Juha Lintula 5a8cdff0cf Changes: splash command line parameters and invoker-applauncherd protocol added
RevBy: Antti Kervinen
15 years ago
Pertti Kellomäki 8c32791efd Changes: The qdeclarativebooster plugin implementation. 15 years ago
Antti Kervinen 651ba4f079 Changes: Handle properly credential problems after accepting a connection
Changes: Removed invoker fallback to execve

RevBy: Jussi Lind, Alexey Shilov
15 years ago
Antti Kervinen 7295bd3c0a Changes: fixed wait bit passing in magic_options in case of --no-wait,
failing to unlink /tmp/boostX logs an error message.

RevBy: Alexey Shilov
15 years ago
Jussi Lind bc29b2541c Changes: Help printings added to Daemon (--help, -h). Invoker's help refactored.
RevBy: Antti Kervinen

Details:
- Added information about single-instance and boot mode.
- Some lines made shorter.
- Descriptions improved.
15 years ago
Jussi Lind 0ff715fb64 Fixes: NB#212024 - Application launcher should be usable (improve performance) also at boot
RevBy: Antti Kervinen

Details:
--boot-mode starts applauncherd in the boot mode:
* Boosters won't initialize cache
* Booster respawn delay is zero

Sending SIGUSR1 forces the launcher to enter the normal mode again.
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