Thu, 28 Mar 2013 11:15:06 +0100
More password wiping, better password management withing account.c, using actual UI name with KWallet
|
33984
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
1 | /** |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
2 | * @file internalkeyring.c internal keyring |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
3 | * @ingroup plugins |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
4 | */ |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
5 | |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
6 | /* purple |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
7 | * |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
8 | * Purple is the legal property of its developers, whose names are too numerous |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
9 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
10 | * source distribution. |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
11 | * |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
12 | * This program is free software; you can redistribute it and/or modify |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
13 | * it under the terms of the GNU General Public License as published by |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
14 | * the Free Software Foundation; either version 2 of the License, or |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
15 | * (at your option) any later version. |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
16 | * |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
17 | * This program is distributed in the hope that it will be useful, |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
20 | * GNU General Public License for more details. |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
21 | * |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
22 | * You should have received a copy of the GNU General Public License |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
23 | * along with this program ; if not, write to the Free Software |
|
34128
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
24 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
|
33984
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
25 | */ |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
26 | |
|
34076
64e389ae5cc3
Clean up headers and stuff.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34052
diff
changeset
|
27 | #include "internal.h" |
|
33984
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
28 | #include "account.h" |
|
34076
64e389ae5cc3
Clean up headers and stuff.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34052
diff
changeset
|
29 | #include "debug.h" |
|
33984
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
30 | #include "keyring.h" |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
31 | #include "plugin.h" |
|
34076
64e389ae5cc3
Clean up headers and stuff.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34052
diff
changeset
|
32 | #include "version.h" |
|
33984
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
33 | |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
34 | #define INTERNALKEYRING_NAME N_("Internal keyring") |
|
34128
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
35 | #define INTERNALKEYRING_DESCRIPTION N_("This plugin provides the default" \ |
|
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
36 | " password storage behaviour for libpurple. Password will be stored" \ |
|
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
37 | " unencrypted.") |
|
34093
c8197603fa20
Use better keyring IDs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34082
diff
changeset
|
38 | #define INTERNALKEYRING_AUTHOR "Scrouaf (scrouaf[at]soc.pidgin.im)" |
|
34036
bf17ffca901d
Give this a better name.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34035
diff
changeset
|
39 | #define INTERNALKEYRING_ID PURPLE_DEFAULT_KEYRING |
|
33984
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
40 | |
|
34128
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
41 | static gboolean internal_keyring_opened = FALSE; |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
42 | static GHashTable *internal_keyring_passwords = NULL; |
|
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
43 | static PurpleKeyring *keyring_handler = NULL; |
|
33984
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
44 | |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
45 | /***********************************************/ |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
46 | /* Keyring interface */ |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
47 | /***********************************************/ |
|
34128
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
48 | |
|
34032
2eeafc43c7f2
Rearrange code so we can drop the prototypes. Most of it was already
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34031
diff
changeset
|
49 | static void |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
50 | internal_keyring_open(void) |
|
34032
2eeafc43c7f2
Rearrange code so we can drop the prototypes. Most of it was already
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34031
diff
changeset
|
51 | { |
|
34128
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
52 | if (internal_keyring_opened) |
|
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
53 | return; |
|
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
54 | internal_keyring_opened = TRUE; |
|
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
55 | |
|
34032
2eeafc43c7f2
Rearrange code so we can drop the prototypes. Most of it was already
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34031
diff
changeset
|
56 | internal_keyring_passwords = g_hash_table_new_full(g_direct_hash, |
|
34146
99bad5c80d1e
More password wiping, better password management withing account.c, using actual UI name with KWallet
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34131
diff
changeset
|
57 | g_direct_equal, NULL, (GDestroyNotify)purple_str_wipe); |
|
34032
2eeafc43c7f2
Rearrange code so we can drop the prototypes. Most of it was already
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34031
diff
changeset
|
58 | } |
|
2eeafc43c7f2
Rearrange code so we can drop the prototypes. Most of it was already
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34031
diff
changeset
|
59 | |
|
34033
910f2ed3988b
Remove trailing whitespace.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34032
diff
changeset
|
60 | static void |
|
34128
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
61 | internal_keyring_read(PurpleAccount *account, PurpleKeyringReadCallback cb, |
|
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
62 | gpointer data) |
|
33984
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
63 | { |
|
34041
75204e58b8ca
Fix const-ness of strings, and silly strdups.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34036
diff
changeset
|
64 | const char *password; |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
65 | GError *error; |
|
33984
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
66 | |
|
34128
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
67 | internal_keyring_open(); |
|
33987
9beebdbf44d6
Fixed many bugs and crashes in the keyring subsystem.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33984
diff
changeset
|
68 | |
|
34051
07742e8210e2
These macros just mask what's going on here.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34048
diff
changeset
|
69 | password = g_hash_table_lookup(internal_keyring_passwords, account); |
|
33984
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
70 | |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
71 | if (password != NULL) { |
|
34127
51c1bce7f52f
Tidying debug messages, signals
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34116
diff
changeset
|
72 | purple_debug_misc("keyring-internal", |
|
51c1bce7f52f
Tidying debug messages, signals
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34116
diff
changeset
|
73 | "Got password for account %s (%s).\n", |
|
51c1bce7f52f
Tidying debug messages, signals
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34116
diff
changeset
|
74 | purple_account_get_username(account), |
|
51c1bce7f52f
Tidying debug messages, signals
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34116
diff
changeset
|
75 | purple_account_get_protocol_id(account)); |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
76 | if (cb != NULL) |
|
33987
9beebdbf44d6
Fixed many bugs and crashes in the keyring subsystem.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33984
diff
changeset
|
77 | cb(account, password, NULL, data); |
|
33984
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
78 | } else { |
|
34129
52b91b4b8314
Proper error handling when doing a password migration, fixes reverting it.
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34128
diff
changeset
|
79 | if (purple_debug_is_verbose()) { |
|
52b91b4b8314
Proper error handling when doing a password migration, fixes reverting it.
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34128
diff
changeset
|
80 | purple_debug_misc("keyring-internal", |
|
52b91b4b8314
Proper error handling when doing a password migration, fixes reverting it.
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34128
diff
changeset
|
81 | "No password for account %s (%s).\n", |
|
52b91b4b8314
Proper error handling when doing a password migration, fixes reverting it.
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34128
diff
changeset
|
82 | purple_account_get_username(account), |
|
52b91b4b8314
Proper error handling when doing a password migration, fixes reverting it.
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34128
diff
changeset
|
83 | purple_account_get_protocol_id(account)); |
|
52b91b4b8314
Proper error handling when doing a password migration, fixes reverting it.
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34128
diff
changeset
|
84 | } |
|
34047
c2e68ddbf27c
Correctly namespace these keyring errors.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34041
diff
changeset
|
85 | error = g_error_new(PURPLE_KEYRING_ERROR, |
|
34048
2d14a219c886
Make stuff consistent.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34047
diff
changeset
|
86 | PURPLE_KEYRING_ERROR_NOPASSWD, "Password not found."); |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
87 | if (cb != NULL) |
|
33987
9beebdbf44d6
Fixed many bugs and crashes in the keyring subsystem.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33984
diff
changeset
|
88 | cb(account, NULL, error, data); |
|
33984
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
89 | g_error_free(error); |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
90 | } |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
91 | } |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
92 | |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
93 | static void |
|
34128
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
94 | internal_keyring_save(PurpleAccount *account, const gchar *password, |
|
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
95 | PurpleKeyringSaveCallback cb, gpointer data) |
|
33984
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
96 | { |
|
34129
52b91b4b8314
Proper error handling when doing a password migration, fixes reverting it.
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34128
diff
changeset
|
97 | void *old_password; |
|
34128
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
98 | internal_keyring_open(); |
|
34127
51c1bce7f52f
Tidying debug messages, signals
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34116
diff
changeset
|
99 | |
|
34129
52b91b4b8314
Proper error handling when doing a password migration, fixes reverting it.
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34128
diff
changeset
|
100 | old_password = g_hash_table_lookup(internal_keyring_passwords, account); |
|
52b91b4b8314
Proper error handling when doing a password migration, fixes reverting it.
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34128
diff
changeset
|
101 | |
|
34127
51c1bce7f52f
Tidying debug messages, signals
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34116
diff
changeset
|
102 | if (password == NULL) |
|
33984
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
103 | g_hash_table_remove(internal_keyring_passwords, account); |
|
34128
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
104 | else { |
|
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
105 | g_hash_table_replace(internal_keyring_passwords, account, |
|
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
106 | g_strdup(password)); |
|
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
107 | } |
|
33987
9beebdbf44d6
Fixed many bugs and crashes in the keyring subsystem.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33984
diff
changeset
|
108 | |
|
34129
52b91b4b8314
Proper error handling when doing a password migration, fixes reverting it.
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34128
diff
changeset
|
109 | if (!(password == NULL && old_password == NULL)) { |
|
52b91b4b8314
Proper error handling when doing a password migration, fixes reverting it.
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34128
diff
changeset
|
110 | purple_debug_misc("keyring-internal", |
|
52b91b4b8314
Proper error handling when doing a password migration, fixes reverting it.
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34128
diff
changeset
|
111 | "Password %s for account %s (%s).\n", |
|
52b91b4b8314
Proper error handling when doing a password migration, fixes reverting it.
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34128
diff
changeset
|
112 | (password == NULL ? "removed" : (old_password == NULL ? "saved" : "updated")), |
|
52b91b4b8314
Proper error handling when doing a password migration, fixes reverting it.
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34128
diff
changeset
|
113 | purple_account_get_username(account), |
|
52b91b4b8314
Proper error handling when doing a password migration, fixes reverting it.
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34128
diff
changeset
|
114 | purple_account_get_protocol_id(account)); |
|
52b91b4b8314
Proper error handling when doing a password migration, fixes reverting it.
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34128
diff
changeset
|
115 | } else if (purple_debug_is_verbose()) { |
|
52b91b4b8314
Proper error handling when doing a password migration, fixes reverting it.
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34128
diff
changeset
|
116 | purple_debug_misc("keyring-internal", |
|
52b91b4b8314
Proper error handling when doing a password migration, fixes reverting it.
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34128
diff
changeset
|
117 | "Password for account %s (%s) was already removed.\n", |
|
52b91b4b8314
Proper error handling when doing a password migration, fixes reverting it.
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34128
diff
changeset
|
118 | purple_account_get_username(account), |
|
52b91b4b8314
Proper error handling when doing a password migration, fixes reverting it.
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34128
diff
changeset
|
119 | purple_account_get_protocol_id(account)); |
|
52b91b4b8314
Proper error handling when doing a password migration, fixes reverting it.
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34128
diff
changeset
|
120 | } |
|
33984
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
121 | |
|
33987
9beebdbf44d6
Fixed many bugs and crashes in the keyring subsystem.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33984
diff
changeset
|
122 | if (cb != NULL) |
|
9beebdbf44d6
Fixed many bugs and crashes in the keyring subsystem.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33984
diff
changeset
|
123 | cb(account, NULL, data); |
|
33984
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
124 | } |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
125 | |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
126 | static void |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
127 | internal_keyring_close(GError **error) |
|
33984
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
128 | { |
|
34128
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
129 | if (!internal_keyring_opened) |
|
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
130 | return; |
|
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
131 | internal_keyring_opened = FALSE; |
|
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
132 | |
|
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
133 | g_hash_table_destroy(internal_keyring_passwords); |
|
33987
9beebdbf44d6
Fixed many bugs and crashes in the keyring subsystem.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33984
diff
changeset
|
134 | internal_keyring_passwords = NULL; |
|
9beebdbf44d6
Fixed many bugs and crashes in the keyring subsystem.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33984
diff
changeset
|
135 | } |
|
9beebdbf44d6
Fixed many bugs and crashes in the keyring subsystem.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33984
diff
changeset
|
136 | |
|
33984
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
137 | static gboolean |
|
34128
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
138 | internal_keyring_import_password(PurpleAccount *account, const char *mode, |
|
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
139 | const char *data, GError **error) |
|
33984
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
140 | { |
|
34128
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
141 | g_return_val_if_fail(account != NULL, FALSE); |
|
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
142 | g_return_val_if_fail(data != NULL, FALSE); |
|
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
143 | |
|
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
144 | internal_keyring_open(); |
|
34127
51c1bce7f52f
Tidying debug messages, signals
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34116
diff
changeset
|
145 | |
|
34128
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
146 | if (mode == NULL) |
|
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
147 | mode = "cleartext"; |
|
33987
9beebdbf44d6
Fixed many bugs and crashes in the keyring subsystem.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33984
diff
changeset
|
148 | |
|
34128
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
149 | if (g_strcmp0(mode, "cleartext") == 0) { |
|
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
150 | g_hash_table_replace(internal_keyring_passwords, account, |
|
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
151 | g_strdup(data)); |
|
33984
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
152 | return TRUE; |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
153 | } else { |
|
34127
51c1bce7f52f
Tidying debug messages, signals
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34116
diff
changeset
|
154 | if (error != NULL) { |
|
51c1bce7f52f
Tidying debug messages, signals
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34116
diff
changeset
|
155 | *error = g_error_new(PURPLE_KEYRING_ERROR, |
|
51c1bce7f52f
Tidying debug messages, signals
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34116
diff
changeset
|
156 | PURPLE_KEYRING_ERROR_WRONGFORMAT, |
|
51c1bce7f52f
Tidying debug messages, signals
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34116
diff
changeset
|
157 | "invalid mode"); |
|
51c1bce7f52f
Tidying debug messages, signals
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34116
diff
changeset
|
158 | } |
|
33984
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
159 | return FALSE; |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
160 | } |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
161 | } |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
162 | |
|
34033
910f2ed3988b
Remove trailing whitespace.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34032
diff
changeset
|
163 | static gboolean |
|
34128
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
164 | internal_keyring_export_password(PurpleAccount *account, const char **mode, |
|
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
165 | char **data, GError **error, GDestroyNotify *destroy) |
|
33984
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
166 | { |
|
34034
f508fa47f2ac
Reformat many things.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34033
diff
changeset
|
167 | gchar *password; |
|
33984
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
168 | |
|
34128
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
169 | internal_keyring_open(); |
|
33987
9beebdbf44d6
Fixed many bugs and crashes in the keyring subsystem.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33984
diff
changeset
|
170 | |
|
34051
07742e8210e2
These macros just mask what's going on here.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34048
diff
changeset
|
171 | password = g_hash_table_lookup(internal_keyring_passwords, account); |
|
33984
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
172 | |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
173 | if (password == NULL) { |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
174 | return FALSE; |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
175 | } else { |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
176 | *mode = "cleartext"; |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
177 | *data = g_strdup(password); |
|
34146
99bad5c80d1e
More password wiping, better password management withing account.c, using actual UI name with KWallet
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34131
diff
changeset
|
178 | *destroy = (GDestroyNotify)purple_str_wipe; |
|
33984
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
179 | return TRUE; |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
180 | } |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
181 | } |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
182 | |
|
34128
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
183 | /***********************************************/ |
|
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
184 | /* Plugin interface */ |
|
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
185 | /***********************************************/ |
|
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
186 | |
|
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
187 | static gboolean |
|
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
188 | internal_keyring_load(PurplePlugin *plugin) |
|
33984
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
189 | { |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
190 | keyring_handler = purple_keyring_new(); |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
191 | |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
192 | purple_keyring_set_name(keyring_handler, INTERNALKEYRING_NAME); |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
193 | purple_keyring_set_id(keyring_handler, INTERNALKEYRING_ID); |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
194 | purple_keyring_set_read_password(keyring_handler, internal_keyring_read); |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
195 | purple_keyring_set_save_password(keyring_handler, internal_keyring_save); |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
196 | purple_keyring_set_close_keyring(keyring_handler, internal_keyring_close); |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
197 | purple_keyring_set_import_password(keyring_handler, internal_keyring_import_password); |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
198 | purple_keyring_set_export_password(keyring_handler, internal_keyring_export_password); |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
199 | |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
200 | purple_keyring_register(keyring_handler); |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
201 | |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
202 | return TRUE; |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
203 | } |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
204 | |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
205 | static gboolean |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
206 | internal_keyring_unload(PurplePlugin *plugin) |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
207 | { |
|
34128
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
208 | if (purple_keyring_get_inuse() == keyring_handler) { |
|
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
209 | purple_debug_warning("keyring-internal", |
|
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
210 | "keyring in use, cannot unload\n"); |
|
34096
3d28c3311ad0
Don't allow unloading a plugin if its keyring is active.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34095
diff
changeset
|
211 | return FALSE; |
|
34128
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
212 | } |
|
34096
3d28c3311ad0
Don't allow unloading a plugin if its keyring is active.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34095
diff
changeset
|
213 | |
|
34128
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
214 | internal_keyring_close(NULL); |
|
33987
9beebdbf44d6
Fixed many bugs and crashes in the keyring subsystem.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33984
diff
changeset
|
215 | |
|
34128
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
216 | purple_keyring_unregister(keyring_handler); |
|
33987
9beebdbf44d6
Fixed many bugs and crashes in the keyring subsystem.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33984
diff
changeset
|
217 | purple_keyring_free(keyring_handler); |
|
9beebdbf44d6
Fixed many bugs and crashes in the keyring subsystem.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33984
diff
changeset
|
218 | keyring_handler = NULL; |
|
9beebdbf44d6
Fixed many bugs and crashes in the keyring subsystem.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
33984
diff
changeset
|
219 | |
|
33984
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
220 | return TRUE; |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
221 | } |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
222 | |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
223 | PurplePluginInfo plugininfo = |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
224 | { |
|
34128
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
225 | PURPLE_PLUGIN_MAGIC, /* magic */ |
|
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
226 | PURPLE_MAJOR_VERSION, /* major_version */ |
|
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
227 | PURPLE_MINOR_VERSION, /* minor_version */ |
|
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
228 | PURPLE_PLUGIN_STANDARD, /* type */ |
|
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
229 | NULL, /* ui_requirement */ |
|
34116
825c98f8c7f6
Get rid of PURPLE_PLUGIN_FLAG_AUTOLOAD
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34110
diff
changeset
|
230 | PURPLE_PLUGIN_FLAG_INVISIBLE, /* flags */ |
|
34128
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
231 | NULL, /* dependencies */ |
|
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
232 | PURPLE_PRIORITY_DEFAULT, /* priority */ |
|
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
233 | INTERNALKEYRING_ID, /* id */ |
|
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
234 | INTERNALKEYRING_NAME, /* name */ |
|
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
235 | DISPLAY_VERSION, /* version */ |
|
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
236 | "Internal Keyring Plugin", /* summary */ |
|
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
237 | INTERNALKEYRING_DESCRIPTION, /* description */ |
|
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
238 | INTERNALKEYRING_AUTHOR, /* author */ |
|
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
239 | PURPLE_WEBSITE, /* homepage */ |
|
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
240 | internal_keyring_load, /* load */ |
|
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
241 | internal_keyring_unload, /* unload */ |
|
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
242 | NULL, /* destroy */ |
|
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
243 | NULL, /* ui_info */ |
|
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
244 | NULL, /* extra_info */ |
|
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
245 | NULL, /* prefs_info */ |
|
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
246 | NULL, /* actions */ |
|
0cbd558ab5e7
Tidy up internal keyring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34127
diff
changeset
|
247 | NULL, NULL, NULL, NULL /* padding */ |
|
33984
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
248 | }; |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
249 | |
|
34033
910f2ed3988b
Remove trailing whitespace.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34032
diff
changeset
|
250 | static void |
|
33984
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
251 | init_plugin(PurplePlugin *plugin) |
|
34033
910f2ed3988b
Remove trailing whitespace.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
34032
diff
changeset
|
252 | { |
|
33984
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
253 | } |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
254 | |
|
7459475b1495
Added the gnome keyring plugin, and finally got makefiles to work.
Vivien Bernet-Rollande <scrouaf@soc.pidgin.im>
parents:
diff
changeset
|
255 | PURPLE_INIT_PLUGIN(internal_keyring, init_plugin, plugininfo) |