Merge lp:~mardy/ubuntu-system-settings-online-accounts/lp1219644-cont into lp:~online-accounts/ubuntu-system-settings-online-accounts/master

Proposed by Alberto Mardegan
Status: Merged
Merged at revision: 230
Proposed branch: lp:~mardy/ubuntu-system-settings-online-accounts/lp1219644-cont
Merge into: lp:~online-accounts/ubuntu-system-settings-online-accounts/master
Diff against target: 157 lines (+124/-0)
3 files modified
online-accounts-service/ui-proxy.cpp (+7/-0)
online-accounts-ui/signonui-request.cpp (+9/-0)
po/oc.po (+108/-0)
To merge this branch: bzr merge lp:~mardy/ubuntu-system-settings-online-accounts/lp1219644-cont
Reviewer Review Type Date Requested Status
Justin McPherson Approve
Review via email: mp+249070@code.launchpad.net

Commit message

Create ~/.cache/online-accounts-ui, don't query apparmor for self

These fixes the issues described here:
https://bugs.launchpad.net/ubuntu-system-settings-online-accounts/+bug/1219644/comments/13

Description of the change

Create ~/.cache/online-accounts-ui, don't query apparmor for self

These fixes the issues described here:
https://bugs.launchpad.net/ubuntu-system-settings-online-accounts/+bug/1219644/comments/13

