Package: chntpw / 140201-1

Metadata

Package Version Patches format
chntpw 140201-1 3.0 (quilt)

Patch series

view the series file
Patch File delta Description
01_port_to_gcrypt.patch | (download)

Makefile | 18 2 + 16 - 0 !
chntpw.c | 67 67 + 0 - 0 !
2 files changed, 69 insertions(+), 16 deletions(-)

 port to libgcrypt to avoid gpl/openssl incompatibility
 Patch to port the sources to libgcrypt
 Placed in the public domain
04_get_abs_path | (download)

ntreg.c | 1 1 + 0 - 0 !
1 file changed, 1 insertion(+)

 fix absolute path
06_correct_test_open_syscall | (download)

ntreg.c | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 fix code in source
  Fix code that probably is never run since the existing code is totally bogus.
  The condition, !open(...), will almost always be true.  (sole exception is
  when starting a program with stdin initially closed)

07_detect_failure_to_write_key | (download)

ntreg.c | 9 8 + 1 - 0 !
1 file changed, 8 insertions(+), 1 deletion(-)

 detect stream write failure.
08_no_deref_null | (download)

reged.c | 5 5 + 0 - 0 !
1 file changed, 5 insertions(+)

 diagnose a missing hive file name with -e.
09_improve_robustness | (download)

ntreg.c | 20 16 + 4 - 0 !
1 file changed, 16 insertions(+), 4 deletions(-)

 fix issues in code
 The first two were spotted via inspection by Fedora team,
 the third one was added to address an error found using valgrind:
   $ : > j && valgrind ./reged -e j
       ~/w/co/chntpw: 
  ==16084==    by 0x4011E3: main (reged.c:103)
     get_abs_path: Not a 'nk' node!

  * ntreg.c (fmyinput): Don't clobber ibuf[-1] upon NUL input.
  * ntreg.c (convert_string): Don't segfault upon low memory.
  * ntreg.c (openHive): Don't read uninitialized when file is too small.
10_remove_static | (download)

Makefile | 4 2 + 2 - 0 !
1 file changed, 2 insertions(+), 2 deletions(-)

 do not build static files in the makefile, they are not used in debian.
11_improve_documentation | (download)

MANUAL.txt | 149 76 + 73 - 0 !
README.txt | 72 40 + 32 - 0 !
2 files changed, 116 insertions(+), 105 deletions(-)

 fix spelling and grammar mistakes in documentation
12_readonly_filesystem | (download)

ntreg.c | 8 4 + 4 - 0 !
1 file changed, 4 insertions(+), 4 deletions(-)

 fix reading files in read-only filesystems

 chntpw fails to read files from read-only filesystems, despite having some
 logic to handle this:

# chntpw -e /c/Windows/System32/config/SOFTWARE
chntpw version 1.00 140201, (c) Petter N Hagen
openHive(/c/Windows/System32/config/SOFTWARE) failed: Read-only file system, trying read-only
openHive(): read error: : Read-only file system
chntpw: Unable to open/read a hive, exiting..
#

   This is due to using errno as an error checking mechanism; it should only be
   used when one knows a function has failed. This patch fixes this problem. It
   also adds support for the non-fatal EINTR error, and fixes yet another bug
   where the last read size is used in a check instead of the whole file size.

13_write_to_hive | (download)

sampasswd.c | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 write to the hive file
 Enable the experimental function that writes to the HIVE
 the user password

 Patch available at: https://github.com/rescatux/chntpw/commit/dcab306dbf49ace2e38e6874ce46bef10ee604da

Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=803888
14_improve_description | (download)

sampasswd.c | 2 1 + 1 - 0 !
samusrgrp.c | 2 1 + 1 - 0 !
2 files changed, 2 insertions(+), 2 deletions(-)

  fix description and typos in the code 

 Patches available at:
15_added_samunlock_binary | (download)

Makefile | 9 7 + 2 - 0 !
samunlock.c | 248 248 + 0 - 0 !
2 files changed, 255 insertions(+), 2 deletions(-)

 add samunlock binary 
 The samunlock binary lets you unlock or list users.
 This command is suited for scripts and can be run also interactively