7ae832c
Summary:   Password cracker
7ae832c
Name:      crack
7ae832c
Version:   5.0a
5509087
Release:   28%{?dist}
43484fc
License:   Artistic clarified
7ae832c
Group:     Applications/System
7ae832c
Source:    ftp://ftp.cerias.purdue.edu/pub/tools/unix/pwdutils/crack/%{name}5.0.tar.gz
ec6044c
Patch0:    %{name}-chris.patch
ec6044c
Patch1:    %{name}-FHS.patch
7ae832c
URL:       http://www.crypticide.com/users/alecm/security/c50-faq.html
6eb2c7f
BuildRequires: words, gawk
7ae832c
7ae832c
%description
7ae832c
Crack is a password guessing program that is designed to quickly locate
7ae832c
insecurities in Unix (or other) password files by scanning the contents of a
7ae832c
password file, looking for users who have misguidedly chosen a weak login
7ae832c
password.
7ae832c
7ae832c
This package creates a group named "crack" and the Crack program puts all
50be886
its results in the /var/lib/crack/run directory, which belongs to that group.
7ae832c
Only users in the crack group can use this package.
7ae832c
7ae832c
7ae832c
%prep
7ae832c
%setup -q -n c50a
7ae832c
# Make sure we do not use libdes
7ae832c
rm -rf src/libdes
7ae832c
# select proper crypt routine and related checks
7ae832c
rm -f src/util/elcid.c
7ae832c
ln src/util/elcid.c,bsd src/util/elcid.c
7ae832c
mkdir run bin
7ae832c
# Try not to pollute bin namespace
7ae832c
sed -i -e 's/Reporter/CrackReporter/g' doc/gui.txt manual.html manual.txt
ec6044c
%patch0 -p1 -b .chris
7ae832c
sed -i 's|/usr/dict/|/usr/share/dict/|g' conf/dictgrps.conf
ec6044c
# Alter script to use FHS layout
ec6044c
%patch1 -p1 -b .FHS
7ae832c
7ae832c
%build
7ae832c
C5FLAGS="-D_XOPEN_SOURCE -DUSE_STRING_H -DUSE_STDLIB_H -DUSE_SIGNAL_H -DUSE_SYS_TYPES_H -DUSE_UNISTD_H -DUSE_PWD_H"
7ae832c
make XDIR=../../bin XCC=gcc XCFLAGS="$RPM_OPT_FLAGS $C5FLAGS" XLIBS=-lcrypt utils
f5bc6a0
CRACK_HOME=`pwd` CRACK_BIN_HOME=`pwd` CRACK_STATE_DIR=`pwd` ./Crack -makedict
7ae832c
7ae832c
7ae832c
%install
7ae832c
rm -rf $RPM_BUILD_ROOT
7ae832c
rm -f bin/libc5.a bin/stdlib-cracker
ec6044c
mkdir -p $RPM_BUILD_ROOT%{_bindir}
ec6044c
mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}
ec6044c
mkdir -p $RPM_BUILD_ROOT%{_libexecdir}/%{name}
f5bc6a0
mkdir -p $RPM_BUILD_ROOT%{_sharedstatedir}/%{name}
ec6044c
cp -a bin $RPM_BUILD_ROOT%{_libexecdir}/%{name} 
f5bc6a0
cp -a conf dict scripts $RPM_BUILD_ROOT%{_datadir}/%{name}
f5bc6a0
cp -a run $RPM_BUILD_ROOT%{_sharedstatedir}/%{name}
ec6044c
install -p -m0755 Crack $RPM_BUILD_ROOT%{_bindir}/Crack
ec6044c
install -p -m0755 Reporter $RPM_BUILD_ROOT%{_bindir}/CrackReporter
7ae832c
7ae832c
7ae832c
7ae832c
%pre
7ae832c
if [ $1 -eq 1 ]; then
7ae832c
    groupadd -r crack >/dev/null 2>&1 || :
