blob: 590a39c0980928f6d36c8540e82dd0ae577aed5c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
Taken from http://pkgs.fedoraproject.org/cgit/sugar.git/tree/sugar-gnomekeyring.patch
diff --git a/bin/sugar.in b/bin/sugar.in
index 12098db..df27143 100644
--- a/bin/sugar.in
+++ b/bin/sugar.in
@@ -62,6 +62,26 @@ export LANGUAGE="${LANGUAGE:-${LANG}}"
# Set Sugar's telepathy accounts directory
export MC_ACCOUNT_DIR=$HOME/.sugar/$SUGAR_PROFILE/accounts
+# Check if the keyring exists and create a default
+# unencrypted keyring (OLPC #10290)
+keyring_path=$HOME/.gnome2/keyrings
+if [ ! -e $keyring_path/login.keyring ] &&
+ [ ! -e $keyring_path/default.keyring ]; then
+ mkdir -p $keyring_path
+ echo 'default' > $keyring_path/default
+ TIME=$(/bin/date +%s)
+ cat >> $keyring_path/default.keyring.tmp <<EOF
+[keyring]
+display-name=default
+ctime=$TIME
+mtime=$TIME
+lock-on-idle=false
+lock-timeout=0
+EOF
+
+mv $keyring_path/default.keyring{.tmp,}
+fi
+
# Workaround until gnome-keyring-daemon lets dbus activate it
# https://bugzilla.gnome.org/show_bug.cgi?id=628302
if test "$SUGAR_EMULATOR" = "yes" -a "$(type gnome-keyring-daemon)"; then
|