touch-packages team mailing list archive
-
touch-packages team
-
Mailing list archive
-
Message #22928
[Bug 1359831] Re: Apps incorrectly perform a chmod on XDG_RUNTIME_DIR
This looks like the problem of using QStandardPaths::writableLocation().
The relevant code snipped from QStandardPaths::writableLocation(RuntimeLocation):
// "and he MUST be the only one having read and write access to it. Its Unix access mode MUST be 0700."
QFile file(xdgRuntimeDir);
const QFile::Permissions wantedPerms = QFile::ReadUser | QFile::WriteUser | QFile::ExeUser;
if (file.permissions() != wantedPerms && !file.setPermissions(wantedPerms)) {
qWarning("QStandardPaths: wrong permissions on runtime directory %s", qPrintable(xdgRuntimeDir));
return QString();
}
where QFile::permissions() drills down to ask for permissions using
QFileSystemMetaData::doStat(). This seems to cause the chmod issue we
have.
Not sure whether the failure described in this bug is caused by the
Toolkit's StateSaver services, but in case bug #1363112 fix solves this
issue, it can be marked as resolved. In StateSaver we have similar
issues as here, so at least I suspect the root cause is the same as we
have in the other bug.
--
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to qtbase-opensource-src in
Ubuntu.
https://bugs.launchpad.net/bugs/1359831
Title:
Apps incorrectly perform a chmod on XDG_RUNTIME_DIR
Status in Camera App:
Confirmed
Status in Ubuntu Reminders app:
Invalid
Status in Sudoku game for Ubuntu Touch:
Invalid
Status in “qtbase-opensource-src” package in Ubuntu:
Confirmed
Bug description:
From bug #1351041:
[Thu Jul 31 21:04:20 2014] type=1400 audit(1406837062.464:97): apparmor="DENIED" operation="chmod" profile="com.ubuntu.reminders_reminders_0.5.203" name="/run/user/32011/" pid=12954 comm="reminders" requested_mask="w" denied_mask="w" fsuid=32011 ouid=32011
From irc:
Aug 21 15:47:20 ubuntu-phablet kernel: [ 251.843308] type=1400 audit(1408636040.346:137): apparmor="DENIED" operation="chmod" profile="com.ubuntu.camera_camera_3.0.0.355" name="/run/user/32011/" pid=4172 comm="camera-app" requested_mask="w" denied_mask="w" fsuid=32011 ouid=32011
AppArmor policy is correct on this denial-- apps should not be able to
change the permissions on the /run/user/32011/ (XDG_RUNTIME_DIR)
directory. I filed this against camera-app and reminders, but my guess
is this is an underlying library that is causing this. I don't know if
the denial is causing errors with the app, but it is causing confusion
for users and developers who see the denial.
To manage notifications about this bug go to:
https://bugs.launchpad.net/camera-app/+bug/1359831/+subscriptions
References