9 Commits

Author SHA1 Message Date
James Henstridge
277b4f01bc data, packaging: install polkit policy files via data Makefile 2024-07-03 13:38:58 +02:00
Alex Murray
dbd4fc753d data: Add systemd-tmpfiles configuration to create private tmp dir
Use systemd-tmpfiles to create the private tmp mount namespace root
dir (/tmp/snap-private-tmp) on boot as owned by root with restrictive
permissions. We can use this as a known location to then create per-snap
private tmp mount namespace dirs (/tmp/snap-private-tmp/snap.$SNAP_INSTANCE)
etc.

Signed-off-by: Alex Murray <alex.murray@canonical.com>
2022-12-01 06:29:44 +01:00
Maciej Borzecki
c2091fad6a data/sudo: drop a failed sudo secure_path workaround
The sudo secure_path setting resets the PATH to some predefined value for
commands executed under sudo. We have tried to workaround
https://bugzilla.redhat.com/show_bug.cgi?id=1691996 by trying to extend the
secure_path in a drop in conf files. This approach does not work for 2 reasons:
 - the file is incorrectly named
 - secure_path is a string and += append only works on lists (eg. env_keep)

Since there is no clear way to fix the problem other than talking with
distributions, drop the workaround. We can always revert the patch when needed.

Fixes: https://bugs.launchpad.net/snapd/+bug/1882215

Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2020-06-17 12:44:33 +02:00
Neal Gompa
65f0e83f23 data, packaging: Add sudoers snippet to allow snaps to be run with sudo
Generally speaking, applications provided as snaps should behave in all
the same ways that native packages should, and that includes being usable
with sudo(8). In order for this to work, we need to configure sudo to add
the snap binary directory to the search path.

Resolves: RH#1691996

Signed-off-by: Neal Gompa <ngompa13@gmail.com>
2020-02-03 07:01:53 -05:00
James Henstridge
1c767b8290 data: run snap session-agent as a systemd user session service.
Also add a unix socket for socket activation.
2019-06-25 17:29:25 +08:00
Michael Vogt
4813faa9e8 data: add systemd environment configuration
This addresses LP: 1771858 and ensures that /snap/bin is available in
the PATH everywhere. This superseeds #5226 which was using a full
generator but we really just need the simpler environment conf file.
2018-06-25 18:52:37 +02:00
Maciej Borzecki
98db4bcd35 cmd/snap: user session application autostart v3 (#4942)
Add support for `snap userd --autostart`. The command is expected to be run as part of user session startup and is responsible for starting snap applications that have placed a proper `*.desktop` file in `$SNAP_USER_DATA/.config/autostart`. The desktop file is matched against `autostart` declaration in snap's YAML.

For details see https://forum.snapcraft.io/t/development-sprint-march-5th-2018/4345/2

Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2018-04-11 09:26:59 +02:00
John R. Lenton
7900701e75 Merge remote-tracking branch 'origin/master' 2017-08-29 13:42:54 +01:00
Simon Fels
047538e13d cmd/snap: add userd command to replace snapd-xdg-open (#3260)
Based on discussion from
https://forum.snapcraft.io/t/integrate-snapd-xdg-open-into-snapd/100
2017-08-28 20:35:04 -03:00