automatic version update by autodist [release 2.9.0-1mamba;Sat Jun 08 2013]

This commit is contained in:
Automatic Build System 2024-01-05 21:33:06 +01:00
parent 3e8f734da8
commit dbc7bd0f86
3 changed files with 387 additions and 0 deletions

View File

@ -1,2 +1,16 @@
# cracklib # cracklib
CrackLib tests passwords to determine whether they match certain security-oriented characteristics.
You can use CrackLib to stop users from choosing passwords which would be easy to guess.
CrackLib performs certain tests:
* It tries to generate words from a username and gecos entry and checks those words against the password;
* It checks for simplistic patterns in passwords;
* It checks for the password in a dictionary.
CrackLib is actually a library containing a particular C function which is used to check the password, as well as other C functions.
CrackLib is not a replacement for a passwd program; it must be used in conjunction with an existing passwd program.
Install the cracklib package if you need a program to check users' passwords to see if they are at least minimally secure.
If you install CrackLib, you'll also want to install the cracklib-dicts package.

175
cracklib-2.7-redhat.patch Normal file
View File

@ -0,0 +1,175 @@
--- cracklib,2.7/cracklib/fascist.c.rh Wed Dec 31 05:26:46 1997
+++ cracklib,2.7/cracklib/fascist.c Tue Mar 10 18:17:43 1998
@@ -11,6 +11,7 @@
#include "packer.h"
#include <sys/types.h>
#include <pwd.h>
+#include <string.h>
#define ISSKIP(x) (isspace(x) || ispunct(x))
@@ -659,7 +660,7 @@
return ("it does not contain enough DIFFERENT characters");
}
- strcpy(password, Lowercase(password));
+ strcpy(password, (char *)Lowercase(password));
Trim(password);
@@ -722,7 +723,7 @@
}
}
- strcpy(password, Reverse(password));
+ strcpy(password, (char *)Reverse(password));
for (i = 0; r_destructors[i]; i++)
{
--- cracklib,2.7/cracklib/Makefile.rh Sun Dec 14 17:49:21 1997
+++ cracklib,2.7/cracklib/Makefile Tue Mar 10 18:54:11 1998
@@ -6,13 +6,21 @@
# and upwards.
###
-LIB= libcrack.a
-OBJ= fascist.o packlib.o rules.o stringlib.o
-CFLAGS= -O -I../cracklib -DIN_CRACKLIB
+LIB = libcrack.so
+OBJ = fascist.o packlib.o rules.o stringlib.o
+CFLAGS = $(RPM_OPT_FLAGS) -g -I../cracklib -DIN_CRACKLIB -fPIC
+LD = ld
-$(LIB): $(OBJ)
- ar rv $(LIB) $?
- -ranlib $(LIB)
+$(LIB): $(OBJ) Makefile
+ $(LD) -shared -soname $(LIB).$(MAJOR) -o $(LIB).$(VERSION) $(OBJ) -lc
+ rm -f $(LIB).$(MAJOR) $(LIB)
+ ln -s $(LIB).$(VERSION) $(LIB).$(MAJOR)
+ ln -s $(LIB).$(MAJOR) $(LIB)
clean:
- -rm -f $(OBJ) $(LIB) *~
+ -rm -f $(OBJ) $(LIB) $(LIB).$(VERSION) *~
+
+install: $(LIB) crack.h
+ install -m 755 $(LIB).$(VERSION) $(ROOT)/usr/lib
+ ln -sf $(LIB).$(VERSION) $(ROOT)/usr/lib/$(LIB)
+ install -m 644 crack.h $(ROOT)/usr/include
--- cracklib,2.7/cracklib/crack.h.rh Tue Mar 10 18:17:43 1998
+++ cracklib,2.7/cracklib/crack.h Tue Mar 10 18:17:43 1998
@@ -0,0 +1,15 @@
+
+#ifndef CRACKLIB_H
+#define CRACKLIB_H
+
+/* Pass this function a password (pw) and a path to the
+ * dictionaries (/usr/lib/cracklib_dict should be specified)
+ * and it will either return a NULL string, meaning that the
+ * password is good, or a pointer to a string that explains the
+ * problem with the password.
+ * You must link with -lcrack
+ */
+
+extern char *FascistCheck(char *pw, char *dictpath);
+
+#endif
--- cracklib,2.7/util/Makefile.rh Sun Dec 14 17:49:34 1997
+++ cracklib,2.7/util/Makefile Tue Mar 10 18:17:43 1998
@@ -14,27 +14,31 @@
#SunOS users (and others?) should consider static linking of their passwd binary
#CFLAGS= -O -I../cracklib '-DCRACKLIB_DICTPATH="$(DICTPATH)"' -Bstatic
-CFLAGS= -O -I../cracklib '-DCRACKLIB_DICTPATH="$(DICTPATH)"'
-LIBS= ../cracklib/libcrack.a
+CFLAGS = $(RPM_OPT_FLAGS) -I../cracklib '-DCRACKLIB_DICTPATH="$(DICTPATH)"'
+LDFLAGS = -L../cracklib -lcrack
+LIBS = ../cracklib/libcrack.so
all: packer unpacker testnum teststr testlib
touch all
packer: packer.o $(LIBS)
- cc $(CFLAGS) -o $@ $@.o $(LIBS)
+ cc $(CFLAGS) -o $@ $@.o $(LDFLAGS)
unpacker: unpacker.o $(LIBS)
- cc $(CFLAGS) -o $@ $@.o $(LIBS)
+ cc $(CFLAGS) -o $@ $@.o $(LDFLAGS)
testnum: testnum.o $(LIBS)
- cc $(CFLAGS) -o $@ $@.o $(LIBS)
+ cc $(CFLAGS) -o $@ $@.o $(LDFLAGS)
teststr: teststr.o $(LIBS)
- cc $(CFLAGS) -o $@ $@.o $(LIBS)
+ cc $(CFLAGS) -o $@ $@.o $(LDFLAGS)
testlib: testlib.o $(LIBS)
- cc $(CFLAGS) -o $@ $@.o $(LIBS)
+ cc $(CFLAGS) -o $@ $@.o $(LDFLAGS)
clean:
-rm *.o *~ all
-rm teststr testnum testlib packer unpacker
+
+install: all create-cracklib-dict
+ install -m 755 mkdict packer create-cracklib-dict $(ROOT)/usr/sbin
--- cracklib,2.7/util/create-cracklib-dict.rh Tue Mar 10 18:17:43 1998
+++ cracklib,2.7/util/create-cracklib-dict Tue Mar 10 18:17:43 1998
@@ -0,0 +1,15 @@
+#!/bin/sh
+if [ -z "$*" ]; then
+ echo "Usage:"
+ echo " /usr/sbin/create-cracklib-dict wordlist ..."
+ echo
+ echo "This script takes one or more word list files as arguments"
+ echo "and converts them into cracklib dictionaries for use"
+ echo "by password checking programs. The results are placed in"
+ echo "/usr/lib/cracklib_dict.*"
+ echo
+ echo "Example:"
+ echo "/usr/sbin/create-cracklib-dict /usr/share/dict/words"
+else
+ /usr/sbin/mkdict $* | /usr/sbin/packer /usr/lib/cracklib_dict
+fi
--- cracklib,2.7/Makefile.rh Wed Dec 31 05:33:53 1997
+++ cracklib,2.7/Makefile Tue Mar 10 18:52:47 1998
@@ -7,14 +7,21 @@
###
###
+# cracklib version
+MAJOR=2
+MINOR=7
+VERSION=$(MAJOR).$(MINOR)
+export MAJOR MINOR VERSION
+
+###
# set this to the absolute path (less extn) of compressed dict.
-DICTPATH="/usr/local/lib/pw_dict"
+DICTPATH="/usr/lib/cracklib_dict"
###
# Set this to the path of one or more files continaing wordlists.
-SRCDICTS=/usr/dict/words
+SRCDICTS=/usr/share/dict/words /usr/share/dict/extra.words
###
# If you have installed the cracklib-dicts directory, use this
@@ -36,7 +43,9 @@
-rm -f all installed Part* *.BAK *.bak *~
install: all
+ ( cd cracklib && make install && exit $$? )
+ ( cd util && make install && exit $$? )
@echo 'if "sort" dies from lack of space, see "util/mkdict"'
- util/mkdict $(SRCDICTS) | util/packer $(DICTPATH)
+ util/mkdict $(SRCDICTS) | LD_LIBRARY_PATH=cracklib util/packer $(ROOT)$(DICTPATH)
touch installed
### @echo 'now go install passwd/passwd where you want it'
here you want it'
t it'

198
cracklib.spec Normal file
View File

@ -0,0 +1,198 @@
# Note: if you change CRACKLIB_DICT_PATH you have to change it in the
# pam cracklib module as well
%define CRACKLIB_DICT_PATH %{_datadir}/dict
%define CRACKLIB_DICT_PATHNAME %{CRACKLIB_DICT_PATH}/cracklib_dict
Name: cracklib
Version: 2.9.0
Release: 1mamba
Summary: A password-checking library
Group: System/Libraries
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
Source0: http://downloads.sourceforge.net/sourceforge/cracklib/cracklib-%{version}.tar.gz
Patch0: cracklib-2.7-redhat.patch.bz2
URL: http://sourceforge.net/projects/cracklib
License: Artistic
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if "%{_build}" == "%{_host}"
BuildRequires: python >= 2.4.4
%endif
%description
CrackLib tests passwords to determine whether they match certain security-oriented characteristics.
You can use CrackLib to stop users from choosing passwords which would be easy to guess.
CrackLib performs certain tests:
* It tries to generate words from a username and gecos entry and checks those words against the password;
* It checks for simplistic patterns in passwords;
* It checks for the password in a dictionary.
CrackLib is actually a library containing a particular C function which is used to check the password, as well as other C functions.
CrackLib is not a replacement for a passwd program; it must be used in conjunction with an existing passwd program.
Install the cracklib package if you need a program to check users' passwords to see if they are at least minimally secure.
If you install CrackLib, you'll also want to install the cracklib-dicts package.
%package -n libcrack
Summary: A password-checking library
Group: System/Libraries
Obsoletes: cracklib
Provides: cracklib == %{version}
Requires: libcrack-dicts == %{version}-%{release}
%description -n libcrack
CrackLib tests passwords to determine whether they match certain security-oriented characteristics.
You can use CrackLib to stop users from choosing passwords which would be easy to guess.
CrackLib performs certain tests:
* It tries to generate words from a username and gecos entry and checks those words against the password;
* It checks for simplistic patterns in passwords;
* It checks for the password in a dictionary.
CrackLib is actually a library containing a particular C function which is used to check the password, as well as other C functions.
CrackLib is not a replacement for a passwd program; it must be used in conjunction with an existing passwd program.
Install the cracklib package if you need a program to check users' passwords to see if they are at least minimally secure.
If you install CrackLib, you'll also want to install the cracklib-dicts package.
%package -n libcrack-devel
Summary: cracklib link library & header file
Group: Development/Libraries
Requires: libcrack = %{version}-%{release}
Obsoletes: cracklib-devel
Provides: cracklib-devel == %{version}
%description -n libcrack-devel
The cracklib devel package include the needed library link and header files for development.
%package -n libcrack-dicts
Summary: The standard CrackLib dictionaries
Group: System/Libraries
Obsoletes: cracklib-dicts
Provides: cracklib-dicts == %{version}
%description -n libcrack-dicts
The cracklib-dicts package includes the CrackLib dictionaries.
CrackLib will need to use the dictionary appropriate to your system, which is normally put in /usr/share/dict/words.
Cracklib-dicts also contains the utilities necessary for the creation of new dictionaries.
If you are installing CrackLib, you should also install cracklib-dicts.
%package -n python-cracklib
Summary: Python cracklib library module
Group: System/Libraries
Requires: libcrack = %{version}
%description -n python-cracklib
Python cracklib library module.
%prep
%setup -q
chmod +x util/cracklib-format
%build
%configure
%make DEFAULT_CRACKLIB_DICT=%{CRACKLIB_DICT_PATHNAME}
%install
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
#install -d %{buildroot}%{_includedir}
#install -d %{buildroot}%{_libdir}
#install -d %{buildroot}%{_sbindir}
#install -m 644 %{SOURCE1} %{buildroot}%{_libdir}/pw_dict
%makeinstall DEFAULT_CRACKLIB_DICT=%{CRACKLIB_DICT_PATHNAME}
# install dict
mkdir -p %{buildroot}%{CRACKLIB_DICT_PATH}
make -C util clean
%if "%{_build}" != "%{_host}"
make -C util DEFAULT_CRACKLIB_DICT=%{buildroot}%{CRACKLIB_DICT_PATHNAME} CC=%{_build}-gcc LDADD="-lcrack"
export PATH=%{_sbindir}:%{_bindir}:./util:$PATH
./util/create-cracklib-dict -o %{buildroot}%{CRACKLIB_DICT_PATHNAME} ./dicts/*
%else
make dict DEFAULT_CRACKLIB_DICT=%{buildroot}%{CRACKLIB_DICT_PATHNAME}
%endif
# rm -f %{buildroot}%{_libdir}/pw_dict
%find_lang %{name}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%clean
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
%files -n libcrack -f %{name}.lang
%defattr(-,root,root)
%{_sbindir}/cracklib-*
%{_datadir}/cracklib/cracklib.magic
%{_datadir}/cracklib/cracklib-small
%{_libdir}/libcrack.so.*
%files -n libcrack-devel
%defattr(-,root,root)
%{_sbindir}/create-cracklib-dict
%{_libdir}/libcrack.so
%{_includedir}/crack.h
%{_includedir}/packer.h
%{_libdir}/libcrack.a
%{_libdir}/libcrack.la
%if "%{_build}" == "%{_host}"
%files -n python-cracklib
%defattr(-,root,root)
%{python_sitearch}/cracklib.*
%{python_sitearch}/_cracklib.a
%{python_sitearch}/_cracklib.la
%{python_sitearch}/_cracklib.so
%{python_sitearch}/test_cracklib.py*
%endif
%files -n libcrack-dicts
%defattr(-,root,root)
%{CRACKLIB_DICT_PATHNAME}.hwm
%{CRACKLIB_DICT_PATHNAME}.pwd
%{CRACKLIB_DICT_PATHNAME}.pwi
%changelog
* Sat Jun 08 2013 Automatic Build System <autodist@mambasoft.it> 2.9.0-1mamba
- automatic version update by autodist
* Mon Dec 17 2012 Automatic Build System <autodist@mambasoft.it> 2.8.22-1mamba
- automatic version update by autodist
* Tue Nov 09 2010 Automatic Build System <autodist@mambasoft.it> 2.8.18-1mamba
- automatic update by autodist
* Sat Aug 21 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 2.8.16-2mamba
- libcrack-dicts: do not require libcrack
* Tue Jun 22 2010 Automatic Build System <autodist@mambasoft.it> 2.8.16-1mamba
- automatic update by autodist
* Tue Jan 27 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 2.8.13-1mamba
- automatic update by autodist
* Sun Jun 24 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 2.8.10-1mamba
- update to 2.8.10
* Sat Oct 28 2006 Silvan Calarco <silvan.calarco@mambasoft.it> 2.7-5qilnx
- rename as libcrack (obsolete cracklib-*)
- fix libcrack.so: make it a symlink to libcrack.so.2.7 file
* Mon Dec 13 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 2.7-4qilnx
- include libcrack.so.* in main package, not just libcrack.so.2.7
* Tue Jul 27 2004 Davide Madrisan <davide.madrisan@qilinux.it> 2.7-3qilnx
- trivial fixes in the specfile needed by the QiLinux distromatic parser
* Fri May 28 2004 Davide Madrisan <davide.madrisan@qilinux.it> 2.7-2qilnx
- added missing ldconfig calls
* Wed May 07 2003 Alessandro Ramazzina <alessandro.ramazzina@qinet.it> 2.7-1qilnx
- creation of cracklib package