Index: x11/sddm/Makefile =================================================================== --- x11/sddm/Makefile +++ x11/sddm/Makefile @@ -3,7 +3,7 @@ PORTNAME= sddm PORTVERSION= 0.17.0 DISTVERSIONPREFIX= v -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= x11 MAINTAINER= kde@FreeBSD.org Index: x11/sddm/files/patch-src_helper_CMakeLists.txt =================================================================== --- /dev/null +++ x11/sddm/files/patch-src_helper_CMakeLists.txt @@ -0,0 +1,11 @@ +--- src/helper/CMakeLists.txt.orig 2018-09-23 02:20:44.875244000 +0100 ++++ src/helper/CMakeLists.txt 2018-09-23 02:20:49.405264000 +0100 +@@ -31,7 +31,7 @@ else() + endif() + + add_executable(sddm-helper ${HELPER_SOURCES}) +-target_link_libraries(sddm-helper Qt5::Network Qt5::DBus Qt5::Qml) ++target_link_libraries(sddm-helper Qt5::Network Qt5::DBus Qt5::Qml util) + if(PAM_FOUND) + target_link_libraries(sddm-helper ${PAM_LIBRARIES}) + else() Index: x11/sddm/files/patch-src_helper_UserSession.cpp =================================================================== --- x11/sddm/files/patch-src_helper_UserSession.cpp +++ x11/sddm/files/patch-src_helper_UserSession.cpp @@ -1,15 +1,16 @@ -Run sddm-greeter via the session command (Xsession script) so it also gets X -resources and a ConsoleKit and D-Bus session. The ConsoleKit session has its -session-class set to "user" instead of "greeter" because ck-launch-session -doesn't provide a way to change this. ConsoleKit doesn't do anything with -this value though so it is believed to be harmless. The XDG_SESSION_CLASS -environment variable does have the value "greeter". - -Remove double quotes because we fixed the use of "$@" in the script. - ---- src/helper/UserSession.cpp.orig 2017-12-05 16:00:16 UTC -+++ src/helper/UserSession.cpp -@@ -45,10 +45,8 @@ namespace SDDM { +--- src/helper/UserSession.cpp.orig 2017-12-05 16:00:16.000000000 +0000 ++++ src/helper/UserSession.cpp 2018-09-23 02:12:31.185222000 +0100 +@@ -26,6 +26,9 @@ + #include + #include + #include ++#ifdef __FreeBSD__ ++#include ++#endif + #include + #include + #include +@@ -45,10 +48,8 @@ namespace SDDM { bool UserSession::start() { QProcessEnvironment env = qobject_cast(parent())->session()->processEnvironment(); @@ -22,3 +23,24 @@ qInfo() << "Starting:" << cmd; QProcess::start(cmd); } else if (env.value(QStringLiteral("XDG_SESSION_TYPE")) == QLatin1String("wayland")) { +@@ -112,6 +113,12 @@ namespace SDDM { + + const QByteArray username = qobject_cast(parent())->user().toLocal8Bit(); + struct passwd *pw = getpwnam(username.constData()); ++#ifdef __FreeBSD__ ++ if (setusercontext(NULL, pw, pw->pw_uid, LOGIN_SETALL) != 0) { ++ qCritical() << "setusercontext(..., LOGIN_SETALL) failed for user: " << username; ++ exit(Auth::HELPER_OTHER_ERROR); ++ } ++#else /* !__FreeBSD */ + if (setgid(pw->pw_gid) != 0) { + qCritical() << "setgid(" << pw->pw_gid << ") failed for user: " << username; + exit(Auth::HELPER_OTHER_ERROR); +@@ -124,6 +131,7 @@ namespace SDDM { + qCritical() << "setuid(" << pw->pw_uid << ") failed for user: " << username; + exit(Auth::HELPER_OTHER_ERROR); + } ++#endif /* !__FreeBSD__ */ + if (chdir(pw->pw_dir) != 0) { + qCritical() << "chdir(" << pw->pw_dir << ") failed for user: " << username; + qCritical() << "verify directory exist and has sufficient permissions"; Index: x11/sddm/pkg-message =================================================================== --- x11/sddm/pkg-message +++ /dev/null @@ -1,2 +0,0 @@ -SDDM does not support login.conf(5), and no special restrictions -or settings from login.conf are enforced or applied.