Skip to content

Commit

Permalink
Remove gnome keyring password backend
Browse files Browse the repository at this point in the history
... it wasn't build anyway as it's deprecated.
  • Loading branch information
houz committed Jan 14, 2016
1 parent 19f1b20 commit d034e00
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 292 deletions.
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ option(DONT_USE_INTERNAL_LUA "Never fall back to the intree copy of lua" ON)
option(USE_FLICKR "Enable Flickr support" ON)
option(USE_KWALLET "Build kwallet password storage back-end" ON)
option(USE_LIBSECRET "Build libsecret password storage back-end" ON)
option(USE_GNOME_KEYRING "Build gnome-keyring password storage back-end" ON)
option(USE_UNITY "Use libunity to report progress in the launcher" OFF)
option(BUILD_SLIDESHOW "Build the opengl slideshow viewer" ON)
option(USE_OPENMP "Use openmp threading support." ON)
Expand Down
45 changes: 0 additions & 45 deletions cmake/modules/FindGnomeKeyring.cmake

This file was deleted.

3 changes: 1 addition & 2 deletions data/darktableconfig.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -1298,12 +1298,11 @@
<option>none</option>
<option capability="libsecret">libsecret</option>
<option capability="kwallet">kwallet</option>
<option capability="gnome-keyring">gnome keyring</option>
</enum>
</type>
<default>auto</default>
<shortdescription>password storage backend to use</shortdescription>
<longdescription>the storage backend for password storage: auto, none, libsecret, kwallet, gnome keyring</longdescription>
<longdescription>the storage backend for password storage: auto, none, libsecret, kwallet</longdescription>
</dtconfig>
<dtconfig>
<name>plugins/lighttable/export/icctype</name>
Expand Down
15 changes: 0 additions & 15 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -261,21 +261,6 @@ if(USE_LIBSECRET AND JsonGlib_FOUND)
endif(LIBSECRET_FOUND)
endif(USE_LIBSECRET AND JsonGlib_FOUND)

if(USE_GNOME_KEYRING)
find_package(GnomeKeyring)
if(GNOMEKEYRING_FOUND)
if(${GnomeKeyring_VERSION} VERSION_LESS "3.12.0")
set(SOURCES ${SOURCES} "common/pwstorage/backend_gkeyring.c")
include_directories(SYSTEM ${GnomeKeyring_INCLUDE_DIRS})
list(APPEND LIBS ${GnomeKeyring_LIBRARIES})
add_definitions("-DHAVE_GKEYRING")
else(${GnomeKeyring_VERSION} VERSION_LESS "3.12.0")
message(STATUS "GnomeKeyring is only supported for versions older than 3.12.0, version ${GnomeKeyring_VERSION} found. Please use libsecret instead.")
set(GNOMEKEYRING_FOUND FALSE)
endif(${GnomeKeyring_VERSION} VERSION_LESS "3.12.0")
endif(GNOMEKEYRING_FOUND)
endif(USE_GNOME_KEYRING)

if(USE_KWALLET)
add_definitions("-DHAVE_KWALLET")
endif(USE_KWALLET)
Expand Down
140 changes: 0 additions & 140 deletions src/common/pwstorage/backend_gkeyring.c

This file was deleted.

37 changes: 0 additions & 37 deletions src/common/pwstorage/backend_gkeyring.h

This file was deleted.

57 changes: 7 additions & 50 deletions src/common/pwstorage/pwstorage.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// This file is part of darktable
// Copyright (c) 2010 Tobias Ellinghaus <[email protected]>.
// Copyright (c) 2010-2016 Tobias Ellinghaus <[email protected]>.

// darktable is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
Expand All @@ -24,15 +24,12 @@
#include "backend_libsecret.h"
#endif

#ifdef HAVE_GKEYRING
#include "backend_gkeyring.h"
#endif

#ifdef HAVE_KWALLET
#include "backend_kwallet.h"
#endif

#include "control/conf.h"
#include "control/control.h"

#include <glib.h>
#include <string.h>
Expand All @@ -47,9 +44,6 @@ const dt_pwstorage_t *dt_pwstorage_new()
#ifdef HAVE_KWALLET
dt_capabilities_add("kwallet");
#endif
#ifdef HAVE_GKEYRING
dt_capabilities_add("gnome-keyring");
#endif

