[gnome-keyring/gnome-2-30] Use proper locking for secure memory in daemon.
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-keyring/gnome-2-30] Use proper locking for secure memory in daemon.
- Date: Sun, 20 Jun 2010 22:42:11 +0000 (UTC)
commit ada4d84e8cc58385c7ef0fbcc61df4e85ff2662a
Author: Stef Walter <stef memberwebs com>
Date: Tue Jun 8 03:34:32 2010 +0000
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.
daemon/gkd-main.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/daemon/gkd-main.c b/daemon/gkd-main.c
index 55790eb..f9d9764 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*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]