From d0eeecedf615e904886cee83d406ea6793d1b5bd Mon Sep 17 00:00:00 2001 From: Michal Hlavinka Date: Jan 26 2015 10:36:13 +0000 Subject: fix pam sigsegv (#1184645) --- diff --git a/ecryptfs-utils-87-pamdata.patch b/ecryptfs-utils-87-pamdata.patch index 60ac3f4..2a48a8b 100644 --- a/ecryptfs-utils-87-pamdata.patch +++ b/ecryptfs-utils-87-pamdata.patch @@ -118,12 +118,12 @@ diff -up ecryptfs-utils-104/src/pam_ecryptfs/pam_ecryptfs.c.ekHssg ecryptfs-util else - rc = pam_get_item(pamh, PAM_AUTHTOK, (const void **)&passphrase); + rc = pam_get_item(pamh, PAM_AUTHTOK, (const void **)&epd->passphrase); -+ epd->passphrase = strdup(epd->passphrase); if (rc != PAM_SUCCESS) { syslog(LOG_ERR, "pam_ecryptfs: Error retrieving passphrase; rc = [%ld]\n", rc); goto out; } ++ epd->passphrase = strdup(epd->passphrase); - auth_tok_sig = malloc(ECRYPTFS_SIG_SIZE_HEX + 1); - if (!auth_tok_sig) { - rc = -ENOMEM; diff --git a/ecryptfs-utils-87-syslog.patch b/ecryptfs-utils-87-syslog.patch index 4d6c42b..5850c60 100644 --- a/ecryptfs-utils-87-syslog.patch +++ b/ecryptfs-utils-87-syslog.patch @@ -60,13 +60,13 @@ diff -up ecryptfs-utils-103/src/pam_ecryptfs/pam_ecryptfs.c.syslog ecryptfs-util goto out; @@ -160,7 +160,7 @@ PAM_EXTERN int pam_sm_authenticate(pam_h rc = pam_get_item(pamh, PAM_AUTHTOK, (const void **)&epd->passphrase); - epd->passphrase = strdup(epd->passphrase); if (rc != PAM_SUCCESS) { - syslog(LOG_ERR, "pam_ecryptfs: Error retrieving passphrase; rc = [%ld]\n", + ecryptfs_syslog(LOG_ERR, "pam_ecryptfs: Error retrieving passphrase; rc = [%ld]\n", rc); goto out; } + epd->passphrase = strdup(epd->passphrase); @@ -171,7 +171,7 @@ PAM_EXTERN int pam_sm_authenticate(pam_h from_hex(epd->salt, salt_hex, ECRYPTFS_SALT_SIZE); epd->unwrap = ((argc == 1) && (memcmp(argv[0], "unwrap\0", 7) == 0)); diff --git a/ecryptfs-utils.spec b/ecryptfs-utils.spec index d1a718a..955523f 100644 --- a/ecryptfs-utils.spec +++ b/ecryptfs-utils.spec @@ -5,7 +5,7 @@ Name: ecryptfs-utils Version: 104 -Release: 2%{?dist} +Release: 3%{?dist} Summary: The eCryptfs mount helper and support libraries Group: System Environment/Base License: GPLv2+ @@ -269,6 +269,9 @@ rm -rf $RPM_BUILD_ROOT %{python_sitearch}/ecryptfs-utils/_libecryptfs.so %changelog +* Mon Jan 26 2015 Michal Hlavinka - 104-3 +- fix pam sigsegv (#1184645) + * Sat Aug 16 2014 Fedora Release Engineering - 104-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild