create core package

This commit is contained in:
aydemir
2015-02-24 11:18:35 +02:00
parent 0e4b743b82
commit 70b25d0f95
1098 changed files with 169545 additions and 0 deletions
+46
View File
@@ -0,0 +1,46 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/licenses/gpl.txt
from pisi.actionsapi import shelltools
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import get
def setup():
autotools.configure("--enable-shadowgrp \
--without-selinux \
--with-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")
autotools.make()
def install():
autotools.rawInstall("DESTDIR=%s" % get.installDIR())
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")
pisitools.dodoc("ChangeLog","README","NEWS")
+7
View File
@@ -0,0 +1,7 @@
# useradd defaults file
GROUP=100
HOME=/home
INACTIVE=-1
EXPIRE=
SHELL=/bin/bash
SKEL=/etc/skel
+170
View File
@@ -0,0 +1,170 @@
# *REQUIRED*
# Directory where mailboxes reside, _or_ name of file, relative to the
# home directory. If you _do_ define both, MAIL_DIR takes precedence.
# QMAIL_DIR is for Qmail
#
#QMAIL_DIR Maildir
MAIL_DIR /var/spool/mail
#MAIL_FILE .mail
#
# *REQUIRED* The default PATH settings, for superuser and normal users.
#
# (they are minimal, add the rest in the shell startup files)
ENV_SUPATH PATH=/sbin:/bin:/usr/sbin:/usr/bin
ENV_PATH PATH=/bin:/usr/bin
# Password aging controls:
#
# PASS_MAX_DAYS Maximum number of days a password may be used.
# PASS_MIN_DAYS Minimum number of days allowed between password changes.
# PASS_MIN_LEN Minimum acceptable password length.
# PASS_WARN_AGE Number of days warning given before a password expires.
#
PASS_MAX_DAYS 99999
PASS_MIN_DAYS 0
#PASS_MIN_LEN 5
PASS_WARN_AGE 7
#
# Min/max values for automatic uid selection in useradd
#
UID_MIN 1000
UID_MAX 60000
#
# Min/max values for automatic gid selection in groupadd
#
GID_MIN 1000
GID_MAX 60000
#
# If defined, this command is run when removing a user.
# It should remove any at/cron/print jobs etc. owned by
# the user to be removed (passed as the first argument).
#
#USERDEL_CMD /usr/sbin/userdel_local
#
# If useradd should create home directories for users by default
# On RH systems, we do. This option is overridden with the -m flag on
# useradd command line.
#
CREATE_HOME yes
# The permission mask is initialized to this value. If not specified,
# the permission mask will be initialized to 022.
UMASK 077
# This enables userdel to remove user groups if no members exist.
#
USERGROUPS_ENAB yes
# Use MD5 or DES to encrypt password? Red Hat use MD5 by default, not anymore
MD5_CRYPT_ENAB yes
# Use SHA512 to encrypt password.
#ENCRYPT_METHOD SHA512
#
# Delay in seconds before being allowed another attempt after a login failure
#
#FAIL_DELAY 3
#
# Enable display of unknown usernames when login failures are recorded.
#
#LOG_UNKFAIL_ENAB no
#
# Enable logging of successful logins
#
#LOG_OK_LOGINS no
#
# Enable "syslog" logging of su activity - in addition to sulog file logging.
# SYSLOG_SG_ENAB does the same for newgrp and sg.
#
#SYSLOG_SU_ENAB yes
#SYSLOG_SG_ENAB yes
#
# If defined, either full pathname of a file containing device names or
# a ":" delimited list of device names. Root logins will be allowed only
# upon these devices.
#
#CONSOLE /etc/securetty
#CONSOLE console:tty01:tty02:tty03:tty04
#
# If compiled with cracklib support, where are the dictionaries
#
#CRACKLIB_DICTPATH /usr/share/cracklib
#
# If defined, the command name to display when running "su -". For
# example, if this is defined as "su" then a "ps" will display the
# command is "-su". If not defined, then "ps" would display the
# name of the shell actually being run, e.g. something like "-sh".
#
#SU_NAME su
#
# If defined, file which inhibits all the usual chatter during the login
# sequence. If a full pathname, then hushed mode will be enabled if the
# user's name or shell are found in the file. If not a full pathname, then
# hushed mode will be enabled if the file exists in the user's home directory.
#
#HUSHLOGIN_FILE .hushlogin
#HUSHLOGIN_FILE /etc/hushlogins
#
# Login configuration initializations:
#
# ERASECHAR Terminal ERASE character ('\010' = backspace).
# KILLCHAR Terminal KILL character ('\025' = CTRL/U).
# UMASK Default "umask" value.
#
# The ERASECHAR and KILLCHAR are used only on System V machines.
# The ULIMIT is used only if the system supports it.
# (now it works with setrlimit too; ulimit is in 512-byte units)
#
# Prefix these values with "0" to get octal, "0x" to get hexadecimal.
#
#ERASECHAR 0177
#KILLCHAR 025
#UMASK 022
#
# Max number of login retries if password is bad
#
#LOGIN_RETRIES 3
#
# Max time in seconds for login
#
#LOGIN_TIMEOUT 60
#
# When prompting for password without echo, getpass() can optionally
# display a random number (in the range 1 to GETPASS_ASTERISKS) of '*'
# characters for each character typed. This feature is designed to
# confuse people looking over your shoulder when you enter a password :-).
# Also, the new getpass() accepts both Backspace (8) and Delete (127)
# keys to delete previous character (to cope with different terminal
# types), Control-U to delete all characters, and beeps when there are
# no more characters to delete, or too many characters entered.
#
# Setting GETPASS_ASTERISKS to 1 results in more traditional behaviour -
# exactly one '*' displayed for each character typed.
#
# Setting GETPASS_ASTERISKS to 0 disables the '*' characters (Backspace,
# Delete, Control-U and beep continue to work as described above).
#
# Setting GETPASS_ASTERISKS to -1 reverts to the traditional getpass()
# without any new features. This is the default.
#
#GETPASS_ASTERISKS 0
+12
View File
@@ -0,0 +1,12 @@
#%PAM-1.0
auth required pam_securetty.so
auth include system-auth
auth required pam_nologin.so
account include system-auth
password include system-auth
session include system-auth
session optional pam_console.so
+9
View File
@@ -0,0 +1,9 @@
#%PAM-1.0
auth required pam_deny.so
account required pam_deny.so
password required pam_deny.so
session required pam_deny.so
+8
View File
@@ -0,0 +1,8 @@
#%PAM-1.0
auth sufficient pam_rootok.so
auth include system-auth
account include system-auth
password include system-auth
+8
View File
@@ -0,0 +1,8 @@
#%PAM-1.0
auth sufficient pam_rootok.so
auth required pam_permit.so
account include system-auth
password required pam_permit.so
+32
View File
@@ -0,0 +1,32 @@
#%PAM-1.0
auth sufficient pam_rootok.so
# If you want to restrict users begin allowed to su even more,
# create /etc/security/suauth.allow (or to that matter) that is only
# writable by root, and add users that are allowed to su to that
# file, one per line.
#auth required pam_listfile.so item=ruser sense=allow onerr=fail file=/etc/security/suauth.allow
# Uncomment this to allow users in the wheel group to su without
# entering a passwd.
#auth sufficient pam_wheel.so use_uid trust
# Alternatively to above, you can implement a list of users that do
# not need to supply a passwd with a list.
#auth sufficient pam_listfile.so item=ruser sense=allow onerr=fail file=/etc/security/suauth.nopass
# Comment this to allow any user, even those not in the 'wheel'
# group to su
auth required pam_wheel.so use_uid
auth include system-auth
account include system-auth
password include system-auth
session include system-auth
session required pam_env.so
session optional pam_xauth.so
@@ -0,0 +1,14 @@
#%PAM-1.0
auth required pam_env.so
auth sufficient pam_unix.so likeauth nullok nodelay
auth required pam_deny.so
account required pam_unix.so
password required pam_cracklib.so retry=3
password sufficient pam_unix.so nullok md5 shadow use_authtok
password required pam_deny.so
session required pam_limits.so
session required pam_unix.so
+29
View File
@@ -0,0 +1,29 @@
# /etc/securetty: list of terminals on which root is allowed to login.
# See securetty(5) and login(1).
vc/1
vc/2
vc/3
vc/4
vc/5
vc/6
vc/7
vc/8
vc/9
vc/10
vc/11
vc/12
tty1
tty2
tty3
tty4
tty5
tty6
tty7
tty8
tty9
tty10
tty11
tty12
tts/0
ttyS0
@@ -0,0 +1,25 @@
diff -u shadow-4.1.5/src/usermod.c.orig shadow-4.1.5/src/usermod.c
--- shadow-4.1.5/src/usermod.c.orig 2012-02-13 08:19:43.792146449 -0500
+++ shadow-4.1.5/src/usermod.c 2012-02-13 08:21:19.375114500 -0500
@@ -182,7 +182,7 @@
struct tm *tp;
if (date < 0) {
- strncpy (buf, "never", maxsize);
+ strncpy (buf, "never", maxsize - 1);
} else {
time_t t = (time_t) date;
tp = gmtime (&t);
diff -u shadow-4.1.5/src/login.c.orig shadow-4.1.5/src/login.c
--- shadow-4.1.5/src/login.c.orig 2012-02-13 08:19:50.951994454 -0500
+++ shadow-4.1.5/src/login.c 2012-02-13 08:21:04.490430937 -0500
@@ -752,7 +752,8 @@
_("%s login: "), hostn);
} else {
strncpy (loginprompt, _("login: "),
- sizeof (loginprompt));
+ sizeof (loginprompt) - 1);
+ loginprompt[sizeof (loginprompt) - 1] = '\0';
}
retcode = pam_set_item (pamh, PAM_USER_PROMPT, loginprompt);
+9
View File
@@ -0,0 +1,9 @@
--- shadow-4.1.2.1/libmisc/xmalloc.c 2008-08-30 21:55:44.000000000 -0500
+++ shadow-4.1.2.1/libmisc/xmalloc.c.new 2008-08-30 21:55:36.000000000 -0500
@@ -61,5 +61,6 @@
char *xstrdup (const char *str)
{
+ if(str == NULL) return NULL;
return strcpy (xmalloc (strlen (str) + 1), str);
}
+116
View File
@@ -0,0 +1,116 @@
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
<Source>
<Name>shadow</Name>
<Homepage>http://pkg-shadow.alioth.debian.org/</Homepage>
<Packager>
<Name>PisiLinux Community</Name>
<Email>admins@pisilinux.org</Email>
</Packager>
<License>BSD</License>
<IsA>app:console</IsA>
<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="0917cbadd4ce0c7c36670e5ecd37bbed92e6d82d" type="tarxz">http://pkg-shadow.alioth.debian.org/releases/shadow-4.2.1.tar.xz</Archive>
<BuildDependencies>
<Dependency>pam-devel</Dependency>
<Dependency>audit-devel</Dependency>
<Dependency>gettext-devel</Dependency>
<Dependency>skey-devel</Dependency>
</BuildDependencies>
<Patches>
<Patch level="1">shadow-strncpy-usage.patch</Patch>
<Patch level="1">xstrdup.patch</Patch>
</Patches>
</Source>
<Package>
<Name>shadow</Name>
<RuntimeDependencies>
<Dependency>acl</Dependency>
<Dependency>attr</Dependency>
<Dependency>pam</Dependency>
<Dependency>audit</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="executable">/bin</Path>
<Path fileType="executable">/usr/bin</Path>
<Path fileType="executable">/sbin</Path>
<Path fileType="executable">/usr/sbin</Path>
<Path fileType="config">/etc</Path>
<Path fileType="library">/lib</Path>
<Path fileType="man">/usr/share/man</Path>
<Path fileType="doc">/usr/share/doc</Path>
<Path fileType="info">/usr/share/info</Path>
<Path fileType="localedata">/usr/share/locale</Path>
</Files>
<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>
<AdditionalFile owner="root" permission="0644" target="/etc/pam.d/other">pam.d/other</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/etc/pam.d/passwd">pam.d/passwd</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/etc/pam.d/shadow">pam.d/shadow</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/etc/pam.d/chage">pam.d/shadow</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/etc/pam.d/chsh">pam.d/shadow</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/etc/pam.d/chfn">pam.d/shadow</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/etc/pam.d/chpasswd">pam.d/shadow</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/etc/pam.d/newusers">pam.d/shadow</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/etc/pam.d/useradd">pam.d/shadow</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/etc/pam.d/userdel">pam.d/shadow</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/etc/pam.d/usermod">pam.d/shadow</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/etc/pam.d/groupadd">pam.d/shadow</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/etc/pam.d/groupdel">pam.d/shadow</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/etc/pam.d/groupmod">pam.d/shadow</AdditionalFile>
<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>
</Package>
<History>
<Update release="6">
<Date>2014-12-13</Date>
<Version>4.2.1</Version>
<Comment>Version bump.</Comment>
<Name>Yusuf Aydemir</Name>
<Email>yusuf.aydemir@pisilinux.org</Email>
</Update>
<Update release="5">
<Date>2014-05-11</Date>
<Version>4.1.5.1</Version>
<Comment>Release bump.</Comment>
<Name>Marcin Bojara</Name>
<Email>marcin@pisilinux.org</Email>
</Update>
<Update release="4">
<Date>2013-10-29</Date>
<Version>4.1.5.1</Version>
<Comment>Rebuild without-libcrack, clean shadow, fix login defs.</Comment>
<Name>Serdar Soytetir</Name>
<Email>kaptan@pisilinux.org</Email>
</Update>
<Update release="3">
<Date>2013-08-30</Date>
<Version>4.1.5.1</Version>
<Comment>Rebuild with-libcrack, clean shadow.</Comment>
<Name>Serdar Soytetir</Name>
<Email>kaptan@pisilinux.org</Email>
</Update>
<Update release="2">
<Date>2013-07-26</Date>
<Version>4.1.5.1</Version>
<Comment>Release bump for rebuild.</Comment>
<Name>Serdar Soytetir</Name>
<Email>kaptan@pisilinux.org</Email>
</Update>
<Update release="1">
<Date>2012-08-23</Date>
<Version>4.1.5.1</Version>
<Comment>First release</Comment>
<Name>PisiLinux Community</Name>
<Email>admins@pisilinux.org</Email>
</Update>
</History>
</PISI>
+15
View File
@@ -0,0 +1,15 @@
<?xml version="1.0" ?>
<PISI>
<Source>
<Name>shadow</Name>
<Description xml:lang="tr">Shadow parola dosyası yardımcı uygulamalar paketi, geleneksel V7 *nix parola dosyalarını SVR4 shadow parola biçimine dönüştüren programlar ile parola ve grup dosyalarının bakımı için ilave araçlar içerir.</Description>
<Description xml:lang="fr">Le paquet des utilitaires pour le fichier de mot de passe Shadow regroupe les programmes nécessaires à convertir les fichiers de mots de passe traditionnels V7*NIX au format de mot passe shadow SVR4 ainsi que d'autres outils destinés à la gestion des fichiers des groupes et de mots de passe (qui fonctionnent aussi bien pour les mots de passe shadow que non-shadow).</Description>
<Summary xml:lang="tr">Kullanıcı hesapları yönetimi için araçlar</Summary>
</Source>
<Package>
<Name>shadow</Name>
<Summary xml:lang="tr">Kullanıcı hesaplarını düzenlemek için araçlar.</Summary>
<Summary xml:lang="fr">Utilitaires pour gérer les comptes utilisateurs</Summary>
</Package>
</PISI>