From e4f886ddb4b384ae825542452db02c94f4dfab6c Mon Sep 17 00:00:00 2001 From: Martin Briza Date: Sat, 14 Sep 2013 00:48:46 +0200 Subject: [PATCH] Removed a nonfree font, bumped to the latest commit --- .gitignore | 1 + ...ndle-in-the-Authenticator-class-and-.patch | 131 ------------------ sddm.spec | 15 +- sources | 2 +- 4 files changed, 11 insertions(+), 138 deletions(-) delete mode 100644 0001-Store-the-PAM-handle-in-the-Authenticator-class-and-.patch diff --git a/.gitignore b/.gitignore index 6c408b1..68edd33 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /0.1.0.tar.gz /e707e22901049495818a9bedf71f0ba829564700.tar.gz +/50ca5b20354b6d338ce8836a613af19cedb1dca2.tar.gz diff --git a/0001-Store-the-PAM-handle-in-the-Authenticator-class-and-.patch b/0001-Store-the-PAM-handle-in-the-Authenticator-class-and-.patch deleted file mode 100644 index bbe2f0f..0000000 --- a/0001-Store-the-PAM-handle-in-the-Authenticator-class-and-.patch +++ /dev/null @@ -1,131 +0,0 @@ -From cf58bfe0b770ae9bad959d4eeccc62e3066c7f2d Mon Sep 17 00:00:00 2001 -From: Martin Briza -Date: Mon, 2 Sep 2013 17:05:13 +0200 -Subject: [PATCH] Store the PAM handle in the Authenticator class and close the - session properly - ---- - src/daemon/Authenticator.cpp | 41 +++++++++++++++++++++++++++++------------ - src/daemon/Authenticator.h | 7 +++++++ - 2 files changed, 36 insertions(+), 12 deletions(-) - -diff --git a/src/daemon/Authenticator.cpp b/src/daemon/Authenticator.cpp -index 653a21e..76a9b0e 100644 ---- a/src/daemon/Authenticator.cpp -+++ b/src/daemon/Authenticator.cpp -@@ -202,43 +202,49 @@ namespace SDDM { - Seat *seat = qobject_cast(display->parent()); - - #ifdef USE_PAM -- PamService pam("sddm", user, password, passwordless); -+ if (m_pam) -+ delete m_pam; -+ -+ m_pam = new PamService("sddm", user, password, passwordless); -+ -+ if (!m_pam) -+ return false; - - if (!passwordless) { - // authenticate the applicant -- if ((pam.result = pam_authenticate(pam.handle, 0)) != PAM_SUCCESS) -+ if ((m_pam->result = pam_authenticate(m_pam->handle, 0)) != PAM_SUCCESS) - return false; - -- if ((pam.result = pam_acct_mgmt(pam.handle, 0)) == PAM_NEW_AUTHTOK_REQD) -- pam.result = pam_chauthtok(pam.handle, PAM_CHANGE_EXPIRED_AUTHTOK); -+ if ((m_pam->result = pam_acct_mgmt(m_pam->handle, 0)) == PAM_NEW_AUTHTOK_REQD) -+ m_pam->result = pam_chauthtok(m_pam->handle, PAM_CHANGE_EXPIRED_AUTHTOK); - -- if (pam.result != PAM_SUCCESS) -+ if (m_pam->result != PAM_SUCCESS) - return false; - } - - // set username -- if ((pam.result = pam_set_item(pam.handle, PAM_USER, qPrintable(user))) != PAM_SUCCESS) -+ if ((m_pam->result = pam_set_item(m_pam->handle, PAM_USER, qPrintable(user))) != PAM_SUCCESS) - return false; - - // set credentials -- if ((pam.result = pam_setcred(pam.handle, PAM_ESTABLISH_CRED)) != PAM_SUCCESS) -+ if ((m_pam->result = pam_setcred(m_pam->handle, PAM_ESTABLISH_CRED)) != PAM_SUCCESS) - return false; - - // set tty -- if ((pam.result = pam_set_item(pam.handle, PAM_TTY, qPrintable(display->name()))) != PAM_SUCCESS) -+ if ((m_pam->result = pam_set_item(m_pam->handle, PAM_TTY, qPrintable(display->name()))) != PAM_SUCCESS) - return false; - - // set display name -- if ((pam.result = pam_set_item(pam.handle, PAM_XDISPLAY, qPrintable(display->name()))) != PAM_SUCCESS) -+ if ((m_pam->result = pam_set_item(m_pam->handle, PAM_XDISPLAY, qPrintable(display->name()))) != PAM_SUCCESS) - return false; - - // open session -- if ((pam.result = pam_open_session(pam.handle, 0)) != PAM_SUCCESS) -+ if ((m_pam->result = pam_open_session(m_pam->handle, 0)) != PAM_SUCCESS) - return false; - - // get mapped user name; PAM may have changed it - char *mapped; -- if ((pam.result = pam_get_item(pam.handle, PAM_USER, (const void **)&mapped)) != PAM_SUCCESS) -+ if ((m_pam->result = pam_get_item(m_pam->handle, PAM_USER, (const void **)&mapped)) != PAM_SUCCESS) - return false; - #else - if (!passwordless) { -@@ -304,7 +310,7 @@ namespace SDDM { - QProcessEnvironment env = QProcessEnvironment::systemEnvironment(); - #ifdef USE_PAM - // get pam environment -- char **envlist = pam_getenvlist(pam.handle); -+ char **envlist = pam_getenvlist(m_pam->handle); - - // copy it to the env map - for (int i = 0; envlist[i] != nullptr; ++i) { -@@ -399,6 +405,17 @@ namespace SDDM { - process->deleteLater(); - process = nullptr; - -+#ifdef USE_PAM -+ if (m_pam) { -+ m_pam->result = pam_close_session(m_pam->handle, 0); -+ m_pam->result = pam_setcred(m_pam->handle, PAM_DELETE_CRED); -+ // for some reason this has to be called here too -+ pam_end(m_pam->handle, m_pam->result); -+ delete m_pam; -+ m_pam = nullptr; -+ } -+#endif -+ - // emit signal - emit stopped(); - } -diff --git a/src/daemon/Authenticator.h b/src/daemon/Authenticator.h -index 682fa34..23e91ec 100644 ---- a/src/daemon/Authenticator.h -+++ b/src/daemon/Authenticator.h -@@ -23,6 +23,9 @@ - #include - - namespace SDDM { -+#ifdef USE_PAM -+ class PamService; -+#endif - class Session; - - class AuthenticatorPrivate; -@@ -48,6 +51,10 @@ namespace SDDM { - - bool m_started { false }; - -+#ifdef USE_PAM -+ PamService *m_pam { nullptr }; -+#endif -+ - Session *process { nullptr }; - }; - } --- -1.8.3.1 - diff --git a/sddm.spec b/sddm.spec index 0dc59cf..8ebe898 100644 --- a/sddm.spec +++ b/sddm.spec @@ -1,21 +1,19 @@ %global _hardened_build 1 -%global sddm_commit e707e22901049495818a9bedf71f0ba829564700 +%global sddm_commit 50ca5b20354b6d338ce8836a613af19cedb1dca2 Name: sddm Version: 0.2.0 -Release: 0.6.20130821git%(echo %{sddm_commit} | cut -c-8)%{?dist} +Release: 0.7.20130821git%(echo %{sddm_commit} | cut -c-8)%{?dist} License: GPLv2+ Summary: QML based X11 desktop manager Url: https://github.com/sddm/sddm -Source0: https://github.com/sddm/sddm/archive/%{sddm_commit}.tar.gz +Source0: https://github.com/MartinBriza/sddm/archive/%{sddm_commit}.tar.gz # Originally kdm config, shamelessly stolen from gdm Source1: sddm.pam # We need to ship our own service file to handle Fedora-specific cases Source2: sddm.service -# Upstreamed patch waiting for review, need it right now -Patch1: 0001-Store-the-PAM-handle-in-the-Authenticator-class-and-.patch # Patch setting a better order of the xsessions and hiding the custom one Patch2: sddm-git.e707e229-session-list.patch @@ -43,7 +41,6 @@ designer the ability to create smooth, animated user interfaces. %prep %setup -q -n %{name}-%{sddm_commit} -%patch1 -p1 -b .pam_close %patch2 -p1 -b .session-list %build @@ -88,8 +85,14 @@ sed -i "s/^MinimumVT=[0-9]*$/MinimumVT=1/" %{buildroot}%{_sysconfdir}/sddm.conf %{_datadir}/apps/sddm/scripts/* %{_datadir}/apps/sddm/sddm.conf.sample %{_datadir}/apps/sddm/themes/* +%{_datadir}/apps/sddm/translations/* %changelog +* Sat Sep 14 2013 Martin Briza - 0.2.0-0.7.20130914git50ca5b20 +- Removed the nonfree font from the package, replaced with "Sans" +- Temporarily set my own repository as the origin to avoid having the font in the srpm +- Changing the source also brings us a few new commits and removes Patch1 for PAM + * Mon Sep 09 2013 Martin Briza - 0.2.0-0.6.20130821gite707e229 - Added the patch, forgot to apply it, now it's okay diff --git a/sources b/sources index 8efc54d..ce0c57f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -8c1cd43927ce1ee3c0f2ee3f6d0914af e707e22901049495818a9bedf71f0ba829564700.tar.gz +490703ab69c3518f27d7e27fe18ce7fc 50ca5b20354b6d338ce8836a613af19cedb1dca2.tar.gz