summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2010-06-08 03:34:32 +0000
committerStef Walter <stef@memberwebs.com>2010-06-20 22:37:50 +0000
commitada4d84e8cc58385c7ef0fbcc61df4e85ff2662a (patch)
tree66bce4ffde9ecdde62ab03164cf62b90e36b70a3
parent13244fe1f09d157712ae799ee2ff1e9b481ae7f9 (diff)
downloadgnome-keyring-ada4d84e8cc58385c7ef0fbcc61df4e85ff2662a.tar.gz
Use proper locking for secure memory in daemon.
Previously the daemon didn't need locking, however now that it's based around PKCS#11 modules and threading, it does.
-rw-r--r--daemon/gkd-main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/daemon/gkd-main.c b/daemon/gkd-main.c
index 55790eb2..f9d9764c 100644
--- a/daemon/gkd-main.c
+++ b/daemon/gkd-main.c
@@ -160,16 +160,18 @@ static gboolean do_warning = TRUE;
* locking for memory between threads
*/
+G_LOCK_DEFINE_STATIC (memory_mutex);
+
void
egg_memory_lock (void)
{
- /* The daemon uses cooperative threading, and doesn't need locking */
+ G_LOCK (memory_mutex);
}
void
egg_memory_unlock (void)
{
- /* The daemon uses cooperative threading, and doesn't need locking */
+ G_LOCK (memory_mutex);
}
void*