aboutsummaryrefslogtreecommitdiff
path: root/sys/netsmb/smb_crypt.c
diff options
context:
space:
mode:
authorAlfred Perlstein <alfred@FreeBSD.org>2003-01-21 08:56:16 +0000
committerAlfred Perlstein <alfred@FreeBSD.org>2003-01-21 08:56:16 +0000
commit44956c9863dc03344b03bdf6a83acf4e743f8e50 (patch)
treef16a2fb9fa7a7fbc4c19e981d278d5f6eb53234d /sys/netsmb/smb_crypt.c
parent1326e03f7f8018164ece91fc0a3f15f9c65ff64a (diff)
downloadsrc-44956c9863dc03344b03bdf6a83acf4e743f8e50.tar.gz
src-44956c9863dc03344b03bdf6a83acf4e743f8e50.zip
Notes
Diffstat (limited to 'sys/netsmb/smb_crypt.c')
-rw-r--r--sys/netsmb/smb_crypt.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/netsmb/smb_crypt.c b/sys/netsmb/smb_crypt.c
index 8e35207eb64f..a6369324d794 100644
--- a/sys/netsmb/smb_crypt.c
+++ b/sys/netsmb/smb_crypt.c
@@ -73,7 +73,7 @@ smb_E(const u_char *key, u_char *data, u_char *dest)
kk[5] = key[4] << 3 | (key[5] >> 5 & 0xfe);
kk[6] = key[5] << 2 | (key[6] >> 6 & 0xfe);
kk[7] = key[6] << 1;
- ksp = malloc(sizeof(des_key_schedule), M_SMBTEMP, M_WAITOK);
+ ksp = malloc(sizeof(des_key_schedule), M_SMBTEMP, 0);
des_set_key((des_cblock *)kk, *ksp);
des_ecb_encrypt((des_cblock *)data, (des_cblock *)dest, *ksp, 1);
free(ksp, M_SMBTEMP);
@@ -87,7 +87,7 @@ smb_encrypt(const u_char *apwd, u_char *C8, u_char *RN)
#ifdef NETSMBCRYPTO
u_char *p, *P14, *S21;
- p = malloc(14 + 21, M_SMBTEMP, M_WAITOK);
+ p = malloc(14 + 21, M_SMBTEMP, 0);
bzero(p, 14 + 21);
P14 = p;
S21 = p + 14;
@@ -120,12 +120,12 @@ smb_ntencrypt(const u_char *apwd, u_char *C8, u_char *RN)
int len;
len = strlen(apwd);
- unipwd = malloc((len + 1) * sizeof(u_int16_t), M_SMBTEMP, M_WAITOK);
+ unipwd = malloc((len + 1) * sizeof(u_int16_t), M_SMBTEMP, 0);
/*
* S21 = concat(MD4(U(apwd)), zeros(5));
*/
smb_strtouni(unipwd, apwd);
- ctxp = malloc(sizeof(MD4_CTX), M_SMBTEMP, M_WAITOK);
+ ctxp = malloc(sizeof(MD4_CTX), M_SMBTEMP, 0);
MD4Init(ctxp);
MD4Update(ctxp, (u_char*)unipwd, len * sizeof(u_int16_t));
free(unipwd, M_SMBTEMP);