File pam-config-fix-pam_gnome_keyring.patch of Package pam-config.32672
From 8a13357dd3dfd4337a5704d8b3e77dfd7fb4bd84 Mon Sep 17 00:00:00 2001
From: Valentin Lefebvre <valentin.lefebvre@suse.com>
Date: Fri, 9 Feb 2024 16:46:48 +0100
Subject: [PATCH] pam_gnome_keyring: use option in AUTH
* As auto_start_if option has been split into two options auto_start
and only_if, Instead of remove all options for AUTH, just remove the
auto_start to have it only on SESSION.
* If "only_if=services" option is only set in SESSION, all services will
still call the module gnome_keyring due to this presence in AUTH
without this filter. (bsc#1219767)
Signed-off-by: Valentin Lefebvre <valentin.lefebvre@suse.com>
---
src/mod_pam_gnome_keyring.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/mod_pam_gnome_keyring.c b/src/mod_pam_gnome_keyring.c
index b4e8faf..8f9edc7 100644
--- a/src/mod_pam_gnome_keyring.c
+++ b/src/mod_pam_gnome_keyring.c
@@ -40,9 +40,7 @@ write_config_gnome_keyring (pam_module_t *this, enum write_type op, FILE *fp)
switch (op)
{
case AUTH:
- /* No options: we put the auto_start options in SESSION only */
- fprintf (fp, "auth\toptional\tpam_gnome_keyring.so\n");
- return 0;
+ fprintf (fp, "auth\toptional\tpam_gnome_keyring.so\t");
break;
case ACCOUNT:
return 0;
@@ -65,6 +63,13 @@ write_config_gnome_keyring (pam_module_t *this, enum write_type op, FILE *fp)
}
GETOPT_START_ALL
+ /* We put the auto_start options in SESSION only */
+ else if (strcmp ("auto_start", opt) == 0) {
+ opt_set = this->get_opt_set (this, SESSION);
+ if (opt_set->enable (opt_set, opt, g_opt->opt_val) == FALSE) {
+ return 1;
+ }
+ }
GETOPT_END_ALL
PRINT_ARGS("gnome_keyring");
--
2.35.3