summaryrefslogtreecommitdiffstats
path: root/pw/pw_user.c
diff options
context:
space:
mode:
authorPeter Grehan <grehan@FreeBSD.org>2012-04-26 07:52:28 +0000
committerPeter Grehan <grehan@FreeBSD.org>2012-04-26 07:52:28 +0000
commitf97bcb4e460722f7004427d2020e6b6d94fbc609 (patch)
tree5035f1ccf54c0bebd56667338e0c4dcc9cab8257 /pw/pw_user.c
parentfe07f20cf88bdc2031c18e58a3525f7abce95292 (diff)
parentd9bb96a8cb71e217e189e71c0b3444b5751143f4 (diff)
downloadpw-darwin-f97bcb4e460722f7004427d2020e6b6d94fbc609.tar.gz
pw-darwin-f97bcb4e460722f7004427d2020e6b6d94fbc609.tar.zst
pw-darwin-f97bcb4e460722f7004427d2020e6b6d94fbc609.zip
IFC @ r234692
sys/amd64/include/cpufunc.h sys/amd64/include/fpu.h sys/amd64/amd64/fpu.c sys/amd64/vmm/vmm.c - Add API to allow vmm FPU state init/save/restore. FP stuff discussed with: kib
Diffstat (limited to 'pw/pw_user.c')
-rw-r--r--pw/pw_user.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/pw/pw_user.c b/pw/pw_user.c
index 0001a41..b59789c 100644
--- a/pw/pw_user.c
+++ b/pw/pw_user.c
@@ -1028,6 +1028,7 @@ pw_pwcrypt(char *password)
{
int i;
char salt[SALTSIZE + 1];
+ char *cryptpw;
static char buf[256];
@@ -1038,7 +1039,10 @@ pw_pwcrypt(char *password)
salt[i] = chars[arc4random_uniform(sizeof(chars) - 1)];
salt[SALTSIZE] = '\0';
- return strcpy(buf, crypt(password, salt));
+ cryptpw = crypt(password, salt);
+ if (cryptpw == NULL)
+ errx(EX_CONFIG, "crypt(3) failure");
+ return strcpy(buf, cryptpw);
}