f508414
Name:           chntpw
f508414
# Version is taken from HISTORY.txt
f508414
Version:        0.99.6
838c56e
Release:        25.110511%{?dist}
f508414
Summary:        Change passwords in Windows SAM files
f508414
Group:          Applications/Engineering
f508414
License:        GPLv2
d64202c
URL:		http://pogostick.net/~pnh/ntpasswd/
Conrad Meyer fd64259
Source0:	http://pogostick.net/~pnh/ntpasswd/chntpw-source-110511.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.
Conrad Meyer fd64259
Patch1:         chntpw-110511-get_abs_path.patch
6e892e7
affa7b3
# Patch from Debian (RHBZ#504595).
Conrad Meyer fd64259
Patch3:         chntpw-110511-port-to-gcrypt-debian.patch
affa7b3
bf3b22a
# Patches from Jim Meyering to improve robustness of the code.
Conrad Meyer fd64259
Patch4:         chntpw-110511-robustness.patch
9cb3759
Patch5:         chntpw-080526-correct-test-for-failing-open-syscall.patch
Conrad Meyer fd64259
Patch6:         chntpw-110511-detect-failure-to-write-key.patch
Conrad Meyer fd64259
Patch7:         chntpw-110511-reged-no-deref-null.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
Conrad Meyer fd64259
%setup -q -n %{name}-110511
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
%patch1 -p1
affa7b3
%patch3 -p1
bf3b22a
%patch4 -p1
9cb3759
%patch5 -p1
9cb3759
%patch6 -p1
1130319
%patch7 -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
838c56e
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.99.6-25.110511
838c56e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
838c56e
0613b3b
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.99.6-24.110511
0613b3b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
0613b3b
a7ad7fd
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.99.6-23.110511
a7ad7fd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
a7ad7fd
184b648
* Wed Apr 23 2014 Tomáš Mráz <tmraz@redhat.com> - 0.99.6-22.110511
184b648
- Rebuild for new libgcrypt
184b648
c00bf92
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.99.6-21.110511
c00bf92
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
c00bf92
7a11e2b
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.99.6-20.110511
7a11e2b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
7a11e2b
d947db7
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.99.6-19.110511
d947db7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
d947db7
96bb389
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.99.6-18.110511
96bb389
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
96bb389
Conrad Meyer 13bf89e
* Sun Dec 18 2011 Conrad Meyer <konrad@tylerc.org> - 0.99.6-17.110511
Conrad Meyer 13bf89e
- Fix 'robustness' patch (#755622)
Conrad Meyer 13bf89e
Conrad Meyer fd64259
* Tue Nov 1 2011 Conrad Meyer <konrad@tylerc.org> - 0.99.6-16.110511
Conrad Meyer fd64259
- Update to latest upstream (110511) (#750005).
Conrad Meyer fd64259
- Update fedora patches to apply cleanly, dropping useless hunks
Conrad Meyer fd64259
  as needed.
Conrad Meyer fd64259
- Add upstream version to "Release" tag, so that people can
Conrad Meyer fd64259
  actually tell which version of upstream we're shipping from the
Conrad Meyer fd64259
  rpm version.
Conrad Meyer fd64259
38f2b5c
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.99.6-15
38f2b5c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
38f2b5c
d64202c
* Mon Jun 7 2010 Conrad Meyer <konrad@tylerc.org> - 0.99.6-14
d64202c
- Upstream changed hosts; fixed URL and Source0.
d64202c
806dc33
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.99.6-13
806dc33
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
806dc33
1130319
* Wed Jul 22 2009 Richard W.M. Jones <rjones@redhat.com> - 0.99.6-12
1130319
- Two^W Three 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.