Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-41187

Map tile cache location doesn't work under AppArmor confinement use case

    XMLWordPrintable

Details

    • a99b8ced41b2c634598ce70fe69036a0ed34e9ba, e9753c6cfd5a0a7fa1c73c19459b815c59a1d6dd

    Description

      The QtLocation library itself defaults to caching map tiles in

      QStandardPaths::writableLocation(QStandardPaths::GenericCacheLocation) + QLatin1String("/QtLocation")

      typically on Unix this will be

      ~/.cache/QtLocation

      There's no way to override this without changing the code as far as I've seen.

      Now my use case is a very strict AppArmor environment where applications cannot share most files with other applications to prevent privacy leaks. The ability to see which maps were being browsed by inspecting the tile cache is not acceptable here.

      Simple solution:

      QStandardPaths::writableLocation(QStandardPaths::CacheLocation)

      which will end up storing tiles in

      ~/.cache/myAppName

      I understand this may not be desirable for everyone so this probably isn't a sufficient solution. Though if it is, I've got a patch for that.

      Another option might be a build flag.

      A third option I brainstormed with a few people is API that is aware of confinement such that it's aware if the underlying platform plugin is "confined". Though this isn't so obvious as there's no other code doing this so far (that I'm aware of).

      Attachments

        For Gerrit Dashboard: QTBUG-41187
        # Subject Branch Project Status CR V

        Activity

          People

            lagocs Laszlo Agocs
            kalikiana Christian Dywan
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes