7ae832
Summary:   Password cracker
7ae832
Name:      crack
7ae832
Version:   5.0a
5f781c
Release:   17%{?dist}
43484f
License:   Artistic clarified
7ae832
Group:     Applications/System
7ae832
Source:    ftp://ftp.cerias.purdue.edu/pub/tools/unix/pwdutils/crack/%{name}5.0.tar.gz
ec6044
Patch0:    %{name}-chris.patch
ec6044
Patch1:    %{name}-FHS.patch
7ae832
URL:       http://www.crypticide.com/users/alecm/security/c50-faq.html
7ae832
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
6eb2c7
BuildRequires: words, gawk
7ae832
7ae832
%description
7ae832
Crack is a password guessing program that is designed to quickly locate
7ae832
insecurities in Unix (or other) password files by scanning the contents of a
7ae832
password file, looking for users who have misguidedly chosen a weak login
7ae832
password.
7ae832
7ae832
This package creates a group named "crack" and the Crack program puts all
50be88
its results in the /var/lib/crack/run directory, which belongs to that group.
7ae832
Only users in the crack group can use this package.
7ae832
7ae832
7ae832
%prep
7ae832
%setup -q -n c50a
7ae832
# Make sure we do not use libdes
7ae832
rm -rf src/libdes
7ae832
# select proper crypt routine and related checks
7ae832
rm -f src/util/elcid.c
7ae832
ln src/util/elcid.c,bsd src/util/elcid.c
7ae832
mkdir run bin
7ae832
# Try not to pollute bin namespace
7ae832
sed -i -e 's/Reporter/CrackReporter/g' doc/gui.txt manual.html manual.txt
ec6044
%patch0 -p1 -b .chris
7ae832
sed -i 's|/usr/dict/|/usr/share/dict/|g' conf/dictgrps.conf
ec6044
# Alter script to use FHS layout
ec6044
%patch1 -p1 -b .FHS
7ae832
7ae832
%build
7ae832
C5FLAGS="-D_XOPEN_SOURCE -DUSE_STRING_H -DUSE_STDLIB_H -DUSE_SIGNAL_H -DUSE_SYS_TYPES_H -DUSE_UNISTD_H -DUSE_PWD_H"
7ae832
make XDIR=../../bin XCC=gcc XCFLAGS="$RPM_OPT_FLAGS $C5FLAGS" XLIBS=-lcrypt utils
f5bc6a
CRACK_HOME=`pwd` CRACK_BIN_HOME=`pwd` CRACK_STATE_DIR=`pwd` ./Crack -makedict
7ae832
7ae832
7ae832
%install
7ae832
rm -rf $RPM_BUILD_ROOT
7ae832
rm -f bin/libc5.a bin/stdlib-cracker
ec6044
mkdir -p $RPM_BUILD_ROOT%{_bindir}
ec6044
mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}
ec6044
mkdir -p $RPM_BUILD_ROOT%{_libexecdir}/%{name}
f5bc6a
mkdir -p $RPM_BUILD_ROOT%{_sharedstatedir}/%{name}
ec6044
cp -a bin $RPM_BUILD_ROOT%{_libexecdir}/%{name} 
f5bc6a
cp -a conf dict scripts $RPM_BUILD_ROOT%{_datadir}/%{name}
f5bc6a
cp -a run $RPM_BUILD_ROOT%{_sharedstatedir}/%{name}
ec6044
install -p -m0755 Crack $RPM_BUILD_ROOT%{_bindir}/Crack
ec6044
install -p -m0755 Reporter $RPM_BUILD_ROOT%{_bindir}/CrackReporter
7ae832
7ae832
7ae832
%clean
7ae832
rm -rf $RPM_BUILD_ROOT
7ae832
7ae832
7ae832
%pre
7ae832
if [ $1 -eq 1 ]; then
7ae832
    groupadd -r crack >/dev/null 2>&1 || :
7ae832
fi
7ae832
7ae832
7ae832
%files
7ae832
%defattr(-, root, root)
7ae832
%doc LICENCE manual.* doc
ec6044
%attr(00750, root, crack) %{_bindir}/Crack*
ec6044
%{_libexecdir}/%{name}/
f5bc6a
%{_datadir}/%{name}/
f5bc6a
%dir %{_sharedstatedir}/%{name}/
f5bc6a
%attr(02770, root, crack) %dir %{_sharedstatedir}/%{name}/run/
f5bc6a
%attr(02770, root, crack) %dir %{_sharedstatedir}/%{name}/run/dict/
f5bc6a
%attr(00640, root, crack) %{_sharedstatedir}/%{name}/run/dict/*
f5bc6a
%attr(00640, root, crack) %{_sharedstatedir}/%{name}/run/dict/.dictmade
7ae832
7ae832
7ae832
%changelog
5f781c
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.0a-17
5f781c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
5f781c
187775
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.0a-16
187775
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
187775
c64b0b
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.0a-15
c64b0b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
c64b0b
50be88
* Wed Mar 31 2010 Christian Iseli <christian.iseli@licr.org> - 5.0a-14
50be88
- fix description wrt FHS cleanup patch
50be88
f5bc6a
* Wed Mar 31 2010 Tom "spot" Callaway <tcallawa@redhat.com> - 5.0a-13
f5bc6a
- cleanup FHS patch and spec to properly use /var/lib/crack/run
f5bc6a
dcb543
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.0a-12
dcb543
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
dcb543
bd632c
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.0a-11
bd632c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
bd632c
cbba88
* Mon Feb 23 2009 Christian Iseli <christian.iseli@licr.org> - 5.0a-10
cbba88
- Rebuild for F-11
cbba88
ec6044
* Tue Nov 25 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 5.0a-9
ec6044
- rework spec file so that it meets FHS
ec6044
ae6144
* Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 5.0a-8
ae6144
- Autorebuild for GCC 4.3
ae6144
5c85c4
* Wed Aug 22 2007 Christian Iseli <christian.iseli@licr.org> 5.0a-7
5c85c4
- Mark License tag as "Artistic clarified"
5c85c4
20fe33
* Wed Aug 22 2007 Christian Iseli <christian.iseli@licr.org> 5.0a-6
6eb2c7
- add BR: gawk
20fe33
- Rebuild for BuildID
20fe33
2ab275
* Thu May 10 2007 Christian Iseli <christian.iseli@licr.org> 5.0a-5
2ab275
- Fix #239575: crack uses obsolete sort option syntax
2ab275
952600
* Tue Sep 05 2006 Christian Iseli <christian.iseli@licr.org> 5.0a-4
952600
- rebuild for FE 6
952600
48afaf
* Tue Feb 14 2006 Christian Iseli <christian.iseli@licr.org> 5.0a-3
48afaf
- rebuild for FE 5
48afaf
7ec07f
* Fri Dec 23 2005 Christian Iseli <christian.iseli@licr.org> 5.0a-2
7ec07f
- rebuild with gcc-4.1
7ec07f
7ae832
* Tue Sep 06 2005 Tom "spot" Callaway <tcallawa@redhat.com> 5.0a-1
7ae832
- use words to make a richer dict 1
7ae832
7ae832
* Tue Sep 06 2005 Christian Iseli <christian.iseli@licr.org> 5.0a-0
7ae832
- Created spec file.