diff options
author | Stef Walter <stef@memberwebs.com> | 2009-12-17 03:57:11 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2009-12-17 05:32:49 +0000 |
commit | da22a40250da283a502ecb35add5e6548c654c6b (patch) | |
tree | ff12702373bc3ab4891be99137617f2dcad1c9c3 /pam | |
parent | e206707ce7d57ee60cd950e2e667bbb0ec2064ed (diff) | |
download | gnome-keyring-da22a40250da283a502ecb35add5e6548c654c6b.tar.gz |
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.
Diffstat (limited to 'pam')
-rw-r--r-- | pam/gkr-pam-client.c | 17 | ||||
-rw-r--r-- | pam/gkr-pam-module.c | 11 | ||||
-rw-r--r-- | pam/gkr-pam.h | 7 |
3 files changed, 16 insertions, 19 deletions
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 <sys/types.h> #include <sys/param.h> #include <sys/socket.h> @@ -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 <security/pam_appl.h> #include <security/pam_modules.h> @@ -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 <pwd.h> -#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_*/ |