summaryrefslogtreecommitdiff
path: root/security/chntpw
diff options
context:
space:
mode:
Diffstat (limited to 'security/chntpw')
-rw-r--r--security/chntpw/Makefile11
-rw-r--r--security/chntpw/distinfo5
-rw-r--r--security/chntpw/files/patch-chntpw.c24
3 files changed, 19 insertions, 21 deletions
diff --git a/security/chntpw/Makefile b/security/chntpw/Makefile
index 3bf9d4ab0116..5204a3153a78 100644
--- a/security/chntpw/Makefile
+++ b/security/chntpw/Makefile
@@ -2,27 +2,24 @@
# $FreeBSD$
PORTNAME= chntpw
-PORTVERSION= 110511
-PORTREVISION= 2
+PORTVERSION= 140201
CATEGORIES= security sysutils
MASTER_SITES= http://pogostick.net/~pnh/ntpasswd/
DISTNAME= ${PORTNAME}-source-${PORTVERSION}
-MAINTAINER= buganini@gmail.com
+MAINTAINER= ports@FreeBSD.org
COMMENT= Utility to set the password and edit registry on Microsoft NT system
LICENSE= GPLv2
-OPTIONS_DEFINE= DOCS
-
USES= gmake zip ssl
-
BIN_FILES= chntpw cpnt reged
PLIST_FILES= ${BIN_FILES:C|^|bin/|}
PORTDOCS= README.txt WinReg.txt regedit.txt
-
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
+OPTIONS_DEFINE= DOCS
+
post-patch:
@${REINPLACE_CMD} -e '/^CC=/d; /^OSSLPATH=/ s|=.*|=${OPENSSLBASE}|' ${WRKSRC}/Makefile
@${REINPLACE_CMD} -e '/^CFLAGS=/ s| -m32||' ${WRKSRC}/Makefile
diff --git a/security/chntpw/distinfo b/security/chntpw/distinfo
index 07a4f44d11b4..d29284f3f195 100644
--- a/security/chntpw/distinfo
+++ b/security/chntpw/distinfo
@@ -1,2 +1,3 @@
-SHA256 (chntpw-source-110511.zip) = 593514ca8601adb4091d951499b916dfdac2bd34b325d307237fa52ca572b5b7
-SIZE (chntpw-source-110511.zip) = 758936
+TIMESTAMP = 1516608504
+SHA256 (chntpw-source-140201.zip) = 96e20905443e24cba2f21e51162df71dd993a1c02bfa12b1be2d0801a4ee2ccc
+SIZE (chntpw-source-140201.zip) = 1404098
diff --git a/security/chntpw/files/patch-chntpw.c b/security/chntpw/files/patch-chntpw.c
index 59920f7d748d..31e0012a705f 100644
--- a/security/chntpw/files/patch-chntpw.c
+++ b/security/chntpw/files/patch-chntpw.c
@@ -1,6 +1,6 @@
---- chntpw.c.orig 2011-05-11 19:33:56 UTC
+--- chntpw.c.orig 2020-05-05 11:29:42 UTC
+++ chntpw.c
-@@ -142,7 +142,7 @@ void str_to_key(unsigned char *str,unsig
+@@ -155,7 +155,7 @@ void str_to_key(unsigned char *str,unsigned char *key)
for (i=0;i<8;i++) {
key[i] = (key[i]<<1);
}
@@ -9,7 +9,7 @@
}
/*
-@@ -187,16 +187,16 @@ void sid_to_key2(uint32_t sid,unsigned c
+@@ -200,16 +200,16 @@ void sid_to_key2(uint32_t sid,unsigned char deskey[8])
void E1(uchar *k, uchar *d, uchar *out)
{
@@ -30,20 +30,20 @@
+ DES_ecb_encrypt((DES_cblock *)d,(DES_cblock *)out, &ks, DES_ENCRYPT);
}
-
-@@ -504,8 +504,8 @@ char *change_pw(char *buf, int rid, int
- int dontchange = 0;
- struct user_V *v;
-
+ #endif /* DOCRYPTO */
+@@ -343,8 +343,8 @@ char *change_pw(char *buf, int rid, int vlen, int stat
+ int i;
+ char md4[32],lanman[32];
+ char newunipw[34], despw[20], newlanpw[16], newlandes[20];
- des_key_schedule ks1, ks2;
- des_cblock deskey1, deskey2;
+ DES_key_schedule ks1, ks2;
+ DES_cblock deskey1, deskey2;
-
MD4_CTX context;
unsigned char digest[16];
-@@ -623,21 +623,21 @@ char *change_pw(char *buf, int rid, int
-
+ uchar x1[] = {0x4B,0x47,0x53,0x21,0x40,0x23,0x24,0x25};
+@@ -462,21 +462,21 @@ char *change_pw(char *buf, int rid, int vlen, int stat
+ #ifdef DOCRYPTO
/* Get the two decrpt keys. */
sid_to_key1(rid,(unsigned char *)deskey1);
- des_set_key((des_cblock *)deskey1,ks1);
@@ -74,7 +74,7 @@
if (gverbose) {
hexprnt("MD4 hash : ",(unsigned char *)md4,16);
-@@ -705,15 +705,15 @@ char *change_pw(char *buf, int rid, int
+@@ -556,15 +556,15 @@ char *change_pw(char *buf, int rid, int vlen, int stat
if (gverbose) hexprnt("NEW LANMAN hash : ",(unsigned char *)lanman,16);
/* Encrypt the NT md4 password hash as two 8 byte blocks. */