View | Details | Raw Unified | Return to bug 228116 | Differences between
and this patch

Collapse All | Expand All

(-)x11/plasma5-plasma-workspace/Makefile (-1 / +1 lines)
Lines 2-8 Link Here
2
2
3
PORTNAME=	plasma-workspace
3
PORTNAME=	plasma-workspace
4
DISTVERSION=	${KDE_PLASMA_VERSION}
4
DISTVERSION=	${KDE_PLASMA_VERSION}
5
PORTREVISION=	1
5
PORTREVISION=	2
6
CATEGORIES=	x11 kde kde-plasma
6
CATEGORIES=	x11 kde kde-plasma
7
7
8
MAINTAINER=	kde@FreeBSD.org
8
MAINTAINER=	kde@FreeBSD.org
(-)x11/plasma5-plasma-workspace/files/patch-plasma.desktop.cmake (-10 lines)
Lines 1-10 Link Here
1
--- plasma.desktop.cmake.orig	2018-05-05 17:27:16 UTC
2
+++ plasma.desktop.cmake
3
@@ -1,6 +1,6 @@
4
 [Desktop Entry]
5
 Type=XSession
6
-Exec=${CMAKE_INSTALL_FULL_BINDIR}/startkde
7
+Exec=ck-launch-session ${CMAKE_INSTALL_FULL_BINDIR}/startkde
8
 TryExec=${CMAKE_INSTALL_FULL_BINDIR}/startkde
9
 DesktopNames=KDE
10
 Name=Plasma
(-)x11/sddm/Makefile (-10 / +5 lines)
Lines 3-14 Link Here
3
PORTNAME=	sddm
3
PORTNAME=	sddm
4
PORTVERSION=	0.14.0
4
PORTVERSION=	0.14.0
5
DISTVERSIONPREFIX=	v
5
DISTVERSIONPREFIX=	v
6
PORTREVISION=	1
6
CATEGORIES=	x11
7
CATEGORIES=	x11
7
8
8
MAINTAINER=	kde@FreeBSD.org
9
MAINTAINER=	kde@FreeBSD.org
9
COMMENT=	QML based login manager
10
COMMENT=	QML based login manager
10
11
11
USES=		cmake:outsource desktop-file-utils kde:5
12
USES=		cmake:outsource kde:5
12
USE_KDE=	ecm
13
USE_KDE=	ecm
13
USE_QT5=	concurrent core dbus gui linguisttools multimedia network \
14
USE_QT5=	concurrent core dbus gui linguisttools multimedia network \
14
		printsupport qml quick script sql webkit widgets \
15
		printsupport qml quick script sql webkit widgets \
Lines 18-27 USE_XORG= xcb Link Here
18
CMAKE_ARGS=	-DUID_MIN=1000 \
19
CMAKE_ARGS=	-DUID_MIN=1000 \
19
		-DUID_MAX=65000 \
20
		-DUID_MAX=65000 \
20
		-DCMAKE_INSTALL_SYSCONFDIR:PATH=${LOCALBASE}/etc
21
		-DCMAKE_INSTALL_SYSCONFDIR:PATH=${LOCALBASE}/etc
21
# We need to disable PAM at the moment and use the passwd-based backend;
22
# the two backend are mutually exclusive, and we have to investigate how
23
# to make it compatible with OpenPAM.
24
CMAKE_ARGS+=	-DENABLE_PAM:BOOL=FALSE
25
22
26
USE_RC_SUBR=	sddm
23
USE_RC_SUBR=	sddm
27
24
Lines 31-41 GROUPS= sddm Link Here
31
USE_GITHUB=	yes
28
USE_GITHUB=	yes
32
29
33
post-patch:
30
post-patch:
34
# Patch in the correct location for X11 startup files, and make the session start
31
# Patch in the correct location for X11 startup files.
35
# script of sddm use the value of ${STARTUP} defined by 90-consolekit
32
	@${REINPLACE_CMD} 's#/etc/X11#${LOCALBASE}/etc/X11#' \
36
	${REINPLACE_CMD} -e 's#/etc/X11#${LOCALBASE}/etc/X11#g' \
33
		${WRKSRC}/data/scripts/Xsession
37
			 -e '/exec.*session/s#exec#exec $${STARTUP}#g' \
38
		${PATCH_WRKSRC}/data/scripts/Xsession
39
34
40
post-install:
35
post-install:
41
# Install xsession.desktop to launch .xinitrc via sddm.
36
# Install xsession.desktop to launch .xinitrc via sddm.
(-)x11/sddm/files/patch-data_scripts_Xsession (+13 lines)
Line 0 Link Here
1
--- data/scripts/Xsession.orig	2016-08-28 11:54:03 UTC
2
+++ data/scripts/Xsession
3
@@ -88,8 +88,8 @@ if [ -f "$USERXSESSION" ]; then
4
   . "$USERXSESSION"
