Summary: Password cracker
Name: crack
Version: 5.0a
Release: 6%{?dist}
License: Artistic
Group: Applications/System
Source: ftp://ftp.cerias.purdue.edu/pub/tools/unix/pwdutils/crack/%{name}5.0.tar.gz
Patch: %{name}-chris.patch
URL: http://www.crypticide.com/users/alecm/security/c50-faq.html
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: words
%description
Crack is a password guessing program that is designed to quickly locate
insecurities in Unix (or other) password files by scanning the contents of a
password file, looking for users who have misguidedly chosen a weak login
password.
This package creates a group named "crack" and the Crack program puts all
its results in the /var/lib/crack/run directory, which belongs to that group.
Only users in the crack group can use this package.
%prep
%setup -q -n c50a
# Make sure we do not use libdes
rm -rf src/libdes
# select proper crypt routine and related checks
rm -f src/util/elcid.c
ln src/util/elcid.c,bsd src/util/elcid.c
mkdir run bin
# Try not to pollute bin namespace
sed -i -e 's/Reporter/CrackReporter/g' doc/gui.txt manual.html manual.txt
%patch -p1 -b .chris
sed -i 's|/usr/dict/|/usr/share/dict/|g' conf/dictgrps.conf
%build
C5FLAGS="-D_XOPEN_SOURCE -DUSE_STRING_H -DUSE_STDLIB_H -DUSE_SIGNAL_H -DUSE_SYS_TYPES_H -DUSE_UNISTD_H -DUSE_PWD_H"
make XDIR=../../bin XCC=gcc XCFLAGS="$RPM_OPT_FLAGS $C5FLAGS" XLIBS=-lcrypt utils
CRACK_HOME=. ./Crack -makedict
%install
rm -rf $RPM_BUILD_ROOT
rm -f bin/libc5.a bin/stdlib-cracker
mkdir -p $RPM_BUILD_ROOT/var/lib/crack
cp -a bin conf dict run scripts $RPM_BUILD_ROOT/var/lib/crack
install -D Crack $RPM_BUILD_ROOT%{_bindir}/Crack
install Reporter $RPM_BUILD_ROOT%{_bindir}/CrackReporter
%clean
rm -rf $RPM_BUILD_ROOT
%pre
if [ $1 -eq 1 ]; then
groupadd -r crack >/dev/null 2>&1 || :
fi
%files
%defattr(-, root, root)
%doc LICENCE manual.* doc
%attr(00750, root, crack) %{_bindir}/*
%dir /var/lib/crack/
/var/lib/crack/bin/
/var/lib/crack/conf/
/var/lib/crack/dict/
/var/lib/crack/scripts/
%attr(02770, root, crack) %dir /var/lib/crack/run/
%attr(02770, root, crack) %dir /var/lib/crack/run/dict/
%attr(00640, root, crack) /var/lib/crack/run/dict/*
%attr(00640, root, crack) /var/lib/crack/run/dict/.dictmade
%changelog
* Wed Aug 22 2007 Christian Iseli <Christian.Iseli@licr.org> 5.0a-6
- Rebuild for BuildID
* Thu May 10 2007 Christian Iseli <Christian.Iseli@licr.org> 5.0a-5
- Fix #239575: crack uses obsolete sort option syntax
* Tue Sep 05 2006 Christian Iseli <Christian.Iseli@licr.org> 5.0a-4
- rebuild for FE 6
* Tue Feb 14 2006 Christian Iseli <Christian.Iseli@licr.org> 5.0a-3
- rebuild for FE 5
* Fri Dec 23 2005 Christian Iseli <Christian.Iseli@licr.org> 5.0a-2
- rebuild with gcc-4.1
* Tue Sep 06 2005 Tom "spot" Callaway <tcallawa@redhat.com> 5.0a-1
- use words to make a richer dict 1
* Tue Sep 06 2005 Christian Iseli <Christian.Iseli@licr.org> 5.0a-0
- Created spec file.