Comment 0 for bug 1197051

Jamie Strandboge (jdstrand) wrote :

Ubuntu SDK applications still their sqlite data in locations like this:
~/.local/share/Qt Project/QtQmlViewer/QML/OfflineStorage/Databases/7dbf3433d69b4304a43526d9eca5b650.ini
~/.local/share/Qt Project/QtQmlViewer/QML/OfflineStorage/Databases/7dbf3433d69b4304a43526d9eca5b650.sqlite

This results in AppArmor rules like the following:
owner "@{HOME}/.local/share/Qt Project/QtQmlViewer/" rw,
owner "@{HOME}/.local/share/Qt Project/QtQmlViewer/QML/" rw,
owner "@{HOME}/.local/share/Qt Project/QtQmlViewer/QML/OfflineStorage/" rw,
owner "@{HOME}/.local/share/Qt Project/QtQmlViewer/QML/OfflineStorage/Databases/" rw,
owner "@{HOME}/.local/share/Qt Project/QtQmlViewer/QML/OfflineStorage/Databases/[0-9a-f]*.ini{,.*}" rwk,
owner "@{HOME}/.local/share/Qt Project/QtQmlViewer/QML/OfflineStorage/Databases/[0-9a-f]*.sqlite" rwk,

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>').