diff options
author | Ganael LAPLANCHE <martymac@FreeBSD.org> | 2011-05-18 11:44:14 +0000 |
---|---|---|
committer | Ganael LAPLANCHE <martymac@FreeBSD.org> | 2011-05-18 11:44:14 +0000 |
commit | 67c12c27b551c4592aa650c77c9131773e3a19f9 (patch) | |
tree | 89a8ce161fb4d056f057facd7c50b6a63349758e /sysutils/mkntpwd | |
parent | f817446e0f3c63b9376f5f2b35cdb930d66ce083 (diff) | |
download | ports-67c12c27b551c4592aa650c77c9131773e3a19f9.tar.gz ports-67c12c27b551c4592aa650c77c9131773e3a19f9.zip |
Notes
Diffstat (limited to 'sysutils/mkntpwd')
-rw-r--r-- | sysutils/mkntpwd/Makefile | 27 | ||||
-rw-r--r-- | sysutils/mkntpwd/distinfo | 2 | ||||
-rw-r--r-- | sysutils/mkntpwd/files/patch-Makefile | 51 | ||||
-rw-r--r-- | sysutils/mkntpwd/files/patch-md4.c | 11 | ||||
-rw-r--r-- | sysutils/mkntpwd/files/patch-mkntpwd.c | 41 | ||||
-rw-r--r-- | sysutils/mkntpwd/pkg-descr | 3 |
6 files changed, 135 insertions, 0 deletions
diff --git a/sysutils/mkntpwd/Makefile b/sysutils/mkntpwd/Makefile new file mode 100644 index 000000000000..5076ab062a15 --- /dev/null +++ b/sysutils/mkntpwd/Makefile @@ -0,0 +1,27 @@ +# New ports collection makefile for: mkntpwd +# Date created: 2011-04-18 +# Whom: Jyun-Yan You <jyyou@cs.nctu.edu.tw> +# +# $FreeBSD$ +# + +PORTNAME= mkntpwd +PORTVERSION= 1.0 +CATEGORIES= sysutils net +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} +MASTER_SITE_SUBDIR= ldaputils/Contrib/mkntpwd +DISTNAME= ${PORTNAME} + +MAINTAINER= pcTA@cs.nctu.edu.tw +COMMENT= A utility to create Samba password hashes + +NO_WRKSUBDIR= yes +PLIST_FILES= bin/mkntpwd + +LICENSE= GPLv2 BSD +LICENSE_COMB= multi + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/mkntpwd ${PREFIX}/bin + +.include <bsd.port.mk> diff --git a/sysutils/mkntpwd/distinfo b/sysutils/mkntpwd/distinfo new file mode 100644 index 000000000000..69efcb414dbc --- /dev/null +++ b/sysutils/mkntpwd/distinfo @@ -0,0 +1,2 @@ +SHA256 (mkntpwd.tar.gz) = 29a6769ee30e8cf2dda46fbf6b2d772d1d03e3b2760c501325f35098de25e4a2 +SIZE (mkntpwd.tar.gz) = 21810 diff --git a/sysutils/mkntpwd/files/patch-Makefile b/sysutils/mkntpwd/files/patch-Makefile new file mode 100644 index 000000000000..f52b10cd6e9f --- /dev/null +++ b/sysutils/mkntpwd/files/patch-Makefile @@ -0,0 +1,51 @@ +--- Makefile.orig 1998-05-11 16:47:09.000000000 +0200 ++++ Makefile 2011-05-16 18:15:48.391100964 +0200 +@@ -2,15 +2,15 @@ + + # C compiler + #CC=cc +-CC=gcc ++CC?=gcc + + # Uncomment the following to add symbols to the code for debugging +-DEBUG=-g -Wall -D_DEBUG ++#DEBUG=-g -Wall -D_DEBUG + #DEBUG=-D_DEBUG + + # Optimization for the compiler + #OPTIMIZE= +-OPTIMIZE=-O2 ++#OPTIMIZE=-O2 + + # Choose your architecture + # note that if you are on a big-endian machine like SUN's +@@ -18,9 +18,9 @@ + # the correct order yet. You're on your own right now. + # + # FreeBSD +-ARCH=-DMPU8086 +-STATIC= +-XLIBS= ++#ARCH=-DMPU8086 ++#STATIC= ++#XLIBS= + # + # SUNOS + #ARCH=-DBIGENDIAN +@@ -47,12 +47,12 @@ + #OPTIMIZE= + #XLIBS= + +-CFLAGS= $(DEBUG) $(OPTIMIZE) $(ARCH) $(VISUAL) $(PERMUTE) $(STATIC) ++#CFLAGS= $(DEBUG) $(OPTIMIZE) $(ARCH) $(VISUAL) $(PERMUTE) $(STATIC) + +-OBJS = getopt.o md4.o mkntpwd.o smbdes.o ++OBJS = md4.o mkntpwd.o smbdes.o + +-lc: $(OBJS) +- $(CC) $(CFLAGS) $(XLIBS) -o mkntpwd $(OBJS) ++all: $(OBJS) ++ $(CC) $(CFLAGS) -o mkntpwd $(OBJS) + + clean: + rm -f core *.o mkntpwd diff --git a/sysutils/mkntpwd/files/patch-md4.c b/sysutils/mkntpwd/files/patch-md4.c new file mode 100644 index 000000000000..802f242d81dc --- /dev/null +++ b/sysutils/mkntpwd/files/patch-md4.c @@ -0,0 +1,11 @@ +--- md4.c.orig 2011-05-16 18:18:54.288522284 +0200 ++++ md4.c 2011-05-16 18:19:21.930002696 +0200 +@@ -25,6 +25,8 @@ + It assumes that a int is at least 32 bits long + */ + ++#include <string.h> ++ + typedef unsigned int uint32; + + static uint32 A, B, C, D; 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); diff --git a/sysutils/mkntpwd/pkg-descr b/sysutils/mkntpwd/pkg-descr new file mode 100644 index 000000000000..f1bdf60fe241 --- /dev/null +++ b/sysutils/mkntpwd/pkg-descr @@ -0,0 +1,3 @@ +A utility to create Samba password hashes + +WWW: http://sourceforge.net/projects/ldaputils/ |