diff options
| author | Mark Murray <markm@FreeBSD.org> | 2001-03-11 16:37:33 +0000 |
|---|---|---|
| committer | Mark Murray <markm@FreeBSD.org> | 2001-03-11 16:37:33 +0000 |
| commit | 82e377fd1247b70719ef5638603e734cc7d7e53f (patch) | |
| tree | 4a49f7600579bc08145f85faf622e54196d688b9 /usr.bin | |
| parent | 5c1296168babf97c51ff030872cddb7f9857474f (diff) | |
Notes
Diffstat (limited to 'usr.bin')
| -rw-r--r-- | usr.bin/passwd/local_passwd.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.bin/passwd/local_passwd.c b/usr.bin/passwd/local_passwd.c index ccf8bbbb68894..ce2e46beceea7 100644 --- a/usr.bin/passwd/local_passwd.c +++ b/usr.bin/passwd/local_passwd.c @@ -100,7 +100,7 @@ getnewpasswd(pw, nis) #ifdef LOGIN_CAP login_cap_t * lc; #endif - char buf[_PASSWORD_LEN+1], salt[10]; + char buf[_PASSWORD_LEN+1], salt[32]; struct timeval tv; if (!nis) @@ -182,7 +182,11 @@ getnewpasswd(pw, nis) to64(&salt[0], random(), 3); to64(&salt[3], tv.tv_usec, 3); to64(&salt[6], tv.tv_sec, 2); - salt[8] = '\0'; + to64(&salt[8], random(), 5); + to64(&salt[13], random(), 5); + to64(&salt[17], random(), 5); + to64(&salt[22], random(), 5); + salt[27] = '\0'; #endif return (crypt(buf, salt)); } |
