From fa325e9b42b0bdfb48857d1958d9fb7ceac55151 Mon Sep 17 00:00:00 2001 From: Dan Cross Date: Fri, 10 Jan 2020 14:44:21 +0000 Subject: Trivial changes: whitespace and modes. Remote whitespace at the ends of lines. Remove blank lines from the ends of files. Change modes on source files so that they are not executable. Signed-off-by: Dan Cross --- src/cmd/auth/factotum/p9cr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/cmd/auth/factotum/p9cr.c') diff --git a/src/cmd/auth/factotum/p9cr.c b/src/cmd/auth/factotum/p9cr.c index 1c3f21e1..4f181e98 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. */ @@ -317,7 +317,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 +338,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); -- cgit v1.2.3 From fafa622a5bdf71adfbb4334541c3b65f29c89ca9 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Sun, 12 Jan 2020 15:05:40 -0500 Subject: all: fix or silence various gcc warnings As usual, gcc finds some real problems but also reports a ton of noise. Fix the problems and quiet the noise. --- src/cmd/auth/factotum/p9cr.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/cmd/auth/factotum/p9cr.c') diff --git a/src/cmd/auth/factotum/p9cr.c b/src/cmd/auth/factotum/p9cr.c index 4f181e98..84860d16 100644 --- a/src/cmd/auth/factotum/p9cr.c +++ b/src/cmd/auth/factotum/p9cr.c @@ -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; -- cgit v1.2.3