[debian-edu-commits] debian-edu/pkg-team/ 02/02: debian/patches: Add 1022_add-b-switch-to-mkntpasswd-script.patch. Support creation of NT/LM hashes from base64 encoded password string.

Mike Gabriel sunweaver at debian.org
Fri Jan 29 08:46:04 UTC 2016


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

sunweaver pushed a commit to branch master
in repository gosa.

commit d2f6b7f60e0913bb2235f84bedf5891fa899858c
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Fri Jan 29 09:45:50 2016 +0100

    debian/patches: Add 1022_add-b-switch-to-mkntpasswd-script.patch. Support creation of NT/LM hashes from base64 encoded password string.
---
 .../1022_add-b-switch-to-mkntpasswd-script.patch   | 30 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 31 insertions(+)

diff --git a/debian/patches/1022_add-b-switch-to-mkntpasswd-script.patch b/debian/patches/1022_add-b-switch-to-mkntpasswd-script.patch
new file mode 100644
index 0000000..4bfde88
--- /dev/null
+++ b/debian/patches/1022_add-b-switch-to-mkntpasswd-script.patch
@@ -0,0 +1,30 @@
+--- a/gosa-core/bin/mkntpasswd
++++ b/gosa-core/bin/mkntpasswd
+@@ -1,10 +1,23 @@
+-#!/bin/sh
+-if [ $# -ne 1 ]; then
+-	echo "Usage: mkntpwd <password>"
++#!/bin/bash
++
++set -x
++
++if [ $# -ne 1 ] && [ $# -ne 2 ]; then
++	echo "Usage: mkntpwd [-b] <password>"
+ 	exit 1
+ fi
+ 
++if [ "$1" = "-b" ]; then
++    shift;
++    b64_encoded_pw=true
++fi
++
++
+ # Render hash using perl
+-perl -MCrypt::SmbHash -e "ntlmgen \"\$ARGV[0]\", \$lm, \$nt; print \"\${lm}:\${nt}\n\";" "$1"
++if [ -n "$b64_encoded_pw" ]; then
++	perl -MCrypt::SmbHash -MMIME::Base64 -e "ntlmgen decode_base64(\"\$ARGV[0]\"), \$lm, \$nt; print \"\$lm:\$nt\";" "$1"
++else
++	perl -MCrypt::SmbHash -MMIME::Base64 -e "ntlmgen \"\$ARGV[0]\", \$lm, \$nt; print \"\$lm:\$nt\";" "$1"
++fi
+ 
+ exit 0
diff --git a/debian/patches/series b/debian/patches/series
index b867acc..4283d12 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -26,6 +26,7 @@
 1019_fix-various-typos.patch
 1020_ob-fixes.patch
 1021_disable-sorting-in-DHCP-section-lists.patch
+1022_add-b-switch-to-mkntpasswd-script.patch
 2001_fix-smarty-location.patch
 2002_fix-template-location.patch
 2003_fix-class-mapping.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/pkg-team/gosa.git



More information about the debian-edu-commits mailing list