summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2021-01-23 18:02:46 -0800
committerOri Bernstein <ori@eigenstate.org>2021-01-23 18:02:46 -0800
commited2b1d5c610f0ff2d49780f69b6343d22f878a63 (patch)
tree9a2ca57396ec45748a6c3170ac8821468f1317ad
parentf164ee6dd9be3f59ae60a6436766cec39892e3c6 (diff)
downloadplan9front-ed2b1d5c610f0ff2d49780f69b6343d22f878a63.tar.xz
upas/fs: fix swapped argument, dead code
With ntlm auth, we were trying to set 0 bytes of the auth struct to its size. The args were clearly swapped. Fix it. While we're here, remove some dead code.
-rw-r--r--sys/src/cmd/upas/fs/imap.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/sys/src/cmd/upas/fs/imap.c b/sys/src/cmd/upas/fs/imap.c
index 85d6d810f..7bcc84477 100644
--- a/sys/src/cmd/upas/fs/imap.c
+++ b/sys/src/cmd/upas/fs/imap.c
@@ -687,8 +687,7 @@ imap4ntlm(Imap *imap)
return "auth_respond failed";
/* prepare NtLmAuthenticate blob */
-
- memset(buf, sizeof buf, 0);
+ memset(buf, 0, sizeof(buf));
p = buf;
ep = p + 8 + 6*8 + 2*4;
q = ep;
@@ -852,14 +851,6 @@ imap4dial(Imap *imap)
return nil;
}
-static void
-imap4hangup(Imap *imap)
-{
- imap4cmd(imap, "logout");
- imap4resp(imap);
- imap4disconnect(imap);
-}
-
/* gmail lies about message sizes */
static ulong
gmaildiscount(Message *m, uvlong o, ulong l)