Compare commits
26 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dee0164d1f | ||
|
|
41b757f133 | ||
|
|
635b289309 | ||
|
|
3407927d5b | ||
|
|
cfb1a000cc | ||
|
|
a7507a0ea8 | ||
|
|
31075a04ab | ||
|
|
061474d1e6 | ||
|
|
5fb5151e53 | ||
|
|
357ed638fe | ||
|
|
ef98207ac1 | ||
|
|
d63bc578b7 | ||
|
|
ad8769bcd2 | ||
|
|
e973148d5e | ||
|
|
1fb65f50ba | ||
|
|
8478749d93 | ||
|
|
4c3862d8e7 | ||
|
|
b1ff3a5541 | ||
|
|
70139ea65b | ||
|
|
d28d7be664 | ||
|
|
7fea2dfcbd | ||
|
|
b5663ce9ad | ||
|
|
b8c1f330bd | ||
|
|
fb66fe7ea3 | ||
|
|
bace41e774 | ||
|
|
2cae951425 |
3 changed files with 135 additions and 10 deletions
34
chntpw-140201-fix-bogus-errno-use.patch
Normal file
34
chntpw-140201-fix-bogus-errno-use.patch
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
diff -u chntpw-140201.orig/ntreg.c chntpw-140201/ntreg.c
|
||||
--- chntpw-140201.orig/ntreg.c 2019-06-22 13:09:59.583717369 -0700
|
||||
+++ chntpw-140201/ntreg.c 2019-06-22 13:16:26.714726148 -0700
|
||||
@@ -4241,10 +4241,13 @@
|
||||
do { /* On some platforms read may not block, and read in chunks. handle that */
|
||||
r = read(hdesc->filedesc, hdesc->buffer + rt, hdesc->size - rt);
|
||||
rt += r;
|
||||
- } while ( !errno && (rt < hdesc->size) );
|
||||
+ } while ( r > 0 && (rt < hdesc->size) );
|
||||
|
||||
- if (errno) {
|
||||
- perror("openHive(): read error: ");
|
||||
+ if (r <= 0) {
|
||||
+ if (r < 0)
|
||||
+ perror("openHive(): read error");
|
||||
+ else
|
||||
+ fprintf(stderr, "openHive(): read error: unexpected EOF\n");
|
||||
closeHive(hdesc);
|
||||
return(NULL);
|
||||
}
|
||||
@@ -4255,10 +4258,10 @@
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
- if (r < sizeof (*hdesc)) {
|
||||
+ if (rt < sizeof (*hdesc)) {
|
||||
fprintf(stderr,
|
||||
- "file is too small; got %d bytes while expecting %d or more\n",
|
||||
- r, sizeof (*hdesc));
|
||||
+ "file is too small; got %d bytes while expecting %zu or more\n",
|
||||
+ rt, sizeof (*hdesc));
|
||||
closeHive(hdesc);
|
||||
return(NULL);
|
||||
}
|
||||
21
chntpw-140201-hexdump-pointer-type.patch
Normal file
21
chntpw-140201-hexdump-pointer-type.patch
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
diff -urN chntpw-140201.orig/libsam.c chntpw-140201/libsam.c
|
||||
--- chntpw-140201.orig/libsam.c 2014-02-01 08:54:37.000000000 -0800
|
||||
+++ chntpw-140201/libsam.c 2024-08-03 15:31:41.817601486 -0700
|
||||
@@ -511,7 +511,7 @@
|
||||
|
||||
if (gverbose) printf("put_grp_members_sid: ajusted: mofs = %x, mlen = %x (%d)\n", mofs + 0x34 ,mlen,mlen);
|
||||
|
||||
- if (gverbose) hexdump(&c->data, 0, c->len, 1);
|
||||
+ if (gverbose) hexdump((char*)&c->data, 0, c->len, 1);
|
||||
|
||||
/* Get total size of new SID data */
|
||||
|
||||
@@ -539,7 +539,7 @@
|
||||
cd->members_len = sidlen; /* Update member count in C struct */
|
||||
cd->grp_members = i;
|
||||
|
||||
- if (gverbose) hexdump(&c->data, 0, c->len, 1);
|
||||
+ if (gverbose) hexdump((char*)&c->data, 0, c->len, 1);
|
||||
|
||||
if (!put_buf2val(hdesc, c, 0, g, 0, TPF_VK_EXACT)) {
|
||||
fprintf(stderr,"put_grp_members_sid: could not write back group info in value %s\n",g);
|
||||
90
chntpw.spec
90
chntpw.spec
|
|
@ -1,10 +1,10 @@
|
|||
Name: chntpw
|
||||
# Version is taken from HISTORY.txt
|
||||
Version: 1.00
|
||||
Release: 0.140201%{?dist}
|
||||
Release: 20.140201%{?dist}
|
||||
Summary: Change passwords in Windows SAM files
|
||||
Group: Applications/Engineering
|
||||
License: GPLv2
|
||||
# Automatically converted from old format: GPLv2 - review is highly recommended.
|
||||
License: GPL-2.0-only
|
||||
URL: http://pogostick.net/~pnh/ntpasswd/
|
||||
Source0: http://pogostick.net/~pnh/ntpasswd/chntpw-source-140201.zip
|
||||
Source2: chntpw-README.Dist
|
||||
|
|
@ -14,7 +14,9 @@ Source11: reged.8
|
|||
Source12: sampasswd.8
|
||||
Source13: samusrgrp.8
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: libgcrypt-devel
|
||||
BuildRequires: make
|
||||
|
||||
# Patches sent upstream on 2009-06-08.
|
||||
Patch1: chntpw-140201-get_abs_path.patch
|
||||
|
|
@ -28,6 +30,12 @@ Patch5: chntpw-080526-correct-test-for-failing-open-syscall.patch
|
|||
Patch6: chntpw-110511-detect-failure-to-write-key.patch
|
||||
Patch7: chntpw-110511-reged-no-deref-null.patch
|
||||
|
||||
# Patch derived from Oleg Samarin (RHBZ#1645886)
|
||||
Patch8: chntpw-140201-fix-bogus-errno-use.patch
|
||||
|
||||
# Cast around new GCC error for mismatched pointer arguments
|
||||
Patch9: chntpw-140201-hexdump-pointer-type.patch
|
||||
|
||||
|
||||
%description
|
||||
This is a utility to (re)set the password of any user that has a valid
|
||||
|
|
@ -47,12 +55,14 @@ sed -e 's/\r$//' WinReg.txt > WinReg.txt.eol
|
|||
touch -c -r WinReg.txt WinReg.txt.eol
|
||||
mv WinReg.txt.eol WinReg.txt
|
||||
|
||||
%patch1 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch -P1 -p1
|
||||
%patch -P3 -p1
|
||||
%patch -P4 -p1
|
||||
%patch -P5 -p1
|
||||
%patch -P6 -p1
|
||||
%patch -P7 -p1
|
||||
%patch -P8 -p1
|
||||
%patch -P9 -p1
|
||||
|
||||
|
||||
%build
|
||||
|
|
@ -71,7 +81,6 @@ cp -p %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} \
|
|||
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc GPL.txt LGPL.txt README.txt regedit.txt WinReg.txt HISTORY.txt
|
||||
%doc README.Dist
|
||||
%{_bindir}/chntpw
|
||||
|
|
@ -83,6 +92,67 @@ cp -p %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} \
|
|||
|
||||
|
||||
%changelog
|
||||
* Wed Jul 23 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.00-20.140201
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||
|
||||
* Thu Jan 16 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.00-19.140201
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||
|
||||
* Sat Aug 03 2024 Conrad Meyer <cemeyer@uw.edu> - 1.00-18.140201
|
||||
- Add fix for rhbz# 2300591.
|
||||
|
||||
* Mon Jul 29 2024 Miroslav Suchý <msuchy@redhat.com> - 1.00-17.140201
|
||||
- convert license to SPDX
|
||||
|
||||
* Wed Jul 17 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.00-16.140201
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||
|
||||
* Tue Jan 23 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.00-15.140201
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.00-14.140201
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.00-13.140201
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
* Wed Jan 18 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.00-12.140201
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
* Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.00-11.140201
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.00-10.140201
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.00-9.140201
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.00-8.140201
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.00-7.140201
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.00-6.140201
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.00-5.140201
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Sat Jun 22 2019 Conrad Meyer <cemeyer@uw.edu> - 1.00-4.140201
|
||||
- Add fix for rhbz# 1645886. Thanks Oleg Samarin.
|
||||
|
||||
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.00-3.140201
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Thu Jul 19 2018 Conrad Meyer <cemeyer@uw.edu> - 1.00-2.140201
|
||||
- Add missing GCC BR after removal from buildroot
|
||||
- Unfuck version number bumped incorrectly by RE
|
||||
|
||||
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.00-1.140201
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
* Mon Jul 02 2018 Conrad Meyer <cemeyer@uw.edu> - 1.00-0.140201
|
||||
- Update to latest upstream, 1.00 / 140201
|
||||
- Rebase patches as needed
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue