diff options
| author | Peter Grehan <grehan@FreeBSD.org> | 2012-04-26 07:52:28 +0000 |
|---|---|---|
| committer | Peter Grehan <grehan@FreeBSD.org> | 2012-04-26 07:52:28 +0000 |
| commit | 08f2d2c14972fd8214be8e62704b0a8714ae15a9 (patch) | |
| tree | 428218f4293355ba7d1e99722d1676fbde7e6e10 /pw/pw_user.c | |
| parent | de100da053802312c0bbcd80656737e7ad38e106 (diff) | |
| parent | 6731210db20a50877485e02554de9a6e3f20a0b7 (diff) | |
| download | pw-darwin-08f2d2c14972fd8214be8e62704b0a8714ae15a9.tar.gz pw-darwin-08f2d2c14972fd8214be8e62704b0a8714ae15a9.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.c | 6 |
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); } |
