SDK applications should not use ~/.local/share/Qt Project for sqlite files
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu UI Toolkit |
Fix Released
|
Undecided
|
Unassigned | ||
apparmor-easyprof-ubuntu (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Saucy |
Fix Released
|
Undecided
|
Unassigned | ||
qtdeclarative-opensource-src (Ubuntu) |
Invalid
|
High
|
Cris Dywan | ||
Saucy |
Invalid
|
High
|
Cris Dywan | ||
ubuntu-ui-toolkit (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Saucy |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Ubuntu SDK applications store their sqlite data in locations like this:
~/.local/share/Qt Project/
~/.local/share/Qt Project/
This results in AppArmor rules like the following:
owner "@{HOME}
owner "@{HOME}
owner "@{HOME}
owner "@{HOME}
owner "@{HOME}
owner "@{HOME}
But these rules are too lenient and these paths need to be made application specific. Specifically: $XDG_DATA_HOME/<app pkgname> where '<app pkgname>' is the "name" field in the Click manifest (see bug #1197037 for details).
Related branches
- PS Jenkins bot: Approve (continuous-integration)
- Zsombor Egri: Approve
- Tim Peeters: Pending requested
-
Diff: 376 lines (+286/-0)9 files modifiedmodules/Ubuntu/Components/MainView.qml (+5/-0)
modules/Ubuntu/Components/plugin/plugin.cpp (+7/-0)
modules/Ubuntu/Components/plugin/plugin.pro (+2/-0)
modules/Ubuntu/Components/plugin/ucapplication.cpp (+57/-0)
modules/Ubuntu/Components/plugin/ucapplication.h (+53/-0)
tests/unit/tst_mainview/AppName.qml (+23/-0)
tests/unit/tst_mainview/tst_mainview.cpp (+132/-0)
tests/unit/tst_mainview/tst_mainview.pro (+6/-0)
tests/unit/unit.pro (+1/-0)
tags: | added: application-confinement |
description: | updated |
Changed in ubuntu-qtcreator-plugins: | |
assignee: | nobody → Timo Jyrinki (timo-jyrinki) |
affects: | ubuntu-qtcreator-plugins → ubuntu-ui-toolkit |
description: | updated |
Changed in ubuntu-ui-toolkit: | |
assignee: | Timo Jyrinki (timo-jyrinki) → nobody |
Changed in qtdeclarative-opensource-src (Ubuntu): | |
assignee: | nobody → Christian Dywan (kalikiana) |
Changed in apparmor-easyprof-ubuntu (Ubuntu Saucy): | |
status: | New → Triaged |
Changed in qtdeclarative-opensource-src (Ubuntu Saucy): | |
importance: | Undecided → Critical |
importance: | Critical → High |
description: | updated |
Changed in ubuntu-ui-toolkit: | |
status: | Fix Committed → Fix Released |
Changed in qtdeclarative-opensource-src (Ubuntu Saucy): | |
status: | New → Invalid |
Thinking about how core apps make use of the LocalStorage QML plugin to
store settings, this bug might easily be solved in some of them when we
migrate to using the GSettings QML backend (lp:gsettings-qt) to store the
settings.
However, it will not cover all cases, as there are genuine use cases for
using a database (such as storing past calculations in the calculator app)
Cheers,
David.
On Tue, Jul 2, 2013 at 7:17 PM, Jamie Strandboge <email address hidden> wrote:
> Public bug reported: QtQmlViewer/ QML/OfflineStor age/Databases/ 7dbf3433d69b430 4a43526d9eca5b6 50.ini QtQmlViewer/ QML/OfflineStor age/Databases/ 7dbf3433d69b430 4a43526d9eca5b6 50.sqlite /.local/ share/Qt Project/ QtQmlViewer/ " rw, /.local/ share/Qt Project/ QtQmlViewer/ QML/" rw, /.local/ share/Qt Project/ QtQmlViewer/ QML/OfflineStor age/" rw, /.local/ share/Qt QtQmlViewer/ QML/OfflineStor age/Databases/ " rw, /.local/ share/Qt QtQmlViewer/ QML/OfflineStor age/Databases/ [0-9a-f] *.ini{, .*}" rwk, /.local/ share/Qt QtQmlViewer/ QML/OfflineStor age/Databases/ [0-9a-f] *.sqlite" rwk, qtcreator- plugins easyprof- ubuntu (Ubuntu) confinement easyprof- ubuntu (Ubuntu) confinement QtQmlViewer/ QML/OfflineStor age/Databases/ 7dbf3433d69b430 4a43526d9eca5b6 50.ini QtQmlViewer/ QML/OfflineStor age/Databases/ 7dbf3433d69b430 4a43526d9eca5b6 50.sqlite /.local/ share/Qt Project/ QtQmlViewer/ " rw, /.local/ share/Qt Project/ QtQmlViewer/ QML/" rw, /.local/ share/Qt Project/ QtQmlViewer/ QML/OfflineStor age/" /.local/ share/Qt QtQmlViewer/ QML/OfflineStor age/Databases/ " rw, /.local/ share/Qt QtQmlViewer/ QML/OfflineStor age/Databases/ [0-9a-f] *.ini{, .*}" rwk, /.local/ share/Qt QtQmlViewer/ QML/OfflineStor age/Databases/ [0-9a-f] *.sqlite" rwk,
>
> Ubuntu SDK applications store their sqlite data in locations like this:
> ~/.local/share/Qt
> Project/
> ~/.local/share/Qt
> Project/
>
> This results in AppArmor rules like the following:
> owner "@{HOME}
> owner "@{HOME}
> owner "@{HOME}
> owner "@{HOME}
> Project/
> owner "@{HOME}
> Project/
> owner "@{HOME}
> Project/
>
> But these rules are too lenient and these paths need to be made
> application specific. Specifically: $XDG_DATA_DIR/<app id> where '<app
> id>' will ultimately be the reverse domain name with Click packages (see
> bug #1197037 for details on '<app id>').
>
> ** Affects: ubuntu-
> Importance: Undecided
> Status: New
>
> ** Affects: apparmor-
> Importance: Undecided
> Status: New
>
>
> ** Tags: application-
>
> ** Also affects: apparmor-
> Importance: Undecided
> Status: New
>
> ** Tags added: application-
>
> ** Description changed:
>
> - Ubuntu SDK applications still their sqlite data in locations like this:
> + Ubuntu SDK applications store their sqlite data in locations like this:
> ~/.local/share/Qt
> Project/
> ~/.local/share/Qt
> Project/
>
> This results in AppArmor rules like the following:
> owner "@{HOME}
> owner "@{HOME}
> owner "@{HOME}
> rw,
> owner "@{HOME}
> Project/
> owner "@{HOME}
> Project/
> owner "@{HOME}
> Project/
>
> But these rules are too lenient and these paths need to be made
> application specific. Specifically: $XDG_DATA_DIR/<app id> where '<app
> id>' will ultimately be the reverse domain name with Click packages (see
> bug...