Bring a couple of fixes from upstream:
* memory leak fix * set the schema name correctly on loaded items
This commit is contained in:
parent
f1db24f768
commit
6a9c09573d
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.82 2012/10/02 15:58:02 ajacoutot Exp $
|
||||
# $OpenBSD: Makefile,v 1.83 2012/10/14 11:46:55 ajacoutot Exp $
|
||||
|
||||
SHARED_ONLY= Yes
|
||||
|
||||
@ -6,7 +6,7 @@ COMMENT= password agent for the GNOME project
|
||||
|
||||
GNOME_PROJECT= gnome-keyring
|
||||
GNOME_VERSION= 3.6.0
|
||||
REVISION= 1
|
||||
REVISION= 2
|
||||
|
||||
HOMEPAGE= https://live.gnome.org/GnomeKeyring
|
||||
|
||||
|
@ -0,0 +1,23 @@
|
||||
$OpenBSD: patch-pkcs11_rpc-layer_gkm-rpc-module_c,v 1.1 2012/10/14 11:46:55 ajacoutot Exp $
|
||||
|
||||
From 0c71452290977332a0e86d9eb0d04b291cce2263 Mon Sep 17 00:00:00 2001
|
||||
From: Stef Walter <stefw@gnome.org>
|
||||
Date: Wed, 19 Sep 2012 07:12:39 +0000
|
||||
Subject: rpc-layer: Fix memory leak in call state pool
|
||||
|
||||
--- pkcs11/rpc-layer/gkm-rpc-module.c.orig Tue Sep 25 13:57:30 2012
|
||||
+++ pkcs11/rpc-layer/gkm-rpc-module.c Sun Oct 14 12:29:37 2012
|
||||
@@ -1254,6 +1254,13 @@ rpc_C_Finalize (CK_VOID_PTR reserved)
|
||||
warning (("finalizing the daemon returned an error: %d", ret));
|
||||
}
|
||||
|
||||
+ /* Cleanup the call state pool */
|
||||
+ while (call_state_pool) {
|
||||
+ cs = call_state_pool;
|
||||
+ call_state_pool = cs->next;
|
||||
+ call_destroy (cs);
|
||||
+ }
|
||||
+
|
||||
/* This should stop all other calls in */
|
||||
pkcs11_initialized = 0;
|
||||
pkcs11_initialized_pid = 0;
|
@ -1,10 +1,15 @@
|
||||
$OpenBSD: patch-pkcs11_secret-store_gkm-secret-binary_c,v 1.2 2012/03/29 06:51:38 ajacoutot Exp $
|
||||
$OpenBSD: patch-pkcs11_secret-store_gkm-secret-binary_c,v 1.3 2012/10/14 11:46:55 ajacoutot Exp $
|
||||
|
||||
On OpenBSD, time_t is an int.
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=652565
|
||||
|
||||
--- pkcs11/secret-store/gkm-secret-binary.c.orig Thu Mar 8 20:45:29 2012
|
||||
+++ pkcs11/secret-store/gkm-secret-binary.c Wed Mar 28 08:23:47 2012
|
||||
From b7648ca3864cf8d952468bae299806b0fcda5442 Mon Sep 17 00:00:00 2001
|
||||
From: Stef Walter <stefw@gnome.org>
|
||||
Date: Fri, 12 Oct 2012 15:39:53 +0000
|
||||
Subject: secret-store: Set the schema name correctly on loaded items
|
||||
|
||||
--- pkcs11/secret-store/gkm-secret-binary.c.orig Wed Sep 19 10:59:27 2012
|
||||
+++ pkcs11/secret-store/gkm-secret-binary.c Sun Oct 14 12:31:39 2012
|
||||
@@ -73,8 +73,8 @@ typedef struct {
|
||||
char *display_name;
|
||||
const guchar *ptr_secret;
|
||||
@ -16,7 +21,29 @@ https://bugzilla.gnome.org/show_bug.cgi?id=652565
|
||||
GHashTable *attributes;
|
||||
GList *acl;
|
||||
} ItemInfo;
|
||||
@@ -851,7 +851,7 @@ gkm_secret_binary_read (GkmSecretCollection *collectio
|
||||
@@ -738,15 +738,18 @@ static void
|
||||
setup_item_from_info (GkmSecretItem *item, GkmSecretData *data, ItemInfo *info)
|
||||
{
|
||||
GkmSecretObject *obj = GKM_SECRET_OBJECT (item);
|
||||
+ const gchar *schema_name;
|
||||
GkmSecret *secret;
|
||||
- const gchar *type;
|
||||
|
||||
gkm_secret_object_set_label (obj, info->display_name);
|
||||
gkm_secret_object_set_created (obj, info->ctime);
|
||||
gkm_secret_object_set_modified (obj, info->mtime);
|
||||
|
||||
- type = gkm_secret_compat_format_item_type (info->type);
|
||||
- gkm_secret_item_set_schema (item, type);
|
||||
+ schema_name = g_hash_table_lookup (info->attributes, GKM_SECRET_FIELD_SCHEMA);
|
||||
+ if (schema_name == NULL)
|
||||
+ schema_name = gkm_secret_compat_format_item_type (info->type);
|
||||
+ gkm_secret_item_set_schema (item, schema_name);
|
||||
+
|
||||
gkm_secret_item_set_fields (item, info->attributes);
|
||||
|
||||
/* Collection is locked */
|
||||
@@ -851,7 +854,7 @@ gkm_secret_binary_read (GkmSecretCollection *collectio
|
||||
guchar major, minor, crypto, hash;
|
||||
guint32 flags;
|
||||
guint32 lock_timeout;
|
||||
|
@ -0,0 +1,59 @@
|
||||
$OpenBSD: patch-pkcs11_secret-store_gkm-secret-textual_c,v 1.1 2012/10/14 11:46:55 ajacoutot Exp $
|
||||
|
||||
From b7648ca3864cf8d952468bae299806b0fcda5442 Mon Sep 17 00:00:00 2001
|
||||
From: Stef Walter <stefw@gnome.org>
|
||||
Date: Fri, 12 Oct 2012 15:39:53 +0000
|
||||
Subject: secret-store: Set the schema name correctly on loaded items
|
||||
|
||||
--- pkcs11/secret-store/gkm-secret-textual.c.orig Wed Sep 19 06:54:58 2012
|
||||
+++ pkcs11/secret-store/gkm-secret-textual.c Sun Oct 14 12:30:20 2012
|
||||
@@ -122,7 +122,10 @@ generate_attributes (GKeyFile *file, GkmSecretItem *it
|
||||
}
|
||||
|
||||
static void
|
||||
-parse_attributes (GKeyFile *file, GkmSecretItem *item, const gchar **groups)
|
||||
+parse_attributes (GKeyFile *file,
|
||||
+ GkmSecretItem *item,
|
||||
+ const gchar **groups,
|
||||
+ gint compat_type)
|
||||
{
|
||||
GHashTable *attributes;
|
||||
const gchar *identifier;
|
||||
@@ -130,6 +133,7 @@ parse_attributes (GKeyFile *file, GkmSecretItem *item,
|
||||
gchar *prefix;
|
||||
gchar *name, *type;
|
||||
guint64 number;
|
||||
+ const gchar *schema_name;
|
||||
|
||||
/* Now do the attributes */
|
||||
|
||||
@@ -163,6 +167,12 @@ parse_attributes (GKeyFile *file, GkmSecretItem *item,
|
||||
}
|
||||
|
||||
gkm_secret_item_set_fields (item, attributes);
|
||||
+
|
||||
+ schema_name = g_hash_table_lookup (attributes, GKM_SECRET_FIELD_SCHEMA);
|
||||
+ if (schema_name == NULL)
|
||||
+ schema_name = gkm_secret_compat_format_item_type (compat_type);
|
||||
+ gkm_secret_item_set_schema (item, schema_name);
|
||||
+
|
||||
g_hash_table_unref (attributes);
|
||||
g_free (prefix);
|
||||
}
|
||||
@@ -331,7 +341,6 @@ parse_item (GKeyFile *file, GkmSecretItem *item, GkmSe
|
||||
g_clear_error (&err);
|
||||
type = 0;
|
||||
}
|
||||
- gkm_secret_item_set_schema (item, gkm_secret_compat_format_item_type (type));
|
||||
|
||||
val = g_key_file_get_string (file, identifier, "display-name", NULL);
|
||||
gkm_secret_object_set_label (obj, val);
|
||||
@@ -374,7 +383,7 @@ parse_item (GKeyFile *file, GkmSecretItem *item, GkmSe
|
||||
gkm_secret_object_set_created (obj, num);
|
||||
|
||||
/* Now the other stuff */
|
||||
- parse_attributes (file, item, groups);
|
||||
+ parse_attributes (file, item, groups, type);
|
||||
parse_acl (file, item, groups);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user