Shortening a passphrase caused wrong authentication key to be used.
Fix this in a FreeBSD and OpenBSD compatible way. MFC after: 3 days
This commit is contained in:
parent
2eeaf93408
commit
440ff1b90d
@ -96,6 +96,7 @@ setcarp_passwd(const char *val, int d, int s, const struct afswtch *afp)
|
||||
if (ioctl(s, SIOCGVH, (caddr_t)&ifr) == -1)
|
||||
err(1, "SIOCGVH");
|
||||
|
||||
memset(carpr.carpr_key, 0, sizeof(carpr.carpr_key));
|
||||
/* XXX Should hash the password into the key here, perhaps? */
|
||||
strlcpy(carpr.carpr_key, val, CARP_KEY_LEN);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user