5
 fi
6
 
7
-if [ -z "$@" ]; then
8
+if [ -z "$1" ]; then
9
     exec xmessage -center -buttons OK:0 -default OK "Sorry, $DESKTOP_SESSION is no valid session."
10
 else
11
-    exec $@
12
+    exec $STARTUP "$@"
13
 fi
(-)x11/sddm/files/patch-services_sddm-autologin.pam (+17 lines)
Line 0 Link Here
1
--- services/sddm-autologin.pam.orig	2016-08-28 11:54:03 UTC
2
+++ services/sddm-autologin.pam
3
@@ -1,11 +1,5 @@
4
 #%PAM-1.0
5
-auth        required    pam_env.so
6
-auth        required    pam_tally.so file=/var/log/faillog onerr=succeed
7
-auth        required    pam_shells.so
8
-auth        required    pam_nologin.so
9
 auth        required    pam_permit.so
10
--auth       optional    pam_gnome_keyring.so
11
-account     include     system-local-login
12
-password    include     system-local-login
13
-session     include     system-local-login
14
--session    optional    pam_gnome_keyring.so auto_start
15
+account     include     login
16
+password    required    pam_deny.so
17
+session     include     login
(-)x11/sddm/files/patch-services_sddm-greeter.pam (+18 lines)
Line 0 Link Here
1
--- services/sddm-greeter.pam.orig	2016-08-28 11:54:03 UTC
2
+++ services/sddm-greeter.pam
3
@@ -1,8 +1,5 @@
4
 #%PAM-1.0
5
 
6
-# Load environment from /etc/environment and ~/.pam_environment
7
-auth		required pam_env.so
8
-
9
 # Always let the greeter start without authentication
10
 auth		required pam_permit.so
11
 
12
@@ -13,5 +10,4 @@ account		required pam_permit.so
13
 password	required pam_deny.so
14
 
15
 # Setup session
16
-session		required pam_unix.so
17
-session		optional pam_systemd.so
18
+session		required pam_permit.so
(-)x11/sddm/files/patch-services_sddm.pam (+13 lines)
Line 0 Link Here
1
--- services/sddm.pam.orig	2016-08-28 11:54:03 UTC
2
+++ services/sddm.pam
3
@@ -1,6 +1,6 @@
4
 #%PAM-1.0
5
 
6
-auth		include		system-login
7
-account		include		system-login
8
-password	include		system-login
9
-session		include		system-login
10
+auth		include		login
11
+account		include		login
12
+password	include		login
13
+session		include		login
(-)x11/sddm/files/patch-src_helper_backend_PasswdBackend.cpp (-46 lines)
Lines 1-46 Link Here
1
Implement password authentication on FreeBSD.
2
This needs review :)
3
4
--- src/helper/backend/PasswdBackend.cpp.orig	2016-07-06 14:00:10 UTC
5
+++ src/helper/backend/PasswdBackend.cpp
6
@@ -27,8 +27,13 @@
7
 
8
 #include <sys/types.h>
9
 #include <pwd.h>
10
+#if defined(Q_OS_LINUX)
11
 #include <shadow.h>
12
 #include <crypt.h>
13
+#endif
14
+#if defined(Q_OS_FREEBSD)
15
+#include <unistd.h>
16
+#endif
17
 
18
 namespace SDDM {
19
     PasswdBackend::PasswdBackend(HelperApp *parent)
20
@@ -72,6 +77,17 @@ namespace SDDM {
21
             return false;
22
         }
23
 
24
+#if defined(Q_OS_FREEBSD)
25
+        if (!*pw->pw_passwd)
26
+        {
27
+            //empty password
28
+            return true;
29
+        }
30
+        char *crypted = crypt(qPrintable(password), pw->pw_passwd);
31
+        if (0 == strcmp(crypted, pw->pw_passwd)) {
32
+            return true;
33
+        }
34
+#else
35
         struct spwd *spw = getspnam(pw->pw_name);
36
         if (!spw) {
37
             qWarning() << "[Passwd] Could get passwd but not shadow";
38
@@ -85,7 +101,7 @@ namespace SDDM {
39
         if (0 == strcmp(crypted, spw->sp_pwdp)) {
40
             return true;
41
         }
42
-
43
+#endif
44
         m_app->error(QStringLiteral("Wrong user/password combination"), Auth::ERROR_AUTHENTICATION);
45
         return false;
46
     }

Return to bug 228116