[Forensics-changes] [crack] 04/40: Import Debian patch 5.0a-9

Giovani Augusto Ferreira giovani-guest at moszumanska.debian.org
Wed Dec 28 02:47:51 UTC 2016


This is an automated email from the git hooks/post-receive script.

giovani-guest pushed a commit to branch debian
in repository crack.

commit 4d097bee15b775854a66ecbccce304164d35719b
Author: Pawel Wiecek <coven at debian.org>
Date:   Sun Apr 2 22:49:00 2006 +0200

    Import Debian patch 5.0a-9
---
 debian/Crack          | 51 +++++++++++++++++++++++++++++++--------------------
 debian/changelog      |  9 +++++++++
 debian/rules          |  2 +-
 src/libdes/read_pwd.c |  2 +-
 4 files changed, 42 insertions(+), 22 deletions(-)

diff --git a/debian/Crack b/debian/Crack
index bcf3c2d..684f25a 100644
--- a/debian/Crack
+++ b/debian/Crack
@@ -1,6 +1,7 @@
-#!/bin/sh
+#!/bin/bash
 # Wrapper file for Crack
 # written by Javier Fernandez-Sanguino for the Debian GNU/Linux distribution
+# Heavily rewritten by Pawel Wiecek
 # 
 # Licensed under the GNU GPL v2.
 # See /usr/share/doc/common-licenses/GPL
@@ -15,22 +16,32 @@ then
   exit 1
 fi
 
-cd /usr/share/Crack
-MERGED=`tempfile -d run`
-if [ "$1" = "/etc/passwd" -a "$2" = "" ] ;
-then
-# User supplied one argument (hasn't read the instructions :)
-# Check if there is a shadow file
-	if [ -f /etc/shadow ] ; then
-	>$MERGED
-	# Just in case..
-	chmod 600 $MERGED
- 	sh scripts/shadmrg.sv >$MERGED
-	./Crack $MERGED
-	[ -f $MERGED ] && /bin/rm $MERGED
-	else
-	./Crack $*
-	fi
-else
-	./Crack $*
-fi
+CRACKDIR=/usr/share/Crack
+
+# Prepare parameters list expanding any filenames to their canonical names
+unset PARAMS
+declare -a PARAMS
+n=1
+
+while [ "${!n}" != "" ]
+do
+  if [ -f "${!n}" ]
+  then
+    PARAMS[$n]="`readlink -f "${!n}"`"
+    if [ "${PARAMS[$n]}" = "/etc/passwd" -a -f /etc/shadow ]
+    then
+      # Need to merge passwd with shadow...
+      MERGED=`tempfile -d $CRACKDIR/run`
+      >$MERGED
+      chmod 600 $MERGED
+      sh $CRACKDIR/scripts/shadmrg.sv >$MERGED
+      PARAMS[$n]=$MERGED
+    fi
+  else
+    PARAMS[$n]="${!n}"
+  fi
+  ((n++))
+done
+
+cd $CRACKDIR
+./Crack "${PARAMS[@]}"
diff --git a/debian/changelog b/debian/changelog
index 924f5d7..240c9e8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+crack (5.0a-9) unstable; urgency=low
+
+  * Completely rewritten wrapper script to avoid misbehavior for certain
+    parameter combinations (closes: #340453)
+  * Applied patch from Petr Salinger <Petr.Salinger at t-systems.cz> to enable
+    builds on GNU/kFreeBSD (closes: #337428)
+
+ -- Pawel Wiecek <coven at debian.org>  Sun,  2 Apr 2006 22:49:00 +0200
+
 crack (5.0a-8) unstable; urgency=low
 
   * Applied patch from Dann Frazier <dannf at hp.com> to fix problems on 64-bit
diff --git a/debian/rules b/debian/rules
index e1caa91..e09bcf5 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,7 +6,7 @@
 #export DH_VERBOSE=1
 
 # This is the debhelper compatibility version to use.
-export DH_COMPAT=3
+export DH_COMPAT=4
 
 
 
diff --git a/src/libdes/read_pwd.c b/src/libdes/read_pwd.c
index 627c840..0457b84 100644
--- a/src/libdes/read_pwd.c
+++ b/src/libdes/read_pwd.c
@@ -55,7 +55,7 @@
  * TERMIO, TERMIOS, VMS, MSDOS and SGTTY
  */
 
-#if defined(sgi) || defined(__sgi)
+#if defined(sgi) || defined(__sgi) || defined (__GLIBC__)
 #define TERMIOS
 #undef TERMIO
 #undef SGTTY

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/forensics/crack.git



More information about the forensics-changes mailing list