diff options
author | Jason King <jasonbking@users.noreply.github.com> | 2020-02-12 10:49:55 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-12 10:49:55 -0600 |
commit | a3d96fd107016605bdb97c102540be4a5e21a25a (patch) | |
tree | 5f69bef4eaafbddfe9662b9813c475344a83edc5 /usr/src/cmd/bhyve/rfb.c | |
parent | 4a3a6d5942d9e03f8754c292b16babb3c92fd36d (diff) | |
download | illumos-joyent-release-20200213.tar.gz |
OS-8108 Support vnc password for BHYVE (#256)release-20200213
Reviewed by: Mike Zeller <mike.zeller@joyent.com>
Reviewed by: Brian Bennett <brian.bennett@joyent.com>
Approved by: Mike Zeller <mike.zeller@joyent.com>
Diffstat (limited to 'usr/src/cmd/bhyve/rfb.c')
-rw-r--r-- | usr/src/cmd/bhyve/rfb.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr/src/cmd/bhyve/rfb.c b/usr/src/cmd/bhyve/rfb.c index 39ea1611f9..f9cc9ed9c3 100644 --- a/usr/src/cmd/bhyve/rfb.c +++ b/usr/src/cmd/bhyve/rfb.c @@ -3,7 +3,7 @@ * * Copyright (c) 2015 Tycho Nightingale <tycho.nightingale@pluribusnetworks.com> * Copyright (c) 2015 Leon Dang - * Copyright 2018 Joyent, Inc. + * Copyright 2020 Joyent, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -803,7 +803,7 @@ rfb_handle(struct rfb_softc *rc, int cfd) * The client then sends the resulting 16-bytes response. */ #ifndef NO_OPENSSL - strncpy(keystr, rc->password, PASSWD_LENGTH); + strncpy((char *)keystr, rc->password, PASSWD_LENGTH); /* VNC clients encrypts the challenge with all the bit fields * in each byte of the password mirrored. @@ -838,7 +838,8 @@ rfb_handle(struct rfb_softc *rc, int cfd) &ks, DES_ENCRYPT); if (memcmp(crypt_expected, buf, AUTH_LENGTH) != 0) { - message = "Auth Failed: Invalid Password."; + message = + (unsigned char *)"Auth Failed: Invalid Password."; sres = htonl(1); } else sres = 0; |