From da22a40250da283a502ecb35add5e6548c654c6b Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Thu, 17 Dec 2009 03:57:11 +0000 Subject: Remove old keyring socket, library and code support. After this commit, all callers must use the libgnome-keyring module to access secrets. The old socket method and included library no longer work. --- pam/gkr-pam-client.c | 17 +++++++++-------- pam/gkr-pam-module.c | 11 +++++------ pam/gkr-pam.h | 7 ++----- 3 files changed, 16 insertions(+), 19 deletions(-) (limited to 'pam') diff --git a/pam/gkr-pam-client.c b/pam/gkr-pam-client.c index 88a2382d..0d441aec 100644 --- a/pam/gkr-pam-client.c +++ b/pam/gkr-pam-client.c @@ -28,6 +28,8 @@ #include "egg/egg-buffer.h" #include "egg/egg-unix-credentials.h" +#include "daemon/control/gkd-control-codes.h" + #include #include #include @@ -214,7 +216,7 @@ connect_to_daemon (const char *control) } static void -write_part (int fd, const unsigned char *data, int len, GnomeKeyringResult *res) +write_part (int fd, const unsigned char *data, int len, int *res) { assert (res); @@ -267,11 +269,10 @@ read_part (int fd, unsigned char *data, int len) return all; } -static GnomeKeyringResult -keyring_daemon_op (const char *control, GnomeKeyringOpCode op, int argc, - const char* argv[]) +static int +keyring_daemon_op (const char *control, int op, int argc, const char* argv[]) { - GnomeKeyringResult ret = GNOME_KEYRING_RESULT_OK; + int ret = GNOME_KEYRING_RESULT_OK; unsigned char buf[4]; int i, sock = -1; uint oplen, l; @@ -346,12 +347,12 @@ done: return ret; } -GnomeKeyringResult +int gkr_pam_client_run_operation (struct passwd *pwd, const char *control, - GnomeKeyringOpCode op, int argc, const char* argv[]) + int op, int argc, const char* argv[]) { struct sigaction ignpipe, oldpipe, defchld, oldchld; - GnomeKeyringResult res; + int res; pid_t pid; int status; diff --git a/pam/gkr-pam-module.c b/pam/gkr-pam-module.c index 98e4ea7b..4e561fd9 100644 --- a/pam/gkr-pam-module.c +++ b/pam/gkr-pam-module.c @@ -31,8 +31,7 @@ #include "gkr-pam.h" -#include "library/gnome-keyring-result.h" -#include "library/gnome-keyring-opcodes.h" +#include "daemon/control/gkd-control-codes.h" #include #include @@ -648,7 +647,7 @@ static int create_keyring (pam_handle_t *ph, struct passwd *pwd, const char *password) { const char *control; - GnomeKeyringResult res; + int res; const char *argv[2]; assert (pwd); @@ -679,7 +678,7 @@ static int unlock_keyring (pam_handle_t *ph, struct passwd *pwd, const char *password) { const char *control; - GnomeKeyringResult res; + int res; const char *argv[2]; assert (pwd); @@ -716,9 +715,9 @@ change_keyring_password (pam_handle_t *ph, struct passwd *pwd, const char *password, const char *original) { const char *control; - GnomeKeyringResult res; const char *argv[3]; - + int res; + assert (pwd); assert (password); assert (original); diff --git a/pam/gkr-pam.h b/pam/gkr-pam.h index 0a988fe6..9d4a9b71 100644 --- a/pam/gkr-pam.h +++ b/pam/gkr-pam.h @@ -26,9 +26,6 @@ #include -#include "library/gnome-keyring-opcodes.h" -#include "library/gnome-keyring-result.h" - #ifndef LOG_AUTHPRIV #define LOG_AUTHPRIV LOG_AUTH #endif @@ -38,7 +35,7 @@ #define GKR_LOG_NOTICE (LOG_NOTICE | LOG_AUTHPRIV) #define GKR_LOG_INFO (LOG_INFO | LOG_AUTHPRIV) -GnomeKeyringResult gkr_pam_client_run_operation (struct passwd *pwd, const char *socket, - GnomeKeyringOpCode op, int argc, const char* argv[]); +int gkr_pam_client_run_operation (struct passwd *pwd, const char *socket, + int op, int argc, const char* argv[]); #endif /*GKRPAM_H_*/ -- cgit v1.2.1