dt_pwstorage_t *pwstorage = g_malloc(sizeof(dt_pwstorage_t));
dt_print(DT_DEBUG_PWSTORAGE, "[pwstorage_new] Creating new context %p\n", pwstorage);
Expand Down Expand Up @@ -83,10 +77,12 @@ const dt_pwstorage_t *dt_pwstorage_new()
else if(strcmp(_backend_str, "kwallet") == 0)
_backend = PW_STORAGE_BACKEND_KWALLET;
#endif
#ifdef HAVE_GKEYRING
else if(strcmp(_backend_str, "gnome keyring") == 0)
_backend = PW_STORAGE_BACKEND_GNOME_KEYRING;
#endif
{
fprintf(stderr, "[pwstorage_new] GNOME Keyring backend is no longer supported.\n");
dt_control_log(_("GNOME Keyring backend is no longer supported. configure a different one"));
_backend = PW_STORAGE_BACKEND_NONE;
}

g_free(_backend_str);

Expand Down Expand Up @@ -143,27 +139,6 @@ const dt_pwstorage_t *dt_pwstorage_new()
pwstorage->backend_context = NULL;
pwstorage->pw_storage_backend = PW_STORAGE_BACKEND_NONE;
#endif
case PW_STORAGE_BACKEND_GNOME_KEYRING:
#ifdef HAVE_GKEYRING
dt_print(DT_DEBUG_PWSTORAGE,
"[pwstorage_new] using gnome keyring backend for usersname/password storage.\n");
pwstorage->backend_context = (void *)dt_pwstorage_gkeyring_new();
if(pwstorage->backend_context == NULL)
{
dt_print(DT_DEBUG_PWSTORAGE,
"[pwstorage_new] error starting gnome keyring. using no storage backend.\n");
pwstorage->backend_context = NULL;
pwstorage->pw_storage_backend = PW_STORAGE_BACKEND_NONE;
}
else
pwstorage->pw_storage_backend = PW_STORAGE_BACKEND_GNOME_KEYRING;
#else
dt_print(DT_DEBUG_PWSTORAGE,
"[pwstorage_new] gnome keyring storage not available. using no storage backend.\n");
pwstorage->backend_context = NULL;
pwstorage->pw_storage_backend = PW_STORAGE_BACKEND_NONE;
#endif
break;
}

switch(pwstorage->pw_storage_backend)
Expand All @@ -177,9 +152,6 @@ const dt_pwstorage_t *dt_pwstorage_new()
case PW_STORAGE_BACKEND_KWALLET:
dt_conf_set_string("plugins/pwstorage/pwstorage_backend", "kwallet");
break;
case PW_STORAGE_BACKEND_GNOME_KEYRING:
dt_conf_set_string("plugins/pwstorage/pwstorage_backend", "gnome keyring");
break;
}

return pwstorage;
Expand All @@ -202,11 +174,6 @@ void dt_pwstorage_destroy(const dt_pwstorage_t *pwstorage)
case PW_STORAGE_BACKEND_KWALLET:
#ifdef HAVE_KWALLET
dt_pwstorage_kwallet_destroy(pwstorage->backend_context);
#endif
break;
case PW_STORAGE_BACKEND_GNOME_KEYRING:
#ifdef HAVE_GKEYRING
g_free(pwstorage->backend_context);
#endif
break;
}
Expand All @@ -230,11 +197,6 @@ gboolean dt_pwstorage_set(const gchar *slot, GHashTable *table)
#ifdef HAVE_KWALLET
return dt_pwstorage_kwallet_set((backend_kwallet_context_t *)darktable.pwstorage->backend_context, slot,
table);
#endif
break;
case PW_STORAGE_BACKEND_GNOME_KEYRING:
#ifdef HAVE_GKEYRING
return dt_pwstorage_gkeyring_set(slot, table);
#endif
break;
}
Expand All @@ -258,11 +220,6 @@ GHashTable *dt_pwstorage_get(const gchar *slot)
case PW_STORAGE_BACKEND_KWALLET:
#ifdef HAVE_KWALLET
return dt_pwstorage_kwallet_get((backend_kwallet_context_t *)darktable.pwstorage->backend_context, slot);
#endif
break;
case PW_STORAGE_BACKEND_GNOME_KEYRING:
#ifdef HAVE_GKEYRING
return dt_pwstorage_gkeyring_get(slot);
#endif
break;
}
Expand Down
Loading

0 comments on commit d034e00

Please sign in to comment.