To post a comment you must log in.
Revision history for this message
Justin McPherson (justinmcp) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'online-accounts-service/ui-proxy.cpp'
2--- online-accounts-service/ui-proxy.cpp 2015-01-14 09:31:14 +0000
3+++ online-accounts-service/ui-proxy.cpp 2015-02-09 13:15:11 +0000
4@@ -246,6 +246,13 @@
5 setupPromptSession();
6 }
7
8+ /* We also create ~/cache/online-accounts-ui/, since the plugin might not
9+ * have permissions to do that. */
10+ QString userCacheDir =
11+ QStandardPaths::writableLocation(QStandardPaths::GenericCacheLocation);
12+ QDir cacheDir(userCacheDir + "/online-accounts-ui");
13+ if (!cacheDir.exists()) cacheDir.mkpath(".");
14+
15 return true;
16 }
17
18
19=== modified file 'online-accounts-ui/signonui-request.cpp'
20--- online-accounts-ui/signonui-request.cpp 2015-01-14 09:31:14 +0000
21+++ online-accounts-ui/signonui-request.cpp 2015-02-09 13:15:11 +0000
22@@ -33,6 +33,8 @@
23 #include <SignOn/uisessiondata.h>
24 #include <SignOn/uisessiondata_priv.h>
25 #include <sys/apparmor.h>
26+#include <sys/types.h>
27+#include <unistd.h>
28
29 using namespace SignOnUi;
30
31@@ -135,6 +137,13 @@
32 if (profile == "unconfined" &&
33 parameters.contains(SSOUI_KEY_PID)) {
34 pid_t pid = parameters.value(SSOUI_KEY_PID).toUInt();
35+ if (pid == getpid()) {
36+ /* If the request was initiated by our own process, we might not
37+ * have the rights to call the aa_* functions (we might be
38+ * confined). */
39+ return QString();
40+ }
41+
42 char *con = NULL, *mode = NULL;
43 int ret = aa_gettaskcon(pid, &con, &mode);
44 if (Q_LIKELY(ret >= 0)) {
45
46=== added file 'po/oc.po'
47--- po/oc.po 1970-01-01 00:00:00 +0000
48+++ po/oc.po 2015-02-09 13:15:11 +0000
49@@ -0,0 +1,108 @@
50+# Occitan (post 1500) translation for ubuntu-system-settings-online-accounts
51+# Copyright (c) 2015 Rosetta Contributors and Canonical Ltd 2015
52+# This file is distributed under the same license as the ubuntu-system-settings-online-accounts package.
53+# FIRST AUTHOR <EMAIL@ADDRESS>, 2015.
54+#
55+msgid ""
56+msgstr ""
57+"Project-Id-Version: ubuntu-system-settings-online-accounts\n"
58+"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
59+"POT-Creation-Date: 2014-08-26 10:31+0200\n"
60+"PO-Revision-Date: 2015-02-06 06:22+0000\n"
61+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
62+"Language-Team: Occitan (post 1500) <oc@li.org>\n"
63+"MIME-Version: 1.0\n"
64+"Content-Type: text/plain; charset=UTF-8\n"
65+"Content-Transfer-Encoding: 8bit\n"
66+"X-Launchpad-Export-Date: 2015-02-07 07:31+0000\n"
67+"X-Generator: Launchpad (build 17331)\n"
68+
69+#: ../plugins/example/Main.qml:33
70+msgid "User name"
71+msgstr "Nom d'utilizaire"
72+
73+#: ../plugins/example/Main.qml:39
74+msgid "Password"
75+msgstr "Senhal"
76+
77+#: ../system-settings-plugin/AccountsPage.qml:51
78+msgid "Add account…"
79+msgstr "Apondre un compte…"
80+
81+#: ../system-settings-plugin/AddAccountLabel.qml:27
82+msgid ""
83+"Storing account details here lets apps use the accounts without you having "
84+"to sign in for each app."
85+msgstr ""
86+
87+#: ../system-settings-plugin/MainPage.qml:29
88+#: ../online-accounts-ui/qml/ProviderRequest.qml:51
89+#: ../online-accounts-ui/qml/ProviderRequest.qml:119 ../.build/settings.js:1
90+msgid "Accounts"
91+msgstr "Comptes"
92+
93+#: ../system-settings-plugin/NewAccountPage.qml:23
94+msgid "Add account"
95+msgstr "Apondre un compte"
96+
97+#: ../system-settings-plugin/NoAccountsPage.qml:36
98+msgid "No accounts"
99+msgstr ""
100+
101+#: ../system-settings-plugin/NoAccountsPage.qml:44
102+msgid "Add account:"
103+msgstr ""
104+
105+#: ../online-accounts-ui/module/OAuth.qml:119
106+msgid "Loading…"
107+msgstr "Cargament…"
108+
109+#: ../online-accounts-ui/module/OAuth.qml:149
110+#: ../online-accounts-ui/module/RemovalConfirmation.qml:43
111+#: ../online-accounts-ui/qml/SignOnUiPage.qml:30
112+msgid "Cancel"
113+msgstr "Abandonar"
114+
115+#: ../online-accounts-ui/module/Options.qml:36
116+msgid "ID"
117+msgstr "Identificant"
118+
119+#: ../online-accounts-ui/module/Options.qml:48
120+msgid "Remove account…"
121+msgstr "Suprimir lo compte..."
122+
123+#: ../online-accounts-ui/module/RemovalConfirmation.qml:32
124+msgid "Remove account"
125+msgstr "Suprimir lo compte"
126+
127+#: ../online-accounts-ui/module/RemovalConfirmation.qml:33
128+#, qt-format
129+msgid ""
130+"The %1 account will be removed only from your phone. You can add it again "
131+"later."
132+msgstr ""
133+
134+#: ../online-accounts-ui/module/RemovalConfirmation.qml:38
135+msgid "Remove"
136+msgstr "Suprimir"
137+
138+#: ../online-accounts-ui/module/ServiceSwitches.qml:33
139+msgid "Access to this account:"
140+msgstr ""
141+
142+#: ../online-accounts-ui/qml/AuthorizationPage.qml:41
143+#, qt-format
144+msgid "%1 wants to access your %2 account"
145+msgstr ""
146+
147+#: ../online-accounts-ui/qml/AuthorizationPage.qml:64
148+msgid "Allow"
149+msgstr "Autorizar"
150+
151+#: ../online-accounts-ui/qml/AuthorizationPage.qml:71
152+msgid "Don't allow"
153+msgstr "Refusar"
154+
155+#: ../online-accounts-ui/qml/ProviderRequest.qml:87
156+msgid "Add another"
157+msgstr ""

Subscribers

People subscribed via source and target branches