summaryrefslogtreecommitdiff
path: root/pam
diff options
context:
space:
mode:
authorStefan Walter <stefw@src.gnome.org>2008-12-11 20:54:00 +0000
committerStefan Walter <stefw@src.gnome.org>2008-12-11 20:54:00 +0000
commite961ba28b9c6cd4aafb0df6ce334c2471c0f9c61 (patch)
tree1856d8a6021316c7dc0786ef682c98228c9f7c8d /pam
parent5ca7e0bb1c44e2ce932a15a535bd271b7299398a (diff)
downloadgnome-keyring-e961ba28b9c6cd4aafb0df6ce334c2471c0f9c61.tar.gz
Don't unlock keyring if daemon wasn't started. Patch by Vincent Untz.
* pam/gkr-pam-module.c: Don't unlock keyring if daemon wasn't started. Patch by Vincent Untz. Fixes bug #559958 svn path=/trunk/; revision=1379
Diffstat (limited to 'pam')
-rw-r--r--pam/gkr-pam-module.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/pam/gkr-pam-module.c b/pam/gkr-pam-module.c
index eff0b66c..312677ab 100644
--- a/pam/gkr-pam-module.c
+++ b/pam/gkr-pam-module.c
@@ -860,9 +860,12 @@ pam_sm_open_session (pam_handle_t *ph, int flags, int argc, const char **argv)
return ret;
}
- if (!started_daemon && password != NULL) {
- if (unlock_keyring (ph, pwd, password) != PAM_SUCCESS)
- return PAM_SERVICE_ERR;
+ /* If gnome keyring is running, but we didn't start it here, then unlock now */
+ if (get_any_env (ph, ENV_SOCKET) != NULL) {
+ if (!started_daemon && password != NULL) {
+ if (unlock_keyring (ph, pwd, password) != PAM_SUCCESS)
+ return PAM_SERVICE_ERR;
+ }
}
return PAM_SUCCESS;