PAM & PAM-related packages renewed

This commit is contained in:
Berk Çakar
2021-06-06 21:09:25 +03:00
parent 01199c184f
commit b722d19312
29 changed files with 607 additions and 132 deletions
@@ -1,6 +1,13 @@
#%PAM-1.0
# Begin /etc/pam.d/kde
auth include system-login
account include system-login
password include system-login
session include system-login
auth requisite pam_nologin.so
auth required pam_env.so
auth required pam_succeed_if.so uid >= 0 quiet
auth include system-auth
account include system-account
password include system-password
session include system-session
# End /etc/pam.d/kde
@@ -1,10 +1,13 @@
#%PAM-1.0
# Begin /etc/pam.d/kde-np
auth required pam_nologin.so
auth required pam_permit.so
auth requisite pam_nologin.so
auth required pam_env.so
account include system-auth
auth required pam_succeed_if.so uid >= 0 quiet
auth required pam_permit.so
password include system-auth
account include system-account
password include system-password
session include system-session
session include system-auth
# End /etc/pam.d/kde-np
@@ -1,7 +1,13 @@
#%PAM-1.0
# Begin /etc/pam.d/kde
auth include system-auth
auth required pam_nologin.so
account include system-auth
password include system-auth
session include system-auth
auth requisite pam_nologin.so
auth required pam_env.so
auth required pam_succeed_if.so uid >= 0 quiet
auth include system-auth
account include system-account
password include system-password
session include system-session
# End /etc/pam.d/kde
@@ -0,0 +1,6 @@
# Begin /etc/pam.d/kscreensaver
auth include system-auth
account include system-account
# End /etc/pam.d/kscreensaver
+13 -5
View File
@@ -81,7 +81,7 @@
<Dependency>networkmanager-qt-devel</Dependency>
<Dependency versionFrom="5.21.5">kwin-devel</Dependency>
<Dependency versionFrom="5.7.1">qt5-sql-odbc</Dependency>
<Dependency versionFrom="5.7.1">qt5-sql-mysql</Dependency>
<Dependency versionFrom="5.7.1">qt5-sql-mysql</Dependency>
<Dependency versionFrom="5.7.1">qt5-base-devel</Dependency>
<Dependency versionFrom="5.7.1">qt5-sql-sqlite</Dependency>
<Dependency versionFrom="5.19.5">libkscreen-devel</Dependency>
@@ -93,7 +93,7 @@
<Dependency versionFrom="5.7.1">qt5-graphicaleffects</Dependency>
<Dependency versionFrom="5.7.1">qt5-declarative-devel</Dependency>
<Dependency versionFrom="5.7.1">qt5-virtualkeyboard-devel</Dependency>
<Dependency>gpsd-devel</Dependency>
<Dependency>libXft-devel</Dependency>
<Dependency>qt5-svg-devel</Dependency>
@@ -132,7 +132,7 @@
<Dependency>kquickcharts</Dependency-->
</BuildDependencies>
<Patches>
<!--dirty fix for qt5.6.0 -->
<!--dirty fix for qt5.6.0 -->
<!-- <Patch level="1">plasma-animation-duration.patch</Patch> -->
<!-- <Patch level="1">28676.patch</Patch> -->
</Patches>
@@ -203,7 +203,7 @@
<Dependency versionFrom="5.7.1">qt5-base</Dependency>
<Dependency versionFrom="5.7.1">qt5-x11extras</Dependency>
<Dependency versionFrom="5.7.1">qt5-declarative</Dependency>
<Dependency>gpsd</Dependency>
<Dependency>kparts</Dependency>
<Dependency>libXft</Dependency>
@@ -224,7 +224,7 @@
<Path fileType="config">/etc/xdg</Path>
<Path fileType="data">/usr/share</Path>
<Path fileType="applications">/usr/share/applications</Path>
<Path fileType="localedata">/usr/share/locale</Path>
<Path fileType="localedata">/usr/share/locale</Path>
<Path fileType="executable">/usr/bin</Path>
<Path fileType="library">/usr/lib/qt5/plugins</Path>
<Path fileType="library">/usr/lib/qt5/qml</Path>
@@ -234,6 +234,7 @@
<AdditionalFiles>
<AdditionalFile target="/etc/pam.d/kde" permission="0644" owner="root">kde.pam</AdditionalFile>
<AdditionalFile target="/etc/pam.d/kde-np" permission="0644" owner="root">kde-np.pam</AdditionalFile>
<AdditionalFile target="/etc/pam.d/kscreensaver" permission="0644" owner="root">kscreensaver.pam</AdditionalFile>
<!--AdditionalFile target="/etc/env.d/40Kde5" permission="0644" owner="root">kde-env.sh</AdditionalFile-->
</AdditionalFiles>
</Package>
@@ -335,6 +336,13 @@
</Package>
<History>
<Update release="51">
<Date>2021-06-05</Date>
<Version>5.21.5</Version>
<Comment>Rebuild.</Comment>
<Name>Berk Çakar</Name>
<Email>berk2238@hotmail.com</Email>
</Update>
<Update release="50">
<Date>2021-05-05</Date>
<Version>5.21.5</Version>
+12 -5
View File
@@ -1,31 +1,38 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/copyleft/gpl.txt
from pisi.actionsapi import autotools
from pisi.actionsapi import get
from pisi.actionsapi import shelltools
from pisi.actionsapi import pisitools
def setup():
# shelltools.export("MOC5", "moc-qt5")
#shelltools.export("MOC5", "moc-qt5")
shelltools.system("sed -i s/systemd/elogind/ data/pam/*")
autotools.configure("--prefix=/usr \
--localstatedir=/var \
--sysconfdir=/etc \
--sbindir=/usr/bin \
--libexecdir=/usr/lib \
--libexecdir=/usr/lib/lightdm \
--disable-static \
--disable-tests \
--enable-liblightdm-qt5 \
--with-greeter-user=lightdm \
--with-greeter-session=pisi-lightdm-greeter")
def build():
autotools.make()
def install():
autotools.rawInstall("DESTDIR=%s" % get.installDIR())
shelltools.system("cp tests/src/lightdm-session " + get.installDIR() + "/usr/bin")
shelltools.system("sed -i '1 s/sh/bash --login/' " + get.installDIR() + "/usr/bin/lightdm-session")
pisitools.removeDir("/etc/init")
pisitools.remove("/usr/lib/liblightdm-gobject-1.la")
+4 -5
View File
@@ -19,7 +19,6 @@ def postInstall(fromVersion, fromRelease, toVersion, toRelease):
except:
pass
if not os.path.exists(Cache):
os.makedirs(Cache, mode=0755)
@@ -28,20 +27,20 @@ def postInstall(fromVersion, fromRelease, toVersion, toRelease):
os.makedirs(Libdir, mode=0770)
os.system("chown -R lightdm:lightdm /var/lib/lightdm-data")
if not os.path.exists(Libdir1):
os.makedirs(Libdir1, mode=0770)
os.system("chown -R lightdm:lightdm /var/lib/lightdm")
if not os.path.exists(Logdir):
os.makedirs(Logdir, mode=0711)
os.system("/bin/chgrp -R lightdm /var/log/lightdm")
os.system("chmod +t /var/{cache/lightdm,lib/lightdm{,-data}}")
os.system("chmod 755 /var/{cache/lightdm,lib/lightdm{,-data}}")
def postRemove():
try:
os.system ("userdel %s" % OUR_NAME)
os.system ("groupdel %s" % OUR_NAME)
except:
pass
pass
@@ -15,7 +15,7 @@ diff -Nuar a/data/lightdm.conf b/data/lightdm.conf
#allow-guest=true
#guest-session=
-#session-wrapper=lightdm-session
+session-wrapper=/usr/bin/wrapper
+#session-wrapper=/usr/bin/wrapper
#greeter-wrapper=
#guest-wrapper=
#display-setup-script=
+18 -8
View File
@@ -27,10 +27,13 @@
<Dependency>libxcb-devel</Dependency>
<Dependency>libXdmcp-devel</Dependency>
<Dependency>qt5-base-devel</Dependency>
<Dependency>vala-devel</Dependency>
<Dependency>libpcre-devel</Dependency>
<Dependency>accountsservice-devel</Dependency>
</BuildDependencies>
<Patches>
<Patch level="1">lightdm-default-config.patch</Patch>
<Patch level="1">lightdm-pam_systemd-disable.patch</Patch>
<!--Patch level="1">lightdm-pam_systemd-disable.patch</Patch-->
</Patches>
</Source>
@@ -56,7 +59,7 @@
<Path fileType="executable">/usr/bin</Path>
<Path fileType="library">/usr/lib/liblightdm-gobject-1.so*</Path>
<Path fileType="library">/usr/libexec</Path>
<Path fileType="library">/usr/lib/lightdm-guest-session</Path>
<Path fileType="library">/usr/lib/lightdm/lightdm-guest-session</Path>
<Path fileType="library">/usr/lib/tmpfiles.d</Path>
<Path fileType="library">/usr/lib/girepository-1.0</Path>
<Path fileType="data">/usr/share/accountsservice</Path>
@@ -67,21 +70,20 @@
<Path fileType="localedata">/usr/share/locale</Path>
<Path fileType="man">/usr/share/man</Path>
<Path fileType="data">/usr/share/polkit-1</Path>
<Path fileType="data">/usr/share/vala</Path>
</Files>
<AdditionalFiles>
<!--AdditionalFiles>
<AdditionalFile owner="root" permission="0644" target="/usr/lib/tmpfiles.d/lightdm.conf">lightdm.tmpfiles</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/etc/pam.d/lightdm">lightdm</AdditionalFile>
<AdditionalFile owner="root" permission="0755" target="/usr/bin/wrapper">wrapper</AdditionalFile>
</AdditionalFiles>
</AdditionalFiles-->
<Provides>
<COMAR script="service.py">System.Service</COMAR>
<COMAR script="package.py">System.Package</COMAR>
</Provides>
</Package>
<Package>
<Name>lightdm-devel</Name>
<Summary>LightDM is a cross-desktop display manager.</Summary>
@@ -95,9 +97,10 @@
<Path fileType="header">/usr/include/lightdm-gobject-1</Path>
<Path fileType="library">/usr/lib/pkgconfig/liblightdm-gobject-1.pc</Path>
<Path fileType="data">/usr/share/gir-1.0</Path>
<Path fileType="data">/usr/share/vala</Path>
</Files>
</Package>
<Package>
<Name>liblightdm-qt5</Name>
<Summary>Qt5 library for LightDM.</Summary>
@@ -110,7 +113,7 @@
<Path fileType="library">/usr/lib/liblightdm-qt5-3.so*</Path>
</Files>
</Package>
<Package>
<Name>liblightdm-qt5-devel</Name>
<Summary>LightDM is a cross-desktop display manager.</Summary>
@@ -126,6 +129,13 @@
<History>
<Update release="2">
<Date>2021-06-05</Date>
<Version>1.30.0</Version>
<Comment>Rebuild.</Comment>
<Name>Berk Çakar</Name>
<Email>berk2238@hotmail.com</Email>
</Update>
<Update release="1">
<Date>2021-05-04</Date>
<Version>1.30.0</Version>
+6 -4
View File
@@ -11,10 +11,12 @@ from pisi.actionsapi import shelltools
def setup():
autotools.autoreconf("-fiv")
#shelltools.system("./autogen.sh")
autotools.configure("--prefix=/usr \
--sysconfdir=/etc \
--with-pam \
--enable-gtk3")
autotools.configure("--prefix=/usr \
--sysconfdir=/etc \
--with-pam \
--enable-gtk3 \
--disable-consolekit \
--with-systemdsystemunitdir=no")
def build():
autotools.make()
+15
View File
@@ -0,0 +1,15 @@
# Begin /etc/pam.d/lxdm
auth requisite pam_nologin.so
auth required pam_env.so
auth required pam_succeed_if.so uid >= 0 quiet
auth include system-auth
account include system-account
password include system-password
session required pam_limits.so
session include system-session
# End /etc/pam.d/lxdm
+19 -12
View File
@@ -19,24 +19,24 @@
<Dependency>intltool</Dependency>
<Dependency>iso-codes-devel</Dependency>
<Dependency>gtk3-devel</Dependency>
<Dependency>gettext-devel</Dependency>
<Dependency>pam-devel</Dependency>
<Dependency>elogind-devel</Dependency>
<Dependency>cairo-devel</Dependency>
<Dependency>pango-devel</Dependency>
<Dependency>dbus-devel</Dependency>
<Dependency>glib2-devel</Dependency>
<Dependency>gettext-devel</Dependency>
<Dependency>glib2-devel</Dependency>>
<Dependency>libX11-devel</Dependency>
<Dependency>libxcb-devel</Dependency>
<Dependency>ConsoleKit-devel</Dependency>
<Dependency>pam-devel</Dependency>
<Dependency>gdk-pixbuf-devel</Dependency>
<Dependency>at-spi2-atk-devel</Dependency>
<Dependency>at-spi2-core-devel</Dependency>
</BuildDependencies>
<Patches>
<Patch>onscreenkeyboard.patch</Patch>
<Patch>customizetion_for_pisilinux.patch</Patch>
<Patch>customization-for-pisilinux.patch</Patch>
<Patch>lxdm-0.5.3-upstream-fixes.patch</Patch>
<Patch>lxdm-0.5.3-pam_console_selinux-disable.patch</Patch>
<!--Patch>lxdm-0.5.3-pam_console_selinux-disable.patch</Patch-->
</Patches>
</Source>
@@ -55,12 +55,11 @@
<Dependency>gtk3</Dependency>
<Dependency>cairo</Dependency>
<Dependency>pango</Dependency>
<Dependency>gdk-pixbuf</Dependency>
<Dependency>dbus</Dependency>
<Dependency>glib2</Dependency>
<Dependency>gdk-pixbuf</Dependency>
<Dependency>libX11</Dependency>
<Dependency>libxcb</Dependency>
<Dependency>ConsoleKit</Dependency>
<Dependency>elogind</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="config">/etc</Path>
@@ -72,7 +71,8 @@
<Path fileType="data">/etc/conf.d/xdm</Path>
</Files>
<AdditionalFiles>
<AdditionalFile owner="root" permission="0644" target="/usr/share/display-managers/lxdm.desktop">lxdm.desktop</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/usr/share/display-managers/lxdm.desktop">lxdm.desktop</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/etc/pam.d/lxdm">lxdm</AdditionalFile>
</AdditionalFiles>
<Provides>
<COMAR script="service.py">System.Service</COMAR>
@@ -80,20 +80,27 @@
</Package>
<History>
<Update release="12">
<Date>2021-06-04</Date>
<Version>0.5.3</Version>
<Comment>LXDM rebuild</Comment>
<Name>Berk Çakar</Name>
<Email>berk2238@hotmail.com</Email>
</Update>
<Update release="11">
<Date>2021-02-11</Date>
<Version>0.5.3</Version>
<Comment>Added new pisilinux theme</Comment>
<Name>Ayhan Yalçınsoy</Name>
<Email>ayhanyalcinsoy@pisilinux.org</Email>
</Update>
</Update>
<Update release="10">
<Date>2021-02-10</Date>
<Version>0.5.3</Version>
<Comment>Added new pisilinux theme</Comment>
<Name>Ayhan Yalçınsoy</Name>
<Email>ayhanyalcinsoy@pisilinux.org</Email>
</Update>
</Update>
<Update release="9">
<Date>2019-04-21</Date>
<Version>0.5.3</Version>
+9 -9
View File
@@ -12,16 +12,14 @@ from pisi.actionsapi import get
def setup():
#shelltools.export("PYTHON", "/usr/bin/python3")
shelltools.makedirs("build")
shelltools.cd("build")
shelltools.cd("build")
cmaketools.configure("-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DUSE_QT5=ON \
-DNO_SYSTEMD=ON \
-DDBUS_CONFIG_DIR=/usr/share/dbus-1/system.d \
-DDBUS_CONFIG_FILENAME=sddm_org.freedesktop.DisplayManager.conf \
-DUSE_WAYLAND=ON \
-DDBUS_CONFIG_DIR=/usr/share/dbus-1/system.d \
-DNO_SYSTEMD=ON \
-DUSE_ELOGIND=ON \
-DCMAKE_INSTALL_LIBEXECDIR=/usr/lib/sddm \
-DBUILD_MAN_PAGES=ON", sourceDir=".." )
@@ -36,10 +34,12 @@ def install():
shelltools.cd("build")
cmaketools.install()
shelltools.system('sed -i "s@system-local-login@system-login@" ' + get.installDIR() + "/etc/pam.d/sddm-autologin")
pisitools.insinto("/usr/share/sddm/themes/Sweet-Cat", "../Sweet-Cat-0.1/*")
pisitools.dodoc("../LICENSE")
## If you don't like to see any character at all not even while being entered set this to true.
pisitools.dosed("%s/usr/share/sddm/themes/Sweet-Cat/theme.conf" % get.installDIR(), 'ForceHideCompletePassword="false"', 'ForceHideCompletePassword="true"')
@@ -0,0 +1,15 @@
Fixes a build issue with the latest Qt 5.15 patches
diff --git a/src/daemon/XorgDisplayServer.cpp b/src/daemon/XorgDisplayServer.cpp
index 5f93a1b..d5f29a9 100644
--- a/src/daemon/XorgDisplayServer.cpp
+++ b/src/daemon/XorgDisplayServer.cpp
@@ -65,7 +65,7 @@ namespace SDDM {
// create a random hexadecimal number
const char *digits = "0123456789abcdef";
for (int i = 0; i < 32; ++i)
- m_cookie[i] = digits[dis(gen)];
+ m_cookie[i] = QLatin1Char(digits[dis(gen)]);
}
XorgDisplayServer::~XorgDisplayServer() {
@@ -0,0 +1,327 @@
diff -Naur a/data/scripts/Xsession b/data/scripts/Xsession
--- a/data/scripts/Xsession 2020-11-03 10:55:31.000000000 +0100
+++ b/data/scripts/Xsession 2021-04-03 18:59:31.051127925 +0200
@@ -62,7 +62,10 @@
fi
done
fi
-
+if which dbus-launch >/dev/null && test -z "$DBUS_SESSION_BUS_ADDRESS";
+then
+ eval "$(dbus-launch --sh-syntax --exit-with-session)"
+fi
# Load Xsession scripts
# OPTIONFILE, USERXSESSION, USERXSESSIONRC and ALTUSERXSESSION are required
# by the scripts to work
diff -Naur a/services/sddm-autologin.pam b/services/sddm-autologin.pam
--- a/services/sddm-autologin.pam 2020-11-03 10:55:31.000000000 +0100
+++ b/services/sddm-autologin.pam 2021-04-03 19:02:11.514619253 +0200
@@ -1,6 +1,6 @@
#%PAM-1.0
auth required pam_env.so
-auth required pam_tally2.so file=/var/log/tallylog onerr=succeed
+auth required pam_faillock.so preauth
auth required pam_shells.so
auth required pam_nologin.so
auth required pam_permit.so
diff -Naur a/src/common/Session.cpp b/src/common/Session.cpp
--- a/src/common/Session.cpp 2020-11-03 10:55:31.000000000 +0100
+++ b/src/common/Session.cpp 2021-04-03 19:00:30.843278097 +0200
@@ -89,7 +89,7 @@
QString Session::desktopSession() const
{
- return fileName().replace(s_entryExtention, QString());
+ return QFileInfo(m_fileName).completeBaseName();
}
QString Session::desktopNames() const
diff -Naur a/src/daemon/Seat.cpp b/src/daemon/Seat.cpp
--- a/src/daemon/Seat.cpp 2020-11-03 10:55:31.000000000 +0100
+++ b/src/daemon/Seat.cpp 2021-04-03 19:00:20.073491217 +0200
@@ -28,6 +28,7 @@
#include <QDebug>
#include <QFile>
+#include <QTimer>
#include <functional>
@@ -52,7 +53,7 @@
return m_name;
}
- bool Seat::createDisplay(int terminalId) {
+ void Seat::createDisplay(int terminalId) {
//reload config if needed
mainConfig.load();
@@ -84,12 +85,24 @@
m_displays << display;
// start the display
- if (!display->start()) {
- qCritical() << "Could not start Display server on vt" << terminalId;
- return false;
+ startDisplay(display);
+ }
+
+ void Seat::startDisplay(Display *display, int tryNr) {
+ if (display->start())
+ return;
+
+ // It's possible that the system isn't ready yet (driver not loaded,
+ // device not enumerated, ...). It's not possible to tell when that changes,
+ // so try a few times with a delay in between.
+ qWarning() << "Attempt" << tryNr << "starting the Display server on vt" << display->terminalId() << "failed";
+
+ if(tryNr >= 3) {
+ qCritical() << "Could not start Display server on vt" << display->terminalId();
+ return;
}
- return true;
+ QTimer::singleShot(2000, display, [=] { startDisplay(display, tryNr + 1); });
}
void Seat::removeDisplay(Display* display) {
diff -Naur a/src/daemon/Seat.h b/src/daemon/Seat.h
--- a/src/daemon/Seat.h 2020-11-03 10:55:31.000000000 +0100
+++ b/src/daemon/Seat.h 2021-04-03 19:00:20.073491217 +0200
@@ -35,13 +35,15 @@
const QString &name() const;
public slots:
- bool createDisplay(int terminalId = -1);
+ void createDisplay(int terminalId = -1);
void removeDisplay(SDDM::Display* display);
private slots:
void displayStopped();
private:
+ void startDisplay(SDDM::Display *display, int tryNr = 1);
+
QString m_name;
QVector<Display *> m_displays;
diff -Naur a/src/daemon/XorgDisplayServer.cpp b/src/daemon/XorgDisplayServer.cpp
--- a/src/daemon/XorgDisplayServer.cpp 2020-11-03 10:55:31.000000000 +0100
+++ b/src/daemon/XorgDisplayServer.cpp 2021-04-03 19:00:20.076824484 +0200
@@ -118,6 +118,11 @@
if (m_started)
return false;
+ if (process) {
+ qCritical() << "Tried to start Xorg before previous instance exited";
+ return false;
+ }
+
// create process
process = new QProcess(this);
@@ -136,106 +141,97 @@
return false;
}
- if (daemonApp->testing()) {
- QStringList args;
- QDir x11socketDir(QStringLiteral("/tmp/.X11-unix"));
- int display = 100;
- while (x11socketDir.exists(QStringLiteral("X%1").arg(display))) {
- ++display;
- }
- m_display = QStringLiteral(":%1").arg(display);
- args << m_display << QStringLiteral("-auth") << m_authPath << QStringLiteral("-br") << QStringLiteral("-noreset") << QStringLiteral("-screen") << QStringLiteral("800x600");
- process->start(mainConfig.X11.XephyrPath.get(), args);
-
-
- // wait for display server to start
- if (!process->waitForStarted()) {
- // log message
- qCritical() << "Failed to start display server process.";
-
- // return fail
- return false;
- }
- emit started();
- } else {
- // set process environment
- QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
- env.insert(QStringLiteral("XCURSOR_THEME"), mainConfig.Theme.CursorTheme.get());
- process->setProcessEnvironment(env);
-
- //create pipe for communicating with X server
- //0 == read from X, 1== write to from X
- int pipeFds[2];
- if (pipe(pipeFds) != 0) {
- qCritical("Could not create pipe to start X server");
- }
+ // set process environment
+ QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
+ env.insert(QStringLiteral("XCURSOR_THEME"), mainConfig.Theme.CursorTheme.get());
+ process->setProcessEnvironment(env);
+
+ //create pipe for communicating with X server
+ //0 == read from X, 1== write to from X
+ int pipeFds[2];
+ if (pipe(pipeFds) != 0) {
+ qCritical("Could not create pipe to start X server");
+ }
- // start display server
- QStringList args = mainConfig.X11.ServerArguments.get().split(QLatin1Char(' '), QString::SkipEmptyParts);
- args << QStringLiteral("-auth") << m_authPath
+ // start display server
+ QStringList args;
+ if (!daemonApp->testing()) {
+ process->setProgram(mainConfig.X11.ServerPath.get());
+ args << mainConfig.X11.ServerArguments.get().split(QLatin1Char(' '), QString::SkipEmptyParts)
<< QStringLiteral("-background") << QStringLiteral("none")
- << QStringLiteral("-noreset")
- << QStringLiteral("-displayfd") << QString::number(pipeFds[1])
<< QStringLiteral("-seat") << displayPtr()->seat()->name();
if (displayPtr()->seat()->name() == QLatin1String("seat0")) {
args << QStringLiteral("vt%1").arg(displayPtr()->terminalId());
}
- qDebug() << "Running:"
- << qPrintable(mainConfig.X11.ServerPath.get())
- << qPrintable(args.join(QLatin1Char(' ')));
- process->start(mainConfig.X11.ServerPath.get(), args);
-
- // wait for display server to start
- if (!process->waitForStarted()) {
- // log message
- qCritical() << "Failed to start display server process.";
-
- // return fail
- close(pipeFds[0]);
- return false;
- }
+ } else {
+ process->setProgram(mainConfig.X11.XephyrPath.get());
+ args << QStringLiteral("-br")
+ << QStringLiteral("-screen") << QStringLiteral("800x600");
+ }
- // close the other side of pipe in our process, otherwise reading
- // from it may stuck even X server exit.
- close(pipeFds[1]);
+ args << QStringLiteral("-auth") << m_authPath
+ << QStringLiteral("-noreset")
+ << QStringLiteral("-displayfd") << QString::number(pipeFds[1]);
+
+ process->setArguments(args);
+ qDebug() << "Running:"
+ << qPrintable(process->program())
+ << qPrintable(process->arguments().join(QLatin1Char(' ')));
+ process->start();
+
+ // wait for display server to start
+ if (!process->waitForStarted()) {
+ // log message
+ qCritical() << "Failed to start display server process.";
- QFile readPipe;
+ // return fail
+ close(pipeFds[0]);
+ return false;
+ }
- if (!readPipe.open(pipeFds[0], QIODevice::ReadOnly)) {
- qCritical("Failed to open pipe to start X Server");
+ // close the other side of pipe in our process, otherwise reading
+ // from it may stuck even X server exit.
+ close(pipeFds[1]);
- close(pipeFds[0]);
- return false;
- }
- QByteArray displayNumber = readPipe.readLine();
- if (displayNumber.size() < 2) {
- // X server gave nothing (or a whitespace).
- qCritical("Failed to read display number from pipe");
+ QFile readPipe;
- close(pipeFds[0]);
- return false;
- }
- displayNumber.prepend(QByteArray(":"));
- displayNumber.remove(displayNumber.size() -1, 1); // trim trailing whitespace
- m_display = QString::fromLocal8Bit(displayNumber);
+ if (!readPipe.open(pipeFds[0], QIODevice::ReadOnly)) {
+ qCritical("Failed to open pipe to start X Server");
- // close our pipe
close(pipeFds[0]);
+ stop();
+ return false;
+ }
+ QByteArray displayNumber = readPipe.readLine();
+ if (displayNumber.size() < 2) {
+ // X server gave nothing (or a whitespace).
+ qCritical("Failed to read display number from pipe");
- emit started();
+ close(pipeFds[0]);
+ stop();
+ return false;
}
+ displayNumber.prepend(QByteArray(":"));
+ displayNumber.remove(displayNumber.size() -1, 1); // trim trailing whitespace
+ m_display = QString::fromLocal8Bit(displayNumber);
+
+ // close our pipe
+ close(pipeFds[0]);
// The file is also used by the greeter, which does care about the
// display number. Write the proper entry, if it's different.
if(m_display != QStringLiteral(":0")) {
if(!addCookie(m_authPath)) {
qCritical() << "Failed to write xauth file";
+ stop();
return false;
}
}
changeOwner(m_authPath);
+ emit started();
+
// set flag
m_started = true;
@@ -244,8 +240,7 @@
}
void XorgDisplayServer::stop() {
- // check flag
- if (!m_started)
+ if (!process)
return;
// log message
@@ -260,6 +255,12 @@
}
void XorgDisplayServer::finished() {
+ // clean up
+ if (process) {
+ process->deleteLater();
+ process = nullptr;
+ }
+
// check flag
if (!m_started)
return;
@@ -295,10 +296,6 @@
displayStopScript->deleteLater();
displayStopScript = nullptr;
- // clean up
- process->deleteLater();
- process = nullptr;
-
// remove authority file
QFile::remove(m_authPath);
+1 -1
View File
@@ -4,7 +4,7 @@ auth required pam_env.so
auth required pam_permit.so
auth sufficient pam_succeed_if.so uid >= 1000 quiet
auth sufficient pam_succeed_if.so uid >= 0 quiet
auth required pam_deny.so
account required pam_access.so
+16 -4
View File
@@ -25,14 +25,17 @@
<Dependency>extra-cmake-modules</Dependency>
<Dependency>docutils</Dependency>
<Dependency>python-docutils</Dependency>
<Dependency>elogind-devel</Dependency>
</BuildDependencies>
<Patches>
<Patch>sddm-respect-user-flags.patch</Patch>
<Patches>
<!--Patch>sddm-respect-user-flags.patch</Patch>
<Patch>sddm-0.14.0-consolekit.patch</Patch>
<Patch>sddm-0.16.0-ck2-revert.patch</Patch>
<Patch>pam-faillock.patch</Patch>
<Patch>sddm-fix-race-pre.patch</Patch>
<Patch>sddm-fix-race.patch</Patch>
<Patch>sddm-fix-race.patch</Patch-->
<Patch>sddm-0.19.0-consolidate-1.patch</Patch>
<Patch>0002-sddm-fix-build.patch</Patch>
</Patches>
</Source>
@@ -51,6 +54,7 @@
<Dependency>pam</Dependency>
<Dependency>libgcc</Dependency>
<Dependency>libxcb</Dependency>
<Dependency>elogind</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="config">/etc</Path>
@@ -63,8 +67,9 @@
</Files>
<AdditionalFiles>
<AdditionalFile owner="root" permission="0644" target="/etc/sddm.conf">sddm.conf</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/etc/pam.d/sddm">sddm</AdditionalFile>
<!--AdditionalFile owner="root" permission="0644" target="/etc/pam.d/sddm">sddm</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/etc/pam.d/sddm-autologin">sddm-autologin</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/etc/pam.d/sddm-greeter">sddm-greeter</AdditionalFile-->
<AdditionalFile owner="root" permission="0644" target="/etc/polkit-1/rules.d/10-backlight.rules">10-backlight.rules</AdditionalFile>
</AdditionalFiles>
<Provides>
@@ -74,6 +79,13 @@
</Package>
<History>
<Update release="16">
<Date>2021-06-04</Date>
<Version>0.19.0</Version>
<Comment>Rebuild.</Comment>
<Name>Berk Çakar</Name>
<Email>berk2238@hotmail.com</Email>
</Update>
<Update release="15">
<Date>2021-01-09</Date>
<Version>0.19.0</Version>
+18 -15
View File
@@ -16,30 +16,30 @@ def setup():
shelltools.export("LDFLAGS","%s -pie" % get.LDFLAGS())
#pisitools.dosed("pathnames.h", "/usr/X11R6/bin/xauth", r"/usr/bin/xauth")
#pisitools.dosed("sshd_config", "(?m)^(^#UsePAM ).*", r"UsePAM yes")
#pisitools.dosed("sshd_config", "(?m)^(^#PasswordAuthentication ).*", r"PasswordAuthentication no")
#pisitools.dosed("sshd_config", "(?m)^(^#X11Forwarding ).*", r"X11Forwarding yes")
#pisitools.dosed("sshd_config", "(?m)^(^#UseDNS ).*", r"UseDNS no")
#pisitools.dosed("sshd_config", "(?m)^(^#PermitRootLogin ).*", r"PermitRootLogin no")
pisitools.dosed("sshd_config", "(?m)^(^#UsePAM ).*", r"UsePAM yes")
pisitools.dosed("sshd_config", "(?m)^(^#PasswordAuthentication ).*", r"PasswordAuthentication no")
pisitools.dosed("sshd_config", "(?m)^(^#X11Forwarding ).*", r"X11Forwarding yes")
pisitools.dosed("sshd_config", "(?m)^(^#UseDNS ).*", r"UseDNS no")
pisitools.dosed("sshd_config", "(?m)^(^#PermitRootLogin ).*", r"PermitRootLogin no")
autotools.autoreconf("-fi")
# Kerberos support is a must, libedit is optional
# Update configure parameters when both are ready
autotools.configure("--sysconfdir=/etc/ssh \
--libexecdir=/usr/libexec/openssh \
--datadir=/usr/share/openssh \
--disable-strip \
autotools.configure("--prefix=/usr \
--sysconfdir=/etc/ssh \
--datadir=/usr/share/sshd \
--with-pam \
--with-libedit \
--with-kerberos5 \
--with-tcp-wrappers \
--with-md5-passwords \
--with-ipaddr-display \
--with-privsep-user=sshd \
--with-privsep-path=/var/empty \
--with-default-path=/usr/bin \
--without-zlib-version-check \
--without-ssl-engine")
--with-superuser-path=/sbin:/bin:/usr/sbin:/usr/bin \
--with-pid-dir=/run")
def build():
autotools.make()
@@ -47,17 +47,20 @@ def build():
def install():
autotools.rawInstall("DESTDIR=%s" % get.installDIR())
# PAM configuration
pisitools.dodir("/etc/pam.d")
shelltools.system("sed 's@d/login@d/sshd@g' /etc/pam.d/login > " + get.installDIR() + "/etc/pam.d/sshd")
shelltools.system("chmod 644 " + get.installDIR() + "/etc/pam.d/sshd")
# fixes #10992
pisitools.dobin("contrib/ssh-copy-id")
pisitools.doman("contrib/ssh-copy-id.1")
# an script in contrib
pisitools.dobin("contrib/findssl.sh")
shelltools.chmod("%s/etc/ssh/sshd_config" % get.installDIR(), 0600)
# special request by merensan
shelltools.echo("%s/etc/ssh/ssh_config" % get.installDIR(), "ServerAliveInterval 5")
pisitools.dodir("/var/empty/sshd")
pisitools.dodoc("ChangeLog", "CREDITS", "OVERVIEW", "README*", "TODO", "sshd_config")
+9 -2
View File
@@ -13,7 +13,7 @@
<IsA>service</IsA>
<Summary>Port of OpenBSD's free SSH release</Summary>
<Description>OpenSSH is a FREE version of the SSH connectivity tools that technical users of the Internet rely on. Users of telnet, rlogin, and ftp may not realize that their password is transmitted across the Internet unencrypted, but it is. OpenSSH encrypts all traffic (including passwords) to effectively eliminate eavesdropping, connection hijacking, and other attacks.</Description>
<Archive sha1sum="c44b96094869f177735ae053d92bd5fcab1319de" type="targz">http://ftp.icm.edu.pl/pub/OpenBSD/OpenSSH/portable/openssh-8.1p1.tar.gz</Archive>
<Archive sha1sum="8f9f0c94317baeb97747d6258f3997b4542762c0" type="targz">https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-8.6p1.tar.gz</Archive>
<BuildDependencies>
<Dependency>libedit-devel</Dependency>
<Dependency>zlib-devel</Dependency>
@@ -50,7 +50,7 @@
<Path fileType="doc">/usr/share/doc</Path>
</Files>
<AdditionalFiles>
<AdditionalFile owner="root" permission="0644" target="/etc/pam.d/sshd">sshd.pam</AdditionalFile>
<!--AdditionalFile owner="root" permission="0644" target="/etc/pam.d/sshd">sshd.pam</AdditionalFile-->
</AdditionalFiles>
<Provides>
<COMAR script="service.py">System.Service</COMAR>
@@ -58,6 +58,13 @@
</Package>
<History>
<Update release="6">
<Date>2021-06-05</Date>
<Version>8.6_p1</Version>
<Comment>Version bump.</Comment>
<Name>Berk Çakar</Name>
<Email>berk2238@hotmail.com</Email>
</Update>
<Update release="5">
<Date>2020-01-21</Date>
<Version>8.1_p1</Version>
+12 -5
View File
@@ -12,7 +12,7 @@
<IsA>service</IsA>
<Summary>A fast and secure drop-in replacement for sendmail</Summary>
<Description>Postfix is Wietse Venema's mailer that started life as an alternative to the widely-used Sendmail program.</Description>
<Archive sha1sum="044a2949f50f4fe3d6d569673bcf691a9105ad60" type="targz">ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-3.4.6.tar.gz</Archive>
<Archive sha1sum="1dfb10729498be5d387dc730117c2a845dd93ac0" type="targz">ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-3.5.8.tar.gz</Archive>
<BuildDependencies>
<Dependency>db-devel</Dependency>
<Dependency>libnsl-devel</Dependency>
@@ -24,10 +24,10 @@
<Dependency>postgresql-lib</Dependency>
<Dependency>mit-kerberos</Dependency>
</BuildDependencies>
<Patches>
<!--Patches>
<Patch level="1">postfix-glibc230.patch</Patch>
<Patch level="1">postfix-large-fs.patch</Patch>
</Patches>
</Patches-->
</Source>
<Package>
@@ -68,9 +68,9 @@
<AdditionalFile owner="root" permission="0755" target="/etc/postfix/ssl/mkcert.sh">mkcert.sh</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/etc/mail/aliases">aliases</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/etc/mail/mailcap">mailcap</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/etc/pam.d/smtp">smtp.pam</AdditionalFile>
<!--AdditionalFile owner="root" permission="0644" target="/etc/pam.d/smtp">smtp.pam</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/etc/pam.d/pop">common.pam</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/etc/pam.d/imap">common.pam</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/etc/pam.d/imap">common.pam</AdditionalFile-->
<AdditionalFile owner="root" permission="0644" target="/usr/share/doc/postfix/defaults/bounce.cf.tr">bounce.cf.tr</AdditionalFile>
</AdditionalFiles>
<Provides>
@@ -91,6 +91,13 @@
</Package>
<History>
<Update release="6">
<Date>2021-06-05</Date>
<Version>3.5.8</Version>
<Comment>Version bump.</Comment>
<Name>Berk Çakar</Name>
<Email>berk2238@hotmail.com</Email>
</Update>
<Update release="5">
<Date>2020-01-27</Date>
<Version>3.4.6</Version>
+10 -3
View File
@@ -5,10 +5,13 @@
# See the file http://www.gnu.org/licenses/gpl.txt
from pisi.actionsapi import mesontools
from pisi.actionsapi import pisitools
from pisi.actionsapi import shelltools
from pisi.actionsapi import get
def setup():
mesontools.configure("-Drootlibdir=/usr/lib \
--prefix=/usr \
mesontools.configure("--prefix=/usr \
-Drootlibdir=/usr/lib \
-Dpolkit=true \
-Dsplit-bin=true \
-Dsplit-usr=false \
@@ -27,4 +30,8 @@ def build():
mesontools.build()
def install():
mesontools.install()
mesontools.install()
shelltools.system("ln -s libelogind.pc %s/usr/lib/pkgconfig/libsystemd.pc" % get.installDIR())
shelltools.system("ln -s libelogind.pc %s/usr/lib/pkgconfig/libsystemd-logind.pc" % get.installDIR())
shelltools.system("ln -sr %s/usr/include/elogind %s/usr/include/systemd" % (get.installDIR(), get.installDIR()))
+12 -9
View File
@@ -1,13 +1,16 @@
# Begin /etc/pam.d/elogind-user
#%PAM-1.0
auth required pam_unix.so
auth required pam_nologin.so
account required pam_unix.so
password required pam_unix.so
session required pam_unix.so
session required pam_loginuid.so
session required pam_elogind.so
account required pam_access.so
account include system-account
session required pam_env.so
session required pam_limits.so
session required pam_unix.so
session required pam_loginuid.so
session optional pam_keyinit.so force revoke
session optional pam_elogind.so
# End /etc/pam.d/elogind-user
auth required pam_deny.so
password required pam_deny.so
# End /etc/pam.d/elogind-user
+16 -9
View File
@@ -35,10 +35,10 @@
<Dependency>libpcre2-devel</Dependency>
<Dependency>bash-completion</Dependency>
</BuildDependencies>
<Patches>
<!--Patch>reverse_DISABLE_BUFFER_in_cg_attach.patch</Patch>
<Patch>reverse_CLOSE_ON_EXEC_removal.patch</Patch-->
</Patches>
<!--Patches>
<Patch>reverse_DISABLE_BUFFER_in_cg_attach.patch</Patch>
<Patch>reverse_CLOSE_ON_EXEC_removal.patch</Patch>
</Patches-->
</Source>
<Package>
@@ -72,12 +72,12 @@
<Path fileType="data">/usr/share/bash-completion</Path>
</Files>
<AdditionalFiles>
<!--AdditionalFile owner="root" permission="0644" target="/usr/lib/tmpfiles.d/elogind.conf">tmpfiles.conf</AdditionalFile-->
<AdditionalFile owner="root" permission="0644" target="/etc/polkit-1/rules.d/75-elogind.rules">25-elogind.rules</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/usr/lib/tmpfiles.d/elogind.conf">tmpfiles.conf</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/etc/polkit-1/rules.d/75-elogind.rules">25-elogind.rules</AdditionalFile>
<AdditionalFile permission="0644" target="/usr/share/polkit-1/rules.d/75-elogind.rules">25-elogind.rules</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/etc/pam.d/elogind-user">elogind-user</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/etc/pam.d/system-login">system-login</AdditionalFile>
<AdditionalFile owner="root" permission="0755" target="/etc/pam.d/elogind">elogind.pamd</AdditionalFile>
<!--AdditionalFile owner="root" permission="0644" target="/etc/pam.d/system-login">system-login</AdditionalFile-->
<!--AdditionalFile owner="root" permission="0755" target="/etc/pam.d/elogind">elogind.pamd</AdditionalFile-->
</AdditionalFiles>
<Provides>
<COMAR script="service.py">System.Service</COMAR>
@@ -87,7 +87,7 @@
<!-- Package>ConsoleKit</Package -->
</Conflicts>
</Package>
<Package>
<Name>elogind-devel</Name>
<Summary>Development files for elogind</Summary>
@@ -101,6 +101,13 @@
</Package>
<History>
<Update release="3">
<Date>2021-06-03</Date>
<Version>246.10</Version>
<Comment>elogind rebuild</Comment>
<Name>Berk Çakar</Name>
<Email>berk2238@hotmail.com</Email>
</Update>
<Update release="2">
<Date>2021-05-03</Date>
<Version>246.10</Version>
+2 -1
View File
@@ -25,12 +25,13 @@ def setup():
--with-env-editor \
--with-ignore-dot \
--with-tty-tickets \
--with-all-insults \
--with-ldap \
--enable-shell-sets-home \
--without-selinux \
--with-sendmail=/usr/sbin/sendmail \
--without-rpath")
# fix unused direct dependency analysis
pisitools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
+1 -1
View File
@@ -5,7 +5,7 @@ import os
permissions = {
"/etc/sudoers" : ["0440", "root:root"],
"/etc/sudoers.d" : ["0750", "root:root"],
"/var/db/sudo" : ["0700", "root:root"],
"/var/db/sudo" : ["0711", "root:root"],
"/usr/bin/sudo" : ["4111", "root:root"],
"/usr/bin/sudoedit" : ["4111", "root:root"],
"/usr/bin/sudoreplay" : ["0111", "root:root"],
+14 -6
View File
@@ -1,7 +1,15 @@
#%PAM-1.0
auth include system-auth
account include system-auth
password include system-auth
session optional pam_keyinit.so revoke
session required pam_limits.so
# Begin /etc/pam.d/sudo
# include the default auth settings
auth include system-auth
# include the default account settings
account include system-account
# Set default environment variables for the service user
session required pam_env.so
# include system session defaults
session include system-session
# End /etc/pam.d/sudo
+9 -2
View File
@@ -51,8 +51,8 @@
<AdditionalFiles>
<AdditionalFile owner="root" permission="0440" target="/etc/sudoers">sudoers</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/etc/sudoers.orig">sudoers</AdditionalFile>
<AdditionalFile owner="root" permission="0600" target="/etc/pam.d/sudo">sudo.pamd</AdditionalFile>
<AdditionalFile owner="root" permission="0600" target="/etc/pam.d/sudo-i">sudo-i.pamd</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/etc/pam.d/sudo">sudo.pamd</AdditionalFile>
<!--AdditionalFile owner="root" permission="0600" target="/etc/pam.d/sudo-i">sudo-i.pamd</AdditionalFile-->
<AdditionalFile owner="root" permission="0644" target="/usr/lib/tmpfiles.d/sudo.conf">sudo.tmpfiles.conf</AdditionalFile>
</AdditionalFiles>
<Provides>
@@ -61,6 +61,13 @@
</Package>
<History>
<Update release="12">
<Date>2021-06-05</Date>
<Version>1.9.5</Version>
<Comment>Sudo rebuild.</Comment>
<Name>Berk Çakar</Name>
<Email>berk2238@hotmail.com</Email>
</Update>
<Update release="11">
<Date>2021-01-27</Date>
<Version>1.9.5</Version>
+9 -8
View File
@@ -1,13 +1,14 @@
#%PAM-1.0
# Begin /etc/pam.d/xdm
auth include system-auth
auth required pam_nologin.so
auth requisite pam_nologin.so
auth required pam_env.so
auth include system-auth
account include system-auth
account include system-account
password include system-auth
password include system-password
session include system-auth
session required pam_limits.so
session include system-session
session optional pam_console.so
session optional pam_polkit_console.so
# End /etc/pam.d/xdm