summaryrefslogtreecommitdiffstats
path: root/sys/netsmb/smb_crypt.c
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>2003-01-21 08:56:16 +0000
committeralfred <alfred@FreeBSD.org>2003-01-21 08:56:16 +0000
commitbf8e8a6e8f0bd9165109f0a258730dd242299815 (patch)
treef16a2fb9fa7a7fbc4c19e981d278d5f6eb53234d /sys/netsmb/smb_crypt.c
parent2180deee00350fff613a1d1d1328eddc4c0ba9c8 (diff)
downloadFreeBSD-src-bf8e8a6e8f0bd9165109f0a258730dd242299815.zip
FreeBSD-src-bf8e8a6e8f0bd9165109f0a258730dd242299815.tar.gz
Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.
Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
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 8e35207..a636932 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);
OpenPOWER on IntegriCloud