summaryrefslogtreecommitdiff
path: root/sysutils/mkntpwd/files/patch-mkntpwd.c
diff options
context:
space:
mode:
authorGanael LAPLANCHE <martymac@FreeBSD.org>2011-05-18 11:44:14 +0000
committerGanael LAPLANCHE <martymac@FreeBSD.org>2011-05-18 11:44:14 +0000
commit67c12c27b551c4592aa650c77c9131773e3a19f9 (patch)
tree89a8ce161fb4d056f057facd7c50b6a63349758e /sysutils/mkntpwd/files/patch-mkntpwd.c
parentFix RUN_DEPENDS after devel/libccid update. (diff)
Add mkntpwd, a utility to create Samba password hashes
PR: ports/156478 Submitted by: Jyun-Yan You <jyyou at cs.nctu.edu.tw>
Notes
Notes: svn path=/head/; revision=274262
Diffstat (limited to 'sysutils/mkntpwd/files/patch-mkntpwd.c')
-rw-r--r--sysutils/mkntpwd/files/patch-mkntpwd.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/sysutils/mkntpwd/files/patch-mkntpwd.c b/sysutils/mkntpwd/files/patch-mkntpwd.c
new file mode 100644
index 000000000000..0de75bf1e824
--- /dev/null
+++ b/sysutils/mkntpwd/files/patch-mkntpwd.c
@@ -0,0 +1,41 @@
+--- mkntpwd.c.orig 1998-05-12 11:16:07.000000000 +0200
++++ mkntpwd.c 2011-05-17 07:14:19.278025383 +0200
+@@ -24,6 +24,8 @@
+ * SUCH DAMAGE.
+ */
+
++#include <unistd.h>
++
+ #include "mkntpwd.h"
+
+ void str_to_key(unsigned char *,unsigned char *);
+@@ -34,7 +36,7 @@
+ void E_P16(unsigned char *p14,unsigned char *p16);
+
+
+-void main(int argc, char **argv) {
++int main(int argc, char **argv) {
+ extern char *optarg;
+ int c;
+
+@@ -131,7 +133,7 @@
+
+ if (printlan >0) {
+ memset(hashout,'\0',17);
+- E_P16((uchar *)lanpwd,hashout);
++ E_P16((uchar *)lanpwd,(uchar *)hashout);
+ printlanhash(hashout);
+ }
+
+@@ -164,9 +166,9 @@
+ }
+
+ memset(p16,'\0',17);
+- mdfour(p16,hold, uni_len);
++ mdfour(p16,(uchar *)hold, uni_len);
+
+- printlanhash(p16);
++ printlanhash((char *)p16);
+
+ free(p16);
+ free(hold);