7ae832c
fi
7ae832c
7ae832c
7ae832c
%files
7ae832c
%defattr(-, root, root)
7ae832c
%doc LICENCE manual.* doc
ec6044c
%attr(00750, root, crack) %{_bindir}/Crack*
ec6044c
%{_libexecdir}/%{name}/
f5bc6a0
%{_datadir}/%{name}/
f5bc6a0
%dir %{_sharedstatedir}/%{name}/
f5bc6a0
%attr(02770, root, crack) %dir %{_sharedstatedir}/%{name}/run/
f5bc6a0
%attr(02770, root, crack) %dir %{_sharedstatedir}/%{name}/run/dict/
f5bc6a0
%attr(00640, root, crack) %{_sharedstatedir}/%{name}/run/dict/*
f5bc6a0
%attr(00640, root, crack) %{_sharedstatedir}/%{name}/run/dict/.dictmade
7ae832c
7ae832c
7ae832c
%changelog
5509087
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 5.0a-28
5509087
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
5509087
bead2b7
* Sat Jan 20 2018 Björn Esser <besser82@fedoraproject.org> - 5.0a-27
bead2b7
- Rebuilt for switch to libxcrypt
bead2b7
2f607c7
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.0a-26
2f607c7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
2f607c7
3d0387b
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.0a-25
3d0387b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
3d0387b
bb138c1
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.0a-24
bb138c1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
bb138c1
a597adf
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 5.0a-23
a597adf
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
a597adf
b0f631e
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.0a-22
b0f631e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
b0f631e
00af00c
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.0a-21
00af00c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
00af00c
311f7ae
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.0a-20
311f7ae
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
311f7ae
eea098b
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.0a-19
eea098b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
eea098b
ce6a5be
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.0a-18
ce6a5be
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
ce6a5be
5f781c6
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.0a-17
5f781c6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
5f781c6
1877758
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.0a-16
1877758
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
1877758
c64b0b7
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.0a-15
c64b0b7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
c64b0b7
50be886
* Wed Mar 31 2010 Christian Iseli <Christian.Iseli@licr.org> - 5.0a-14
50be886
- fix description wrt FHS cleanup patch
50be886
f5bc6a0
* Wed Mar 31 2010 Tom "spot" Callaway <tcallawa@redhat.com> - 5.0a-13
f5bc6a0
- cleanup FHS patch and spec to properly use /var/lib/crack/run
f5bc6a0
dcb543f
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.0a-12
dcb543f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
dcb543f
bd632cc
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.0a-11
bd632cc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
bd632cc
cbba88a
* Mon Feb 23 2009 Christian Iseli <Christian.Iseli@licr.org> - 5.0a-10
cbba88a
- Rebuild for F-11
cbba88a
ec6044c
* Tue Nov 25 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 5.0a-9
ec6044c
- rework spec file so that it meets FHS
ec6044c
ae6144f
* Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 5.0a-8
ae6144f
- Autorebuild for GCC 4.3
ae6144f
5c85c47
* Wed Aug 22 2007 Christian Iseli <Christian.Iseli@licr.org> 5.0a-7
5c85c47
- Mark License tag as "Artistic clarified"
5c85c47
20fe331
* Wed Aug 22 2007 Christian Iseli <Christian.Iseli@licr.org> 5.0a-6
6eb2c7f
- add BR: gawk
20fe331
- Rebuild for BuildID
20fe331
2ab2759
* Thu May 10 2007 Christian Iseli <Christian.Iseli@licr.org> 5.0a-5
2ab2759
- Fix #239575: crack uses obsolete sort option syntax
2ab2759
952600b
* Tue Sep 05 2006 Christian Iseli <Christian.Iseli@licr.org> 5.0a-4
952600b
- rebuild for FE 6
952600b
48afafc
* Tue Feb 14 2006 Christian Iseli <Christian.Iseli@licr.org> 5.0a-3
48afafc
- rebuild for FE 5
48afafc
7ec07f8
* Fri Dec 23 2005 Christian Iseli <Christian.Iseli@licr.org> 5.0a-2
7ec07f8
- rebuild with gcc-4.1
7ec07f8
7ae832c
* Tue Sep 06 2005 Tom "spot" Callaway <tcallawa@redhat.com> 5.0a-1
7ae832c
- use words to make a richer dict 1
7ae832c
7ae832c
* Tue Sep 06 2005 Christian Iseli <Christian.Iseli@licr.org> 5.0a-0
7ae832c
- Created spec file.