f508414
Name:           chntpw
f508414
# Version is taken from HISTORY.txt
f508414
Version:        0.99.6
9cb3759
Release:        11%{?dist}
f508414
Summary:        Change passwords in Windows SAM files
f508414
Group:          Applications/Engineering
f508414
License:        GPLv2
f508414
URL:            http://home.eunet.no/~pnordahl/ntpasswd/
f508414
Source0:        http://home.eunet.no/~pnordahl/ntpasswd/chntpw-source-080526.zip
f508414
Source2:        chntpw-README.Dist
f508414
# The man page is borrowed from Debian
f508414
Source3:        chntpw-chntpw.8
f508414
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
f508414
affa7b3
BuildRequires:  libgcrypt-devel
f508414
6e892e7
# Patches sent upstream on 2009-06-08.
6e892e7
Patch0:         chntpw-080526-keyname-overflow.patch
6e892e7
Patch1:         chntpw-080526-get_abs_path.patch
6e892e7
Patch2:         chntpw-080526-no-value.patch
6e892e7
affa7b3
# Patch from Debian (RHBZ#504595).
affa7b3
Patch3:         chntpw-080526-port-to-gcrypt-debian.patch
affa7b3
bf3b22a
# Patches from Jim Meyering to improve robustness of the code.
bf3b22a
Patch4:         chntpw-080526-robustness.patch
9cb3759
Patch5:         chntpw-080526-correct-test-for-failing-open-syscall.patch
9cb3759
Patch6:         chntpw-080526-detect-failure-to-write-key.patch
bf3b22a
f508414
f508414
%description
f508414
This is a utility to (re)set the password of any user that has a valid
f508414
(local) account on your Windows NT/2k/XP/Vista etc system. You do not
f508414
need to know the old password to set a new one. It works offline, that
f508414
is, you have to shutdown your computer and boot off a floppydisk or CD
f508414
or another system. Will detect and offer to unlock locked or disabled
f508414
out user accounts! There is also a registry editor and other registry
f508414
utilities that works under linux/unix, and can be used for other things
f508414
than password editing.
f508414
f508414
f508414
%prep
f508414
%setup -q -n %{name}-080526
f508414
cp -p %{SOURCE2} README.Dist
3ed22fa
sed -e 's/\r$//' WinReg.txt > WinReg.txt.eol
3ed22fa
touch -c -r WinReg.txt WinReg.txt.eol
3ed22fa
mv WinReg.txt.eol WinReg.txt
f508414
6e892e7
%patch0 -p1
6e892e7
%patch1 -p1
6e892e7
%patch2 -p1
affa7b3
%patch3 -p1
bf3b22a
%patch4 -p1
9cb3759
%patch5 -p1
9cb3759
%patch6 -p1
6e892e7
f508414
f508414
%build
affa7b3
make CC="%__cc" EXTRA_CFLAGS="$RPM_OPT_FLAGS" chntpw cpnt reged
f508414
f508414
f508414
%install
f508414
rm -rf $RPM_BUILD_ROOT
f508414
mkdir -p $RPM_BUILD_ROOT%{_bindir}
f508414
cp chntpw $RPM_BUILD_ROOT%{_bindir}
f508414
cp cpnt   $RPM_BUILD_ROOT%{_bindir}
f508414
cp reged  $RPM_BUILD_ROOT%{_bindir}
f508414
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man8/
f508414
cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_mandir}/man8/%{name}.8
f508414
f508414
f508414
%clean
f508414
rm -rf $RPM_BUILD_ROOT
f508414
f508414
f508414
%files
f508414
%defattr(-,root,root,-)
f508414
%doc GPL.txt LGPL.txt README.txt regedit.txt WinReg.txt HISTORY.txt
f508414
%doc README.Dist
f508414
%{_bindir}/chntpw
f508414
%{_bindir}/cpnt
f508414
%{_bindir}/reged
f508414
%{_mandir}/man8/%{name}.8*
f508414
f508414
f508414
%changelog
9cb3759
* Wed Jul 22 2009 Richard W.M. Jones <rjones@redhat.com> - 0.99.6-11
9cb3759
- Two more patches from Jim Meyering to improve general code quality.
9cb3759
bf3b22a
* Mon Jul 20 2009 Richard W.M. Jones <rjones@redhat.com> - 0.99.6-10
bf3b22a
- Three patches from Jim Meyering aiming to improve the general
bf3b22a
  robustness of the code.
bf3b22a
affa7b3
* Mon Jun  8 2009 Richard W.M. Jones <rjones@redhat.com> - 0.99.6-9
affa7b3
- Compile against libgcrypt instead of OpenSSL (RHBZ#504595).
affa7b3
- Compile as a 64 bit native binary on 64 bit platforms.
affa7b3
6e892e7
* Mon Jun  8 2009 Richard W.M. Jones <rjones@redhat.com> - 0.99.6-8
6e892e7
- Fix three crashing bugs in 'reged -x' command.
6e892e7
ad2abec
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.99.6-7
ad2abec
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
ad2abec
877f000
* Thu Jan 15 2009 Tomas Mraz <tmraz@redhat.com> - 0.99.6-6
877f000
- rebuild with new openssl
877f000
be6f4ff
* Sun Oct 11 2008 Conrad Meyer <konrad@tylerc.org> - 0.99.6-5
be6f4ff
- Bump because force-tag was removed. Please add it back.
be6f4ff
f508414
* Sat Oct 11 2008 Conrad Meyer <konrad@tylerc.org> - 0.99.6-4
f508414
- Fix EOL encodings in WinReg.txt.
f508414
f508414
* Sat Oct 11 2008 Conrad Meyer <konrad@tylerc.org> - 0.99.6-3
f508414
- More miscellaneous small changes.
f508414
f508414
* Fri Oct 10 2008 Conrad Meyer <konrad@tylerc.org> - 0.99.6-2
f508414
- Revert to original Makefile.
f508414
- Miscellaneous small changes.
f508414
f508414
* Wed Oct 1 2008 Conrad Meyer <konrad@tylerc.org> - 0.99.6-1
f508414
- Initial package.