Blob Blame History Raw
Name:           chntpw
# Version is taken from HISTORY.txt
Version:        0.99.6
Release:        8%{?dist}
Summary:        Change passwords in Windows SAM files
Group:          Applications/Engineering
License:        GPLv2
URL:            http://home.eunet.no/~pnordahl/ntpasswd/
Source0:        http://home.eunet.no/~pnordahl/ntpasswd/chntpw-source-080526.zip
Source2:        chntpw-README.Dist
# The man page is borrowed from Debian
Source3:        chntpw-chntpw.8
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  openssl-devel

# Patches sent upstream on 2009-06-08.
Patch0:         chntpw-080526-keyname-overflow.patch
Patch1:         chntpw-080526-get_abs_path.patch
Patch2:         chntpw-080526-no-value.patch


%description
This is a utility to (re)set the password of any user that has a valid
(local) account on your Windows NT/2k/XP/Vista etc system. You do not
need to know the old password to set a new one. It works offline, that
is, you have to shutdown your computer and boot off a floppydisk or CD
or another system. Will detect and offer to unlock locked or disabled
out user accounts! There is also a registry editor and other registry
utilities that works under linux/unix, and can be used for other things
than password editing.


%prep
%setup -q -n %{name}-080526
cp -p %{SOURCE2} README.Dist
sed -e 's/\r$//' WinReg.txt > WinReg.txt.eol
touch -c -r WinReg.txt WinReg.txt.eol
mv WinReg.txt.eol WinReg.txt

%patch0 -p1
%patch1 -p1
%patch2 -p1


%build
make CC="%__cc" CFLAGS="$RPM_OPT_FLAGS" LIBS="-lcrypto" chntpw cpnt reged


%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_bindir}
cp chntpw $RPM_BUILD_ROOT%{_bindir}
cp cpnt   $RPM_BUILD_ROOT%{_bindir}
cp reged  $RPM_BUILD_ROOT%{_bindir}
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man8/
cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_mandir}/man8/%{name}.8


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc GPL.txt LGPL.txt README.txt regedit.txt WinReg.txt HISTORY.txt
%doc README.Dist
%{_bindir}/chntpw
%{_bindir}/cpnt
%{_bindir}/reged
%{_mandir}/man8/%{name}.8*


%changelog
* Mon Jun  8 2009 Richard W.M. Jones <rjones@redhat.com> - 0.99.6-8
- Fix three crashing bugs in 'reged -x' command.

* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.99.6-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Thu Jan 15 2009 Tomas Mraz <tmraz@redhat.com> - 0.99.6-6
- rebuild with new openssl

* Sun Oct 11 2008 Conrad Meyer <konrad@tylerc.org> - 0.99.6-5
- Bump because force-tag was removed. Please add it back.

* Sat Oct 11 2008 Conrad Meyer <konrad@tylerc.org> - 0.99.6-4
- Fix EOL encodings in WinReg.txt.

* Sat Oct 11 2008 Conrad Meyer <konrad@tylerc.org> - 0.99.6-3
- More miscellaneous small changes.

* Fri Oct 10 2008 Conrad Meyer <konrad@tylerc.org> - 0.99.6-2
- Revert to original Makefile.
- Miscellaneous small changes.

* Wed Oct 1 2008 Conrad Meyer <konrad@tylerc.org> - 0.99.6-1
- Initial package.