The SECRET_SCHEMA_* extern structs are not introspectable; add a new
accessor function which takes an enum and returns a struct, which is
introspectable.
Mark the old extern structs as (skip), but don’t deprecate them because
they’re still useful from C (if unconventional).
Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://bugzilla.gnome.org/show_bug.cgi?id=697681
If the gnome-keyring D-Bus service is not responding, we wind up freeing
the SearchClosure in an error path without ever creating a SecretService
object. Guard against this.
https://bugzilla.gnome.org/show_bug.cgi?id=787391
Without this the generated C code compiles without the correct header (warnings
are disabled so this is not obvious). This was causing the test to crash on
Ubuntu (exact cause not diagnosed).
https://bugzilla.gnome.org/show_bug.cgi?id=767002
Since it enables cross-compilation by looking for a host triplet
prefixed pkg-config binary, e.g. i686-pc-linux-gnu-pkg-config when
passing --host=i686-pc-linux-gnu to cross-compile for x86
https://bugzilla.gnome.org/show_bug.cgi?id=748111
g_atomic_int_add (&schema->refs, -1); will return the value of 'refs'
_before_ adding -1 to it, so checking this value for 0 to see if the
refcount dropped to 0 after adding -1 is not going to work and will
cause a leak.
Using g_atomic_int_dec_and_test() fixes this problem as this will return
TRUE when the value drops to 0 after being decremented.
https://bugzilla.gnome.org/show_bug.cgi?id=756766
libsecret ships headers from valgrind, but they seem to come from an old
version. Update to the headers from valgrind-3.11.0-1.fc23.x86_64
in order to get VG_DO_ADDED_LEAK_CHECK definition.
https://bugzilla.gnome.org/show_bug.cgi?id=756766
The memory allocated for the SecretSync instance itself was not freed. This fixes:
==7106== 24 bytes in 1 blocks are definitely lost in loss record 855 of 1,629
==7106== at 0x4C2A9C7: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==7106== by 0x600303F: g_malloc0 (gmem.c:124)
==7106== by 0x6003322: g_malloc0_n (gmem.c:354)
==7106== by 0x4E6979D: _secret_sync_new (secret-util.c:441)
==7106== by 0x4E65D11: secret_service_read_alias_dbus_path_sync (secret-paths.c:2334)
==7106== by 0x4E4E09E: secret_collection_for_alias_sync (secret-collection.c:2221)
==7106== by 0x40270E: test_for_alias_sync (test-collection.c:187)
==7106== by 0x60258FA: test_case_run (gtestutils.c:2158)
==7106== by 0x6025CBB: g_test_run_suite_internal (gtestutils.c:2241)
==7106== by 0x6025D64: g_test_run_suite_internal (gtestutils.c:2253)
==7106== by 0x6025F7B: g_test_run_suite (gtestutils.c:2328)
==7106== by 0x6024C1C: g_test_run (gtestutils.c:1596)
==7106== by 0x4E7CA3B: egg_tests_run_with_loop (egg-testing.c:167)
==7106== by 0x406948: main (test-collection.c:1033)
https://bugzilla.gnome.org/show_bug.cgi?id=756766
This fixes:
==17724== 48 bytes in 1 blocks are definitely lost in loss record 1,135 of 1,698
==17724== at 0x4C28C50: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==17724== by 0x6002FCC: g_malloc (gmem.c:94)
==17724== by 0x60032AE: g_malloc_n (gmem.c:330)
==17724== by 0x601DBF0: g_strdup (gstrfuncs.c:363)
==17724== by 0x4E650B5: on_create_item_called (secret-paths.c:1990)
==17724== by 0x5A3346D: g_task_return_now (gtask.c:1104)
==17724== by 0x5A33575: g_task_return (gtask.c:1162)
==17724== by 0x5A33E76: g_task_return_pointer (gtask.c:1537)
==17724== by 0x5A9BB7D: g_dbus_connection_call_done (gdbusconnection.c:5704)
==17724== by 0x5A3346D: g_task_return_now (gtask.c:1104)
==17724== by 0x5A334B6: complete_in_idle_cb (gtask.c:1118)
==17724== by 0x5FFD3D0: g_idle_dispatch (gmain.c:5441)
==17724== by 0x5FFAA18: g_main_dispatch (gmain.c:3154)
==17724== by 0x5FFB85C: g_main_context_dispatch (gmain.c:3769)
==17724== by 0x5FFBA40: g_main_context_iterate (gmain.c:3840)
==17724== by 0x5FFBE66: g_main_loop_run (gmain.c:4034)
==17724== by 0x4E55FF7: secret_service_store_sync (secret-methods.c:1281)
==17724== by 0x404AC8: test_store_sync (test-methods.c:736)
==17724== by 0x60258FA: test_case_run (gtestutils.c:2158)
==17724== by 0x6025CBB: g_test_run_suite_internal (gtestutils.c:2241)
==17724== by 0x6025D64: g_test_run_suite_internal (gtestutils.c:2253)
==17724== by 0x6025F7B: g_test_run_suite (gtestutils.c:2328)
==17724== by 0x6024C1C: g_test_run (gtestutils.c:1596)
==17724== by 0x4E7CA68: egg_tests_run_with_loop (egg-testing.c:167)
==17724== by 0x406190: main (test-methods.c:998)
https://bugzilla.gnome.org/show_bug.cgi?id=756766
This fixes:
==2111== 45 bytes in 1 blocks are definitely lost in loss record 1,180 of 1,795
==2111== at 0x4C28C50: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==2111== by 0x6002FCC: g_malloc (gmem.c:94)
==2111== by 0x60032AE: g_malloc_n (gmem.c:330)
==2111== by 0x601DBF0: g_strdup (gstrfuncs.c:363)
==2111== by 0x603C073: g_variant_dup_string (gvariant.c:1503)
==2111== by 0x4E644D5: on_create_collection_prompt (secret-paths.c:1682)
==2111== by 0x5A1CB66: g_simple_async_result_complete (gsimpleasyncresult.c:801)
==2111== by 0x4E5C12F: on_real_prompt_completed (secret-service.c:322)
==2111== by 0x5A1CB66: g_simple_async_result_complete (gsimpleasyncresult.c:801)
==2111== by 0x4E5A6A1: perform_prompt_complete (secret-prompt.c:288)
==2111== by 0x4E5A7B5: on_prompt_completed (secret-prompt.c:314)
==2111== by 0x5A97B7B: emit_signal_instance_in_idle_cb (gdbusconnection.c:3701)
==2111== by 0x5FFD3D0: g_idle_dispatch (gmain.c:5441)
==2111== by 0x5FFAA18: g_main_dispatch (gmain.c:3154)
==2111== by 0x5FFB85C: g_main_context_dispatch (gmain.c:3769)
==2111== by 0x5FFBA40: g_main_context_iterate (gmain.c:3840)
==2111== by 0x5FFBE66: g_main_loop_run (gmain.c:4034)
==2111== by 0x4E7C9E1: loop_wait_until (egg-testing.c:151)
==2111== by 0x4E7C859: egg_test_wait_until (egg-testing.c:105)
==2111== by 0x4032ED: test_create_async (test-collection.c:328)
==2111== by 0x60258FA: test_case_run (gtestutils.c:2158)
==2111== by 0x6025CBB: g_test_run_suite_internal (gtestutils.c:2241)
==2111== by 0x6025D64: g_test_run_suite_internal (gtestutils.c:2253)
==2111== by 0x6025F7B: g_test_run_suite (gtestutils.c:2328)
==2111== by 0x6024C1C: g_test_run (gtestutils.c:1596)
==2111== by 0x4E7CA3B: egg_tests_run_with_loop (egg-testing.c:167)
==2111== by 0x406948: main (test-collection.c:1033)
https://bugzilla.gnome.org/show_bug.cgi?id=756766
This fixes:
==16832== 6 bytes in 1 blocks are definitely lost in loss record 8 of 1,184
==16832== at 0x4A06C50: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==16832== by 0x36E564F679: g_malloc (gmem.c:97)
==16832== by 0x36E56688AE: g_strdup (gstrfuncs.c:356)
==16832== by 0x4C2B242: secret_collection_get_label (secret-collection.c:1835)
==16832== by 0x40313D: test_create_sync (test-collection.c:305)
==16832== by 0x36E566FB92: test_case_run (gtestutils.c:2124)
==16832== by 0x36E566FB92: g_test_run_suite_internal (gtestutils.c:2185)
==16832== by 0x36E566FD5A: g_test_run_suite_internal (gtestutils.c:2196)
==16832== by 0x36E56700DA: g_test_run_suite (gtestutils.c:2249)
==16832== by 0x36E5670110: g_test_run (gtestutils.c:1553)
==16832== by 0x4C5A0EA: egg_tests_run_with_loop (egg-testing.c:167)
==16832== by 0x4068B0: main (test-collection.c:1028)
==16832==-
==16832== 6 bytes in 1 blocks are definitely lost in loss record 9 of 1,184
==16832== at 0x4A06C50: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==16832== by 0x36E564F679: g_malloc (gmem.c:97)
==16832== by 0x36E56688AE: g_strdup (gstrfuncs.c:356)
==16832== by 0x4C2B242: secret_collection_get_label (secret-collection.c:1835)
==16832== by 0x40337C: test_create_async (test-collection.c:333)
==16832== by 0x36E566FB92: test_case_run (gtestutils.c:2124)
==16832== by 0x36E566FB92: g_test_run_suite_internal (gtestutils.c:2185)
==16832== by 0x36E566FD5A: g_test_run_suite_internal (gtestutils.c:2196)
==16832== by 0x36E56700DA: g_test_run_suite (gtestutils.c:2249)
==16832== by 0x36E5670110: g_test_run (gtestutils.c:1553)
==16832== by 0x4C5A0EA: egg_tests_run_with_loop (egg-testing.c:167)
==16832== by 0x4068B0: main (test-collection.c:1028)
https://bugzilla.gnome.org/show_bug.cgi?id=756766
This fixes (among others):
==16832== 95 (16 direct, 79 indirect) bytes in 1 blocks are definitely lost in loss record 927 of 1,184
==16832== at 0x4A06C50: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==16832== by 0x36E564F679: g_malloc (gmem.c:97)
==16832== by 0x36E5666CD2: g_slice_alloc (gslice.c:1007)
==16832== by 0x36E563522B: g_error_new_valist (gerror.c:386)
==16832== by 0x36E563560A: g_set_error (gerror.c:560)
==16832== by 0x4C27FB4: secret_collection_initable_init (secret-collection.c:543)
==16832== by 0x36E6E5D83E: g_initable_new_valist (ginitable.c:228)
==16832== by 0x36E6E5D8F5: g_initable_new (ginitable.c:146)
==16832== by 0x4C3E1E3: secret_collection_new_for_dbus_path_sync (secret-paths.c:158)
==16832== by 0x404733: test_delete_sync (test-collection.c:623)
==16832== by 0x36E566FB92: test_case_run (gtestutils.c:2124)
==16832== by 0x36E566FB92: g_test_run_suite_internal (gtestutils.c:2185)
==16832== by 0x36E566FD5A: g_test_run_suite_internal (gtestutils.c:2196)
==16832== by 0x36E56700DA: g_test_run_suite (gtestutils.c:2249)
==16832== by 0x36E5670110: g_test_run (gtestutils.c:1553)
==16832== by 0x4C5A0EA: egg_tests_run_with_loop (egg-testing.c:167)
==16832== by 0x4068B0: main (test-collection.c:1028)
https://bugzilla.gnome.org/show_bug.cgi?id=756766