Authentication & PAM Base rearranged from scratch
This commit is contained in:
+16
-22
@@ -10,41 +10,35 @@ from pisi.actionsapi import shelltools
|
||||
from pisi.actionsapi import get
|
||||
|
||||
def setup():
|
||||
shelltools.touch("ChangeLog")
|
||||
pisitools.flags.add("-fPIC -D_GNU_SOURCE")
|
||||
|
||||
shelltools.system("./conf.sh")
|
||||
|
||||
autotools.autoreconf("-fi")
|
||||
autotools.configure("--libdir=/usr/lib \
|
||||
--enable-nls \
|
||||
shelltools.system("sed -e /service_DATA/d \
|
||||
-i modules/pam_namespace/Makefile.am && NOCONFIGURE=1 ./autogen.sh")
|
||||
|
||||
shelltools.system("./pisi-pambase.sh")
|
||||
|
||||
autotools.configure("--prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--libdir=/usr/lib \
|
||||
--disable-regenerate-docu \
|
||||
--disable-doc \
|
||||
--disable-audit \
|
||||
--enable-usergroups \
|
||||
--enable-securedir=/lib/security \
|
||||
--enable-isadir=/lib/security")
|
||||
|
||||
pisitools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
|
||||
--docdir=/usr/share/doc/Linux-PAM-" + get.srcVERSION())
|
||||
|
||||
def build():
|
||||
# Update .po files
|
||||
autotools.make("-C po update-gmo")
|
||||
|
||||
autotools.make()
|
||||
|
||||
def check():
|
||||
autotools.make("check")
|
||||
|
||||
# dlopen check
|
||||
shelltools.system("./dlopen-test.sh")
|
||||
pass
|
||||
|
||||
def install():
|
||||
autotools.rawInstall("DESTDIR=%s" % get.installDIR())
|
||||
|
||||
|
||||
#pisitools.removeDir("/usr/share/doc/Linux-PAM/")
|
||||
for f in ["system-password", "system-session", "system-account"]:
|
||||
for f in ["system-password", "system-session", "system-account", "system-auth", "other"]:
|
||||
shelltools.system("chmod 755 " + f)
|
||||
pisitools.insinto("/etc/pam.d/", "%s" % f)
|
||||
|
||||
|
||||
shelltools.system("chmod -v 4755 " + get.installDIR() + "/sbin/unix_chkpwd")
|
||||
|
||||
#pisitools.doman("doc/man/*.[0-9]")
|
||||
pisitools.dodoc("CHANGELOG", "Copyright", "README")
|
||||
|
||||
@@ -20,9 +20,12 @@ cat > system-session << "EOF"
|
||||
# Begin /etc/pam.d/system-session
|
||||
|
||||
session required pam_unix.so
|
||||
session required pam_loginuid.so
|
||||
session optional pam_elogind.so
|
||||
|
||||
# End /etc/pam.d/system-session
|
||||
EOF
|
||||
|
||||
cat > system-password << "EOF"
|
||||
# Begin /etc/pam.d/system-password
|
||||
|
||||
+21
-12
@@ -14,27 +14,29 @@
|
||||
<Description>PAM (Pluggable Authentication Modules) is a system security tool that allows system administrators to set authentication policy without having to recompile programs that handle authentication.</Description>
|
||||
<Archive sha1sum="d0f72065b3b3978876b29d55aad6328c5db58247" type="targz">https://github.com/linux-pam/linux-pam/archive/v1.5.1.tar.gz</Archive>
|
||||
<AdditionalFiles>
|
||||
<AdditionalFile target="conf.sh" permission="0755">conf.sh</AdditionalFile>
|
||||
<AdditionalFile target="dlopen.sh" permission="0755">dlopen.sh</AdditionalFile>
|
||||
<AdditionalFile target="dlopen-test.sh" permission="0755">dlopen-test.sh</AdditionalFile>
|
||||
<AdditionalFile target="pisi-pambase.sh" permission="0755">pisi-pambase.sh</AdditionalFile>
|
||||
<!--AdditionalFile target="dlopen.sh" permission="0755">dlopen.sh</AdditionalFile>
|
||||
<AdditionalFile target="dlopen-test.sh" permission="0755">dlopen-test.sh</AdditionalFile-->
|
||||
</AdditionalFiles>
|
||||
<BuildDependencies>
|
||||
<Dependency>perl</Dependency>
|
||||
<Dependency>gettext-devel</Dependency>
|
||||
<Dependency>cracklib-devel</Dependency>
|
||||
<Dependency>libxslt-devel</Dependency>
|
||||
<Dependency>docbook-xsl</Dependency>
|
||||
<Dependency>libnsl-devel</Dependency>
|
||||
<Dependency>libtirpc-devel</Dependency>
|
||||
<Dependency>audit-devel</Dependency>
|
||||
</BuildDependencies>
|
||||
<Patches>
|
||||
<!-- <Patch level="1">CVE-2020-27780.patch</Patch> -->
|
||||
<!-- <Patch level="1">fedora/pam-1.4.0-full-relro.patch</Patch> -->
|
||||
</Patches>
|
||||
<!--Patches>
|
||||
<Patch level="1">CVE-2020-27780.patch</Patch>
|
||||
<Patch level="1">fedora/pam-1.4.0-full-relro.patch</Patch>
|
||||
</Patches-->
|
||||
</Source>
|
||||
|
||||
<Package>
|
||||
<Name>pam</Name>
|
||||
<RuntimeDependencies>
|
||||
<Dependency>libpwquality</Dependency>
|
||||
<Dependency>cracklib</Dependency>
|
||||
<Dependency>audit</Dependency>
|
||||
<Dependency>libnsl</Dependency>
|
||||
<Dependency>libtirpc</Dependency>
|
||||
</RuntimeDependencies>
|
||||
<Files>
|
||||
<Path fileType="config">/etc</Path>
|
||||
@@ -70,6 +72,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="8">
|
||||
<Date>2021-06-03</Date>
|
||||
<Version>1.5.1</Version>
|
||||
<Comment>PAM rebuild.</Comment>
|
||||
<Name>Berk Çakar</Name>
|
||||
<Email>berk2238@hotmail.com</Email>
|
||||
</Update>
|
||||
<Update release="7">
|
||||
<Date>2021-04-29</Date>
|
||||
<Version>1.5.1</Version>
|
||||
|
||||
@@ -13,21 +13,21 @@ def setup():
|
||||
#pisitools.dosed("configure.ac", "pardus-release", "pisilinux-release")
|
||||
#pisitools.dosed("configure", "pardus-release", "pisilinux-release")
|
||||
autotools.autoreconf("-fiv")
|
||||
autotools.configure("--with-pam-module-dir=/lib/security/ \
|
||||
--with-os-type=pisilinux \
|
||||
autotools.configure("--prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--localstatedir=/var \
|
||||
--with-pam-module-dir=/lib/security/ \
|
||||
--with-duktape \
|
||||
--with-dbus \
|
||||
--enable-examples \
|
||||
--enable-introspection \
|
||||
--disable-systemd \
|
||||
--enable-libsystemd-login=no \
|
||||
--enable-libelogind=no \
|
||||
--disable-libsystemd-login \
|
||||
--with-systemdsystemunitdir=no \
|
||||
--disable-man-pages \
|
||||
--disable-gtk-doc \
|
||||
--disable-static")
|
||||
|
||||
pisitools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
|
||||
|
||||
pisitools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
|
||||
|
||||
def build():
|
||||
shelltools.export('HOME', get.workDIR())
|
||||
@@ -40,6 +40,6 @@ def install():
|
||||
shelltools.chmod("%s/var/lib/polkit-1" % get.installDIR(), mode=00700)
|
||||
shelltools.chmod("%s/etc/polkit-1/rules.d" % get.installDIR(), mode=00700)
|
||||
shelltools.chown("%s/etc/polkit-1/rules.d" % get.installDIR(),"polkitd","root") #yada? "polkitd","root"
|
||||
shelltools.chown("%s/var/lib/polkit-1" % get.installDIR(),"polkitd","polkitd")
|
||||
shelltools.chown("%s/var/lib/polkit-1" % get.installDIR(),"polkitd","polkitd")
|
||||
shelltools.chown("%s/usr/share/polkit-1" % get.installDIR(),"polkitd","root") #yada? "polkitd","root"
|
||||
pisitools.dodoc("AUTHORS", "NEWS", "README", "HACKING", "COPYING")
|
||||
|
||||
@@ -1,99 +0,0 @@
|
||||
From dc3f89a7840c0ffab00d335f127b7d6ab67398d9 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Berk=20=C3=87akar?= <berk2238@hotmail.com>
|
||||
Date: Wed, 12 May 2021 23:02:55 +0300
|
||||
Subject: [PATCH] Updated build args for Pisi Linux
|
||||
|
||||
---
|
||||
configure.ac | 12 ++++++------
|
||||
meson.build | 4 ++--
|
||||
meson_options.txt | 2 +-
|
||||
3 files changed, 9 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 4ac2219..722824d 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -396,14 +396,14 @@ fi
|
||||
|
||||
AC_SUBST(PAM_MODULE_DIR)
|
||||
|
||||
-AC_ARG_WITH(os-type, [ --with-os-type=<os> distribution or OS (redhat/suse/gentoo/pardus/solaris/netbsd)])
|
||||
+AC_ARG_WITH(os-type, [ --with-os-type=<os> distribution or OS (redhat/suse/gentoo/pisilinux/solaris/netbsd)])
|
||||
|
||||
#### Check our operating system (distro-tweaks required)
|
||||
if test "z$with_os_type" = "z"; then
|
||||
AC_CHECK_FILE(/etc/redhat-release,distro_type="redhat")
|
||||
AC_CHECK_FILE(/etc/SuSE-release,distro_type="suse")
|
||||
AC_CHECK_FILE(/etc/gentoo-release,distro_type="gentoo")
|
||||
- AC_CHECK_FILE(/etc/pardus-release,distro_type="pardus")
|
||||
+ AC_CHECK_FILE(/etc/pisilinux-release,distro_type="pisilinux")
|
||||
if test "z$distro_type" = "z"; then
|
||||
echo "Linux distribution autodetection failed, specify the distribution to target using --with-os-type="
|
||||
else
|
||||
@@ -419,8 +419,8 @@ if test x$with_os_type = x; then
|
||||
with_os_type=suse
|
||||
elif test x$operating_system = xgentoo ; then
|
||||
with_os_type=gentoo
|
||||
- elif test x$operating_system = xpardus ; then
|
||||
- with_os_type=pardus
|
||||
+ elif test x$operating_system = xpisilinux ; then
|
||||
+ with_os_type=pisilinux
|
||||
elif test x$operating_system = xsolaris ; then
|
||||
with_os_type=solaris
|
||||
elif test x$operating_system = xfreebsd ; then
|
||||
@@ -444,7 +444,7 @@ AM_CONDITIONAL(OS_TYPE_UNKNOWN, test x$with_os_type = xunknown, [Running on unkn
|
||||
AM_CONDITIONAL(OS_TYPE_RED_HAT, test x$with_os_type = xredhat, [Running on Red Hat OS'es])
|
||||
AM_CONDITIONAL(OS_TYPE_SUSE, test x$with_os_type = xsuse, [Running on SUSE OS'es])
|
||||
AM_CONDITIONAL(OS_TYPE_GENTOO, test x$with_os_type = xgentoo, [Running on Gentoo OS'es])
|
||||
-AM_CONDITIONAL(OS_TYPE_PARDUS, test x$with_os_type = xpardus, [Running on Pardus OS'es])
|
||||
+AM_CONDITIONAL(OS_TYPE_PISI_LINUX, test x$with_os_type = xpisilinux, [Running on Pisi GNU/Linux OS'es])
|
||||
AM_CONDITIONAL(OS_TYPE_SOLARIS, test x$with_os_type = xsolaris, [Running os Solaris OS'es])
|
||||
AM_CONDITIONAL(OS_TYPE_FREEBSD, test x$with_os_type = xfreebsd, [Running on FreeBSD OS'es])
|
||||
|
||||
@@ -456,7 +456,7 @@ if ! test -z "$with_pam_include"; then
|
||||
PAM_FILE_INCLUDE_ACCOUNT=$with_pam_include
|
||||
PAM_FILE_INCLUDE_PASSWORD=$with_pam_include
|
||||
PAM_FILE_INCLUDE_SESSION=$with_pam_include
|
||||
-elif test x$with_os_type = xredhat -o x$with_os_type = xgentoo -o x$with_os_type = xpardus ; then
|
||||
+elif test x$with_os_type = xredhat -o x$with_os_type = xgentoo -o x$with_os_type = xpisilinux ; then
|
||||
PAM_FILE_INCLUDE_AUTH=system-auth
|
||||
PAM_FILE_INCLUDE_ACCOUNT=system-auth
|
||||
PAM_FILE_INCLUDE_PASSWORD=system-auth
|
||||
diff --git a/meson.build b/meson.build
|
||||
index ed75c61..104a80f 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -248,7 +248,7 @@ if os_type == ''
|
||||
['suse', '/etc/SuSE-release'],
|
||||
['debian', '/etc/debian_version'],
|
||||
['gentoo', '/etc/gentoo-release'],
|
||||
- ['pardus', '/etc/pardus-release'],
|
||||
+ ['pisilinux', '/etc/pisilinux-release'],
|
||||
]
|
||||
|
||||
foreach os_path: os_paths
|
||||
@@ -279,7 +279,7 @@ if pam_include == ''
|
||||
'PAM_FILE_INCLUDE_PASSWORD': 'system',
|
||||
'PAM_FILE_INCLUDE_SESSION': 'system',
|
||||
}
|
||||
- #if ['redhat', 'gentoo', 'pardus'].contains(os_type)
|
||||
+ #if ['redhat', 'gentoo', 'pisilinux'].contains(os_type)
|
||||
else
|
||||
pam_conf = {
|
||||
'PAM_FILE_INCLUDE_AUTH': 'system-auth',
|
||||
diff --git a/meson_options.txt b/meson_options.txt
|
||||
index 25e3e77..35cb829 100644
|
||||
--- a/meson_options.txt
|
||||
+++ b/meson_options.txt
|
||||
@@ -4,7 +4,7 @@ option('systemdsystemunitdir', type: 'string', value: '', description: 'custom d
|
||||
option('polkitd_user', type: 'string', value: 'polkitd', description: 'User for running polkitd (polkitd)')
|
||||
|
||||
option('authfw', type: 'combo', choices: ['pam', 'shadow', 'bsdauth'], value: 'pam', description: 'Authentication framework (pam/shadow)')
|
||||
-option('os_type', type: 'combo', choices: ['redhat', 'suse', 'gentoo', 'pardus', 'solaris', 'netbsd', ''], value: '', description: 'distribution or OS')
|
||||
+option('os_type', type: 'combo', choices: ['redhat', 'suse', 'gentoo', 'pisilinux', 'solaris', 'netbsd', ''], value: '', description: 'distribution or OS')
|
||||
|
||||
option('pam_include', type: 'string', value: '', description: 'pam file to include')
|
||||
option('pam_module_dir', type: 'string', value: '', description: 'directory to install PAM security module')
|
||||
--
|
||||
2.24.3 (Apple Git-128)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
From dc3f89a7840c0ffab00d335f127b7d6ab67398d9 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Berk=20=C3=87akar?= <berk2238@hotmail.com>
|
||||
From: Berk Cakar <berk2238@hotmail.com>
|
||||
Date: Wed, 12 May 2021 23:02:55 +0300
|
||||
Subject: [PATCH] Updated build args for Pisi Linux
|
||||
|
||||
@@ -14,12 +14,12 @@ index 4ac2219..722824d 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -396,14 +396,14 @@ fi
|
||||
|
||||
|
||||
AC_SUBST(PAM_MODULE_DIR)
|
||||
|
||||
|
||||
-AC_ARG_WITH(os-type, [ --with-os-type=<os> distribution or OS (redhat/suse/gentoo/pardus/solaris/netbsd)])
|
||||
+AC_ARG_WITH(os-type, [ --with-os-type=<os> distribution or OS (redhat/suse/gentoo/pisilinux/solaris/netbsd)])
|
||||
|
||||
|
||||
#### Check our operating system (distro-tweaks required)
|
||||
if test "z$with_os_type" = "z"; then
|
||||
AC_CHECK_FILE(/etc/redhat-release,distro_type="redhat")
|
||||
@@ -49,7 +49,7 @@ index 4ac2219..722824d 100644
|
||||
+AM_CONDITIONAL(OS_TYPE_PISI_LINUX, test x$with_os_type = xpisilinux, [Running on Pisi GNU/Linux OS'es])
|
||||
AM_CONDITIONAL(OS_TYPE_SOLARIS, test x$with_os_type = xsolaris, [Running os Solaris OS'es])
|
||||
AM_CONDITIONAL(OS_TYPE_FREEBSD, test x$with_os_type = xfreebsd, [Running on FreeBSD OS'es])
|
||||
|
||||
|
||||
@@ -456,7 +456,7 @@ if ! test -z "$with_pam_include"; then
|
||||
PAM_FILE_INCLUDE_ACCOUNT=$with_pam_include
|
||||
PAM_FILE_INCLUDE_PASSWORD=$with_pam_include
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# Begin /etc/pam.d/polkit-1
|
||||
|
||||
auth include system-auth
|
||||
account include system-account
|
||||
password include system-password
|
||||
session include system-session
|
||||
|
||||
# End /etc/pam.d/polkit-1
|
||||
@@ -16,15 +16,15 @@
|
||||
<Description>polkit is a toolkit for defining and handling authorizations. It is used for allowing unprivileged processes to speak to privileged processes.</Description>
|
||||
<Archive sha1sum="1c53d0ccacc6e6afd49ba14cb39d2514b943933d" type="targz">http://www.freedesktop.org/software/polkit/releases/polkit-0.118.tar.gz</Archive>
|
||||
<BuildDependencies>
|
||||
<Dependency>python3</Dependency>
|
||||
<Dependency>python3</Dependency>
|
||||
<Dependency>dbus-devel</Dependency>
|
||||
<Dependency versionFrom="1.5.1">pam-devel</Dependency>
|
||||
<Dependency>glib2-devel</Dependency>
|
||||
<Dependency>expat-devel</Dependency>
|
||||
<Dependency>duktape-devel</Dependency>
|
||||
<Dependency>gettext-devel</Dependency>
|
||||
<!-- <Dependency>elogind-devel</Dependency> -->
|
||||
<!-- <Dependency versionFrom="68.12.0">spidermonkey-devel</Dependency> -->
|
||||
<Dependency>elogind-devel</Dependency>
|
||||
<!--Dependency versionFrom="68.12.0">spidermonkey-devel</Dependency-->
|
||||
<Dependency>gobject-introspection-devel</Dependency>
|
||||
<Dependency>intltool</Dependency>
|
||||
</BuildDependencies>
|
||||
@@ -83,7 +83,7 @@
|
||||
<AdditionalFile owner="root" permission="0644" target="/usr/share/man/man1/pkaction.1">man/pkaction.1</AdditionalFile>
|
||||
<AdditionalFile owner="root" permission="0644" target="/usr/share/man/man1/pkcheck.1">man/pkcheck.1</AdditionalFile>
|
||||
<AdditionalFile owner="root" permission="0644" target="/usr/share/man/man1/pkexec.1">man/pkexec.1</AdditionalFile>
|
||||
|
||||
<AdditionalFile owner="root" permission="0644" target="/etc/pam.d/polkit-1">polkit-1</AdditionalFile>
|
||||
<AdditionalFile owner="root" permission="0644" target="/etc/polkit-1/rules.d/70-desktop-policy.conf">70-desktop-policy.conf</AdditionalFile>
|
||||
<!-- Example policy files from fedora
|
||||
<AdditionalFile owner="root" permission="0644" target="/var/lib/polkit-1/localauthority/10-vendor.d/10-desktop-policy.pkla">10-desktop-policy.pkla</AdditionalFile>
|
||||
|
||||
@@ -10,37 +10,62 @@ from pisi.actionsapi import pisitools
|
||||
from pisi.actionsapi import get
|
||||
|
||||
def setup():
|
||||
autotools.configure("--enable-shadowgrp \
|
||||
--without-selinux \
|
||||
--without-audit \
|
||||
--without-libcrack \
|
||||
--with-libpam \
|
||||
--with-sha-crypt \
|
||||
--enable-nls \
|
||||
--with-group-name-max-length=32 \
|
||||
--disable-shared")
|
||||
def build():
|
||||
# Rebuild gmo catalogs
|
||||
autotools.make("-C po update-gmo")
|
||||
shelltools.system("sed -i 's/groups$(EXEEXT) //' src/Makefile.in && \
|
||||
find man -name Makefile.in -exec sed -i 's/groups\.1 / /' {} \; && \
|
||||
find man -name Makefile.in -exec sed -i 's/getspnam\.3 / /' {} \; && \
|
||||
find man -name Makefile.in -exec sed -i 's/passwd\.5 / /' {} \; && \
|
||||
sed -e 's@#ENCRYPT_METHOD DES@ENCRYPT_METHOD SHA512@' \
|
||||
-e 's@/var/spool/mail@/var/mail@' \
|
||||
-e '/PATH=/{s@/sbin:@@;s@/bin:@@}' \
|
||||
-i etc/login.defs && \
|
||||
sed -i 's/1000/999/' etc/useradd")
|
||||
|
||||
shelltools.system("./pisi-shadowbase.sh")
|
||||
|
||||
autotools.configure("--sysconfdir=/etc \
|
||||
--with-group-name-max-length=32 \
|
||||
--with-audit \
|
||||
--with-libcrack \
|
||||
--with-acl")
|
||||
|
||||
def build():
|
||||
autotools.make()
|
||||
|
||||
def install():
|
||||
autotools.rawInstall("DESTDIR=%s" % get.installDIR())
|
||||
|
||||
shelltools.system("sed -i 's/yes/no/' " + get.installDIR() + "/etc/default/useradd")
|
||||
shelltools.system("install -v -m644 " + get.installDIR() + "/etc/login.defs{,.orig}")
|
||||
|
||||
for f in ["login", "passwd", "su", "chage", "system-login"]:
|
||||
shelltools.system("chmod 755 " + f)
|
||||
pisitools.insinto("/etc/pam.d/", "%s" % f)
|
||||
|
||||
for f in ["FAIL_DELAY", "FAILLOG_ENAB", "LASTLOG_ENAB", "MAIL_CHECK_ENAB", "OBSCURE_CHECKS_ENAB",
|
||||
"PORTTIME_CHECKS_ENAB", "QUOTAS_ENAB", "CONSOLE MOTD_FILE", "FTMP_FILE NOLOGINS_FILE",
|
||||
"ENV_HZ PASS_MIN_LEN", "SU_WHEEL_ONLY", "CRACKLIB_DICTPATH", "PASS_CHANGE_TRIES",
|
||||
"PASS_ALWAYS_WARN", "CHFN_AUTH ENCRYPT_METHOD", "ENVIRON_FILE"]:
|
||||
shelltools.system('sed -i "s/^' + f + '/# &/" ' + get.installDIR() + "/etc/login.defs")
|
||||
|
||||
### Pisi Linux specific preferences
|
||||
shelltools.system("sed -i 's;PATH=/usr/sbin:/usr/bin;PATH=/sbin:/bin:/usr/sbin:/usr/bin;g' " + get.installDIR() + "/etc/login.defs")
|
||||
shelltools.system("sed -i 's;PATH=/usr/bin;PATH=/sbin:/bin:/usr/sbin:/usr/bin;g' " + get.installDIR() + "/etc/login.defs")
|
||||
shelltools.system("sed -i 's;/var/mail;/var/spool/mail;g' " + get.installDIR() + "/etc/login.defs")
|
||||
shelltools.system("sed -i 's;#CREATE_HOME;CREATE_HOME;g' " + get.installDIR() + "/etc/login.defs")
|
||||
###
|
||||
|
||||
for f in ["chfn", "chgpasswd", "chpasswd", "chsh" "groupadd", "groupdel",
|
||||
"groupmems", "groupmod", "newusers", "useradd", "userdel", "usermod"]:
|
||||
shelltools.system("install -v -m644 " + get.installDIR() + "/etc/pam.d/chage " + get.installDIR() + "/etc/pam.d/" + f)
|
||||
shelltools.system('sed -i "s/chage/' + f + '/" ' + get.installDIR() + "/etc/pam.d/" + f)
|
||||
|
||||
pisitools.insinto("/etc/", "etc/login.access")
|
||||
shelltools.chmod("%s/etc/login.access" % get.installDIR(), 0600)
|
||||
|
||||
pisitools.insinto("/etc/", "etc/limits")
|
||||
shelltools.chmod("%s/etc/limits" % get.installDIR(), 0644)
|
||||
|
||||
# groups come from coreutils package
|
||||
pisitools.remove("/usr/share/man/man1/groups.1")
|
||||
pisitools.remove("/bin/groups")
|
||||
|
||||
# Conflicts with man-pages
|
||||
pisitools.remove("/usr/share/man/man3/getspnam.3")
|
||||
pisitools.remove("/usr/share/man/man5/passwd.5")
|
||||
shelltools.system("[ -f " + get.installDIR() + "/etc/login.access ]" + " && mv -v " + get.installDIR() + "/etc/login.access{,.NOUSE}")
|
||||
shelltools.system("[ -f " + get.installDIR() + "/etc/limits ]" + " && mv -v " + get.installDIR() + "/etc/limits{,.NOUSE}")
|
||||
|
||||
pisitools.dodoc("ChangeLog","README","NEWS")
|
||||
|
||||
|
||||
Executable
+150
@@ -0,0 +1,150 @@
|
||||
#!/bin/bash
|
||||
|
||||
cat > login << "EOF"
|
||||
# Begin /etc/pam.d/login
|
||||
|
||||
# Set failure delay before next prompt to 3 seconds
|
||||
auth optional pam_faildelay.so delay=3000000
|
||||
|
||||
# Check to make sure that the user is allowed to login
|
||||
auth requisite pam_nologin.so
|
||||
|
||||
# Check to make sure that root is allowed to login
|
||||
# Disabled by default. You will need to create /etc/securetty
|
||||
# file for this module to function. See man 5 securetty.
|
||||
#auth required pam_securetty.so
|
||||
|
||||
# Additional group memberships - disabled by default
|
||||
#auth optional pam_group.so
|
||||
|
||||
# include system auth settings
|
||||
auth include system-auth
|
||||
|
||||
# check access for the user
|
||||
account required pam_access.so
|
||||
|
||||
# include system account settings
|
||||
account include system-account
|
||||
|
||||
# Set default environment variables for the user
|
||||
session required pam_env.so
|
||||
|
||||
# Set resource limits for the user
|
||||
session required pam_limits.so
|
||||
|
||||
# Display date of last login - Disabled by default
|
||||
#session optional pam_lastlog.so
|
||||
|
||||
# Display the message of the day - Disabled by default
|
||||
#session optional pam_motd.so
|
||||
|
||||
# Check user's mail - Disabled by default
|
||||
#session optional pam_mail.so standard quiet
|
||||
|
||||
# include system session and password settings
|
||||
session include system-session
|
||||
password include system-password
|
||||
|
||||
# End /etc/pam.d/login
|
||||
EOF
|
||||
|
||||
cat > passwd << "EOF"
|
||||
# Begin /etc/pam.d/passwd
|
||||
|
||||
password include system-password
|
||||
|
||||
# End /etc/pam.d/passwd
|
||||
EOF
|
||||
|
||||
cat > su << "EOF"
|
||||
# Begin /etc/pam.d/su
|
||||
|
||||
# always allow root
|
||||
auth sufficient pam_rootok.so
|
||||
|
||||
# Allow users in the wheel group to execute su without a password
|
||||
# disabled by default
|
||||
#auth sufficient pam_wheel.so trust use_uid
|
||||
|
||||
# include system auth settings
|
||||
auth include system-auth
|
||||
|
||||
# limit su to users in the wheel group
|
||||
auth required pam_wheel.so use_uid
|
||||
|
||||
# include system account settings
|
||||
account include system-account
|
||||
|
||||
# Set default environment variables for the service user
|
||||
session required pam_env.so
|
||||
|
||||
# include system session settings
|
||||
session include system-session
|
||||
|
||||
# End /etc/pam.d/su
|
||||
EOF
|
||||
|
||||
cat > chage << "EOF"
|
||||
# Begin /etc/pam.d/chage
|
||||
|
||||
# always allow root
|
||||
auth sufficient pam_rootok.so
|
||||
|
||||
# include system auth, account, and session settings
|
||||
auth include system-auth
|
||||
account include system-account
|
||||
session include system-session
|
||||
|
||||
# Always permit for authentication updates
|
||||
password required pam_permit.so
|
||||
|
||||
# End /etc/pam.d/chage
|
||||
EOF
|
||||
|
||||
cat > system-login << "EOF"
|
||||
# Begin /etc/pam.d/system-login
|
||||
|
||||
# Set failure delay before next prompt to 3 seconds
|
||||
auth optional pam_faildelay.so delay=3000000
|
||||
|
||||
# Check to make sure that the user is allowed to login
|
||||
auth requisite pam_nologin.so
|
||||
|
||||
# Check to make sure that root is allowed to login
|
||||
# Disabled by default. You will need to create /etc/securetty
|
||||
# file for this module to function. See man 5 securetty.
|
||||
#auth required pam_securetty.so
|
||||
|
||||
# Additional group memberships - disabled by default
|
||||
#auth optional pam_group.so
|
||||
|
||||
# include the default auth settings
|
||||
auth include system-auth
|
||||
|
||||
# check access for the user
|
||||
account required pam_access.so
|
||||
|
||||
# include the default account settings
|
||||
account include system-account
|
||||
|
||||
# Set default environment variables for the user
|
||||
session required pam_env.so
|
||||
|
||||
# Set resource limits for the user
|
||||
session required pam_limits.so
|
||||
|
||||
# Display date of last login - Disabled by default
|
||||
#session optional pam_lastlog.so
|
||||
|
||||
# Display the message of the day - Disabled by default
|
||||
#session optional pam_motd.so
|
||||
|
||||
# Check user's mail - Disabled by default
|
||||
#session optional pam_mail.so standard quiet
|
||||
|
||||
# include the default session and password settings
|
||||
session include system-session
|
||||
password include system-password
|
||||
|
||||
# End /etc/pam.d/system-login
|
||||
EOF
|
||||
@@ -13,27 +13,29 @@
|
||||
<Summary>Utilities to deal with user accounts</Summary>
|
||||
<Description>The Shadow password file utilities package includes programs necessary to convert traditional V7 *NIX password files to the SVR4 shadow password format, and additional tools to maintain password and group files (that work with both shadow and non-shadow passwords).</Description>
|
||||
<Archive sha1sum="63457a0ba58dc4e81b2663b839dc6c89d3343f12" type="tarxz">https://github.com/shadow-maint/shadow/releases/download/4.8.1/shadow-4.8.1.tar.xz</Archive>
|
||||
<AdditionalFiles>
|
||||
<AdditionalFile target="pisi-shadowbase.sh" permission="0755">pisi-shadowbase.sh</AdditionalFile>
|
||||
</AdditionalFiles>
|
||||
<BuildDependencies>
|
||||
<Dependency>pam-devel</Dependency>
|
||||
<Dependency>gettext-devel</Dependency>
|
||||
<Dependency>cracklib-devel</Dependency>
|
||||
<Dependency>acl-devel</Dependency>
|
||||
<Dependency>audit-devel</Dependency>
|
||||
<Dependency>attr-devel</Dependency>
|
||||
<!--<Dependency>skey-devel</Dependency>-->
|
||||
</BuildDependencies>
|
||||
<Patches>
|
||||
<!--Patches>
|
||||
<Patch level="1">fedora/shadow-4.8-crypt_h.patch</Patch>
|
||||
<Patch level="1">fedora/shadow-4.8-goodname.patch</Patch>
|
||||
<Patch level="1">fedora/shadow-4.8-ignore-login-prompt.patch</Patch>
|
||||
<Patch level="1">fedora/shadow-4.8-long-entry.patch</Patch>
|
||||
<!-- <Patch level="1">fedora/shadow-4.8.1-audit-update.patch</Patch> -->
|
||||
<!-- <Patch level="1">fedora/shadow-4.8.1-check-local-groups.patch</Patch> -->
|
||||
<Patch level="1">fedora/shadow-4.8.1-audit-update.patch</Patch>
|
||||
<Patch level="1">fedora/shadow-4.8.1-check-local-groups.patch</Patch>
|
||||
<Patch level="1">fedora/shadow-4.8.1-commonio-force-lock-file-sync.patch</Patch>
|
||||
<Patch level="1">fedora/shadow-4.8.1-manfix.patch</Patch>
|
||||
<Patch level="1">fedora/shadow-4.8.1-useradd-man-clarification.patch</Patch>
|
||||
|
||||
<Patch level="1">shadow-strncpy-usage.patch</Patch>
|
||||
<Patch level="1">xstrdup.patch</Patch>
|
||||
</Patches>
|
||||
<Patch level="1">shadow-strncpy-usage.patch</Patch>
|
||||
<Patch level="1">xstrdup.patch</Patch>
|
||||
</Patches-->
|
||||
</Source>
|
||||
|
||||
<Package>
|
||||
@@ -42,6 +44,7 @@
|
||||
<Dependency>acl</Dependency>
|
||||
<Dependency>attr</Dependency>
|
||||
<Dependency>pam</Dependency>
|
||||
<Dependency>audit</Dependency>
|
||||
</RuntimeDependencies>
|
||||
<Files>
|
||||
<Path fileType="executable">/bin</Path>
|
||||
@@ -55,7 +58,7 @@
|
||||
<Path fileType="info">/usr/share/info</Path>
|
||||
<Path fileType="localedata">/usr/share/locale</Path>
|
||||
</Files>
|
||||
<AdditionalFiles>
|
||||
<!--AdditionalFiles>
|
||||
<AdditionalFile owner="root" permission="0600" target="/etc/securetty">securetty</AdditionalFile>
|
||||
<AdditionalFile owner="root" permission="0600" target="/etc/default/useradd">default/useradd</AdditionalFile>
|
||||
<AdditionalFile owner="root" permission="0644" target="/etc/pam.d/login">pam.d/login</AdditionalFile>
|
||||
@@ -76,10 +79,17 @@
|
||||
<AdditionalFile owner="root" permission="0644" target="/etc/pam.d/su">pam.d/su</AdditionalFile>
|
||||
<AdditionalFile owner="root" permission="0644" target="/etc/pam.d/system-auth">pam.d/system-auth</AdditionalFile>
|
||||
<AdditionalFile owner="root" permission="0644" target="/etc/login.defs">login.defs</AdditionalFile>
|
||||
</AdditionalFiles>
|
||||
</AdditionalFiles-->
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="11">
|
||||
<Date>2021-06-03</Date>
|
||||
<Version>4.8.1</Version>
|
||||
<Comment>Shadow rebuild.</Comment>
|
||||
<Name>Berk Çakar</Name>
|
||||
<Email>berk2238@hotmail.com</Email>
|
||||
</Update>
|
||||
<Update release="10">
|
||||
<Date>2021-02-18</Date>
|
||||
<Version>4.8.1</Version>
|
||||
|
||||
Reference in New Issue
Block a user