aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/auth/factotum/p9cr.c
diff options
context:
space:
mode:
authorPetter Rodhelind <petter.rodhelind@gmail.com>2020-01-14 11:41:08 +0100
committerPetter Rodhelind <petter.rodhelind@gmail.com>2020-01-14 11:41:08 +0100
commit02d7aa8915f9c3a3288dab01f321eb94ba219e3b (patch)
treef053238978479e408a2b83571443e132f30586ab /src/cmd/auth/factotum/p9cr.c
parentc0c9d8f883dfd3a7f5a74499d91bb95884b15873 (diff)
parent3d1382b98a502d0c34d5ba2c462396acc515016e (diff)
downloadplan9port-02d7aa8915f9c3a3288dab01f321eb94ba219e3b.tar.gz
plan9port-02d7aa8915f9c3a3288dab01f321eb94ba219e3b.tar.bz2
plan9port-02d7aa8915f9c3a3288dab01f321eb94ba219e3b.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'src/cmd/auth/factotum/p9cr.c')
-rw-r--r--src/cmd/auth/factotum/p9cr.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/cmd/auth/factotum/p9cr.c b/src/cmd/auth/factotum/p9cr.c
index 1c3f21e1..84860d16 100644
--- a/src/cmd/auth/factotum/p9cr.c
+++ b/src/cmd/auth/factotum/p9cr.c
@@ -9,7 +9,7 @@
* S -> C: ok or bad
*
* Note that this is the protocol between factotum and the local
- * program, not between the two factotums. The information
+ * program, not between the two factotums. The information
* exchanged here is wrapped in other protocols by the local
* programs.
*/
@@ -290,6 +290,8 @@ p9crresp(ServerState *s, uchar *resp, int resplen)
Ticket t;
Ticketreq tr;
+ memset(&tr, 0, sizeof tr); // TODO: what should tr be initialized to?
+
if(xiowrite(s->asfd, resp, resplen) != resplen)
return -1;
@@ -317,7 +319,7 @@ p9crresp(ServerState *s, uchar *resp, int resplen)
static int
p9response(char *pw, uchar *chal, uchar *resp)
-{
+{
char key[DESKEYLEN];
uchar buf[8];
ulong x;
@@ -338,7 +340,7 @@ static int
vncresponse(char *pw, uchar *chal, uchar *resp)
{
DESstate des;
-
+
memmove(resp, chal, MAXCHAL);
setupDESstate(&des, 0, nil); // XXX put key in for 0
desECBencrypt(resp, MAXCHAL, &des);