Blob Blame History Raw
Summary:   Password cracker
Name:      crack
Version:   5.0a
Release:   9%{?dist}
License:   Artistic clarified
Group:     Applications/System
Patch0:    %{name}-chris.patch
Patch1:    %{name}-FHS.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: words, gawk

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

This package creates a group named "crack" and the Crack program puts all
its results in the /usr/share/crack/run directory, which belongs to that group.
Only users in the crack group can use this package.

%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
%patch0 -p1 -b .chris
sed -i 's|/usr/dict/|/usr/share/dict/|g' conf/dictgrps.conf
# Alter script to use FHS layout
%patch1 -p1 -b .FHS

make XDIR=../../bin XCC=gcc XCFLAGS="$RPM_OPT_FLAGS $C5FLAGS" XLIBS=-lcrypt utils
CRACK_HOME=`pwd` CRACK_BIN_HOME=`pwd` ./Crack -makedict

rm -f bin/libc5.a bin/stdlib-cracker
mkdir -p $RPM_BUILD_ROOT%{_bindir}
mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}
mkdir -p $RPM_BUILD_ROOT%{_libexecdir}/%{name}
cp -a bin $RPM_BUILD_ROOT%{_libexecdir}/%{name} 
cp -a conf dict run scripts $RPM_BUILD_ROOT%{_datadir}/%{name}
install -p -m0755 Crack $RPM_BUILD_ROOT%{_bindir}/Crack
install -p -m0755 Reporter $RPM_BUILD_ROOT%{_bindir}/CrackReporter


if [ $1 -eq 1 ]; then
    groupadd -r crack >/dev/null 2>&1 || :

%defattr(-, root, root)
%doc LICENCE manual.* doc
%attr(00750, root, crack) %{_bindir}/Crack*
%dir %{_datadir}/%{name}/
%attr(02770, root, crack) %dir %{_datadir}/%{name}/run/
%attr(02770, root, crack) %dir %{_datadir}/%{name}/run/dict/
%attr(00640, root, crack) %{_datadir}/%{name}/run/dict/*
%attr(00640, root, crack) %{_datadir}/%{name}/run/dict/.dictmade

* Tue Nov 25 2008 Tom "spot" Callaway <> - 5.0a-9
- rework spec file so that it meets FHS

* Mon Feb 18 2008 Fedora Release Engineering <> - 5.0a-8
- Autorebuild for GCC 4.3

* Wed Aug 22 2007 Christian Iseli <> 5.0a-7
- Mark License tag as "Artistic clarified"

* Wed Aug 22 2007 Christian Iseli <> 5.0a-6
- add BR: gawk
- Rebuild for BuildID

* Thu May 10 2007 Christian Iseli <> 5.0a-5
- Fix #239575: crack uses obsolete sort option syntax

* Tue Sep 05 2006 Christian Iseli <> 5.0a-4
- rebuild for FE 6

* Tue Feb 14 2006 Christian Iseli <> 5.0a-3
- rebuild for FE 5

* Fri Dec 23 2005 Christian Iseli <> 5.0a-2
- rebuild with gcc-4.1

* Tue Sep 06 2005 Tom "spot" Callaway <> 5.0a-1
- use words to make a richer dict 1

* Tue Sep 06 2005 Christian Iseli <> 5.0a-0
- Created spec file.