Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Evergreen:11.1:Test
gnome-keyring
gnome-keyring-check-session.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File gnome-keyring-check-session.patch of Package gnome-keyring
Index: pam/gkr-pam-module.c =================================================================== --- pam/gkr-pam-module.c.orig +++ pam/gkr-pam-module.c @@ -77,9 +77,30 @@ enum { #define PAM_AUTHTOK_RECOVER_ERR PAM_AUTHTOK_RECOVERY_ERR #endif +static const char* get_any_env (pam_handle_t *ph, const char *name); + /* ----------------------------------------------------------------------------- * HELPERS */ + +/* We don't want to start the keyring if the session is not GNOME. + * Note that this only works if the service is gdm, so we return + * TRUE in all other cases. */ +static int +starting_gnome (pam_handle_t *ph) +{ + const char *session = NULL; + const void *service = NULL; + + if (pam_get_item (ph, PAM_SERVICE, &service) != PAM_SUCCESS) + return 1; + + if (!service || strcmp (service, "gdm") != 0) + return 1; + + session = get_any_env (ph, "DESKTOP_SESSION"); + return (session && strcmp (session, "gnome") == 0); +} static void close_safe (int fd) @@ -834,7 +855,7 @@ pam_sm_authenticate (pam_handle_t *ph, i started_daemon = 0; /* Should we start the daemon? */ - if (args & ARG_AUTO_START) { + if ((args & ARG_AUTO_START) && starting_gnome (ph)) { ret = start_daemon_if_necessary (ph, pwd, password, &started_daemon); if (ret != PAM_SUCCESS) return ret; @@ -901,7 +922,7 @@ pam_sm_open_session (pam_handle_t *ph, i started_daemon = 0; /* Should we start the daemon? */ - if (args & ARG_AUTO_START) { + if ((args & ARG_AUTO_START) && starting_gnome (ph)) { ret = start_daemon_if_necessary (ph, pwd, password, &started_daemon); if (ret != PAM_SUCCESS) return ret;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor