summaryrefslogtreecommitdiff
path: root/security/chntpw/files/patch-chntpw.c
diff options
context:
space:
mode:
authorBen Woods <woodsb02@FreeBSD.org>2020-05-05 11:53:34 +0000
committerBen Woods <woodsb02@FreeBSD.org>2020-05-05 11:53:34 +0000
commitdce20e8a785ab288488891467d8e9cd074d9680e (patch)
tree1c839f8516a7ace71d383f38efd4cc2a33f74850 /security/chntpw/files/patch-chntpw.c
parent- Update to 0.39 (diff)
security/chntpw: Update to 140201
- Reset maintainer - Re-format patch to apply cleanly - pet portlint PR: 220969 Submitted by: Walter Schwarzenfeld <w.schwarzenfeld@utanet.at> Reported by: woodsb02 Approved by: buganini@gmail.com (ex maintainer)
Notes
Notes: svn path=/head/; revision=534073
Diffstat (limited to 'security/chntpw/files/patch-chntpw.c')
-rw-r--r--security/chntpw/files/patch-chntpw.c24
1 files changed, 12 insertions, 12 deletions
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. */