2502 Commits

Author SHA1 Message Date
Samuele Pedroni
309fdb449c many: support an API flag system-restart-immediate to make snap ops proceed immediately with system restarts (#10871)
* daemon: introduce system-restart-immediate flag in the snaps APIs

this gets reflected on the Change

* overlord: make Changes respect system-restart-immediate

have all system restart requests that don't use Now already
use snapstate.RestartSystem which consults system-restrat-immediate
on the Change as set by daemon
2021-10-04 13:52:39 +02:00
James Henstridge
97c5d9cd6f Merge remote-tracking branch 'upstream/master' into themes-api-access-check 2021-09-24 12:59:56 +08:00
Michael Vogt
78736d91d7 Merge pull request #10810 from stolowski/validation-sets/update-vsets-asserts-only-with-all-snaps
o/assertstate, api: update validation set assertions only when updating all snaps
2021-09-23 10:47:40 +02:00
Pawel Stolowski
e038fc68a5 o/ifacestate: don't lose connections if snaps are broken
* Don't drop connections from "conns" during reloadConnections if
plug/slot snap exists in the state but has "broken" status.

* Report error from addSnaps() if all snaps are broken.

* Fix failing tests.

* Fix format.

* Add unit test.

* Determine mount unit prefixes for systemd as they are different on
Fedora/CentOS etc. Disable the test on core systems as it relies on
auto-connected home.

* Fix quoting.
2021-09-23 09:29:42 +02:00
Paweł Stołowski
354a19dc9c Update validation set assertions only when updating all snaps. 2021-09-22 15:47:27 +02:00
Paweł Stołowski
4b9f2e3cb5 Move InstalledSnaps helper to snapstate. 2021-09-21 10:43:16 +02:00
Paweł Stołowski
d568793e27 Check installed snaps when refreshing validation set assertions. 2021-09-21 10:43:16 +02:00
James Henstridge
23fbb12dc1 daemon: test that undesired connections do not grant theme install access 2021-09-16 15:15:30 +08:00
James Henstridge
34a5f5439e Merge remote-tracking branch 'upstream/master' into themes-api-access-check 2021-09-16 15:09:16 +08:00
Alberto Mardegan
0ef48aa37a o/servicestate: update quota control tests to use MockSystemdVersion 2021-09-13 13:49:44 +03:00
James Henstridge
1fb316ae7f interfaces, daemon: rename snapd-themes-control interface to snap-themes-control 2021-09-09 13:38:13 +08:00
James Henstridge
58e04e57a2 Merge remote-tracking branch 'upstream/master' into themes-api-access-check 2021-09-09 11:03:28 +08:00
Miguel Pires
aa623a49ea many: remove unused parameters and returns 2021-09-02 17:44:34 +01:00
James Henstridge
425ee93712 daemon: add a comment to the themesAuthenticatedAccess checker to
clarify the logic
2021-09-02 15:39:40 +08:00
Paweł Stołowski
3761562ab9 Rename RefreshAssertions to RefreshSnapAssertions. 2021-08-30 10:03:55 +02:00
Paweł Stołowski
9cfb37fc75 Add unit test. 2021-08-30 10:03:54 +02:00
Paweł Stołowski
5681d09488 Introduce assertstate.RefreshAssertions(..) that refreshes both snap
declarations and validation set assertions.
2021-08-30 10:03:54 +02:00
Miguel Pires
db9c63b734 many: remove unused code 2021-08-26 18:24:02 +01:00
Miguel Pires
3977e7c60e o/assertstate: set RefreshOptions when auto refreshing assertions 2021-08-25 11:18:21 +01:00
Paweł Stołowski
0ad4727f8f Move IgnoreValidation flag check to installFlags (thanks pedronis). 2021-08-19 08:44:50 +02:00
Paweł Stołowski
bc060d8c8d Handle IgnoreValidation flag on install in api/snapstate. 2021-08-19 08:44:50 +02:00
Samuele Pedroni
70a8e7ba1b Merge remote-tracking branch 'upstream/master' into links-in-meta 2021-08-06 13:34:39 +02:00
James Henstridge
b46fb6b3a4 daemon: apply themes access checkers to theme API endpoint 2021-07-28 18:23:07 +08:00
James Henstridge
057993ac08 daemon: add themesAuthenticatedAccess access checker 2021-07-28 18:15:26 +08:00
James Henstridge
ca054f2985 daemon: add unit tests for themesOpenAccess access checker 2021-07-28 17:53:01 +08:00