Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37404719
en ru br
Репозитории ALT
S:0.6.12.1-alt1
5.1: 0.6.1-alt5
www.altlinux.org/Changes

Группа :: Система/Основа
Пакет: pam_pkcs11

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: pam_pkcs11-0.6.9-eventmgr-init-from-token.patch
Скачать


 src/tools/pkcs11_eventmgr.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/src/tools/pkcs11_eventmgr.c b/src/tools/pkcs11_eventmgr.c
index 0ec28be..2d28536 100644
--- a/src/tools/pkcs11_eventmgr.c
+++ b/src/tools/pkcs11_eventmgr.c
@@ -602,9 +602,8 @@ int main(int argc, char *argv[])
 #else
 	int rv;
 
-	int first_loop = 0;
-	int old_state = CARD_NOT_PRESENT;
-	int new_state = CARD_NOT_PRESENT;
+	int old_state = CARD_ERROR;
+	int new_state = old_state;
 	int expire_count = 0;
 
 	/* parse args and configuration file */
@@ -701,10 +700,14 @@ int main(int argc, char *argv[])
 		}
 		else
 		{						/* state changed; parse event */
-			old_state = new_state;
+			if (old_state == CARD_ERROR) {
+				old_state = new_state;
+				continue;
+			} else {
+				old_state = new_state;
+			}
 			expire_count = 0;
-			if (!first_loop++)
-				continue;		/*skip first pass */
+
 			if (new_state == CARD_NOT_PRESENT)
 			{
 				DBG("Card removed, ");
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin