From: Yaroslav <yarikos@gmail.com>
To: 9fans@9fans.net
Subject: [9fans] nfactotum: mschap fix
Date: Fri, 30 Mar 2012 18:24:52 +0300 [thread overview]
Message-ID: <CAG3N4d_mEkM2CeEQ-WhqKmK2_WbJz6X_N2JQkaR6QMRtThkw_w@mail.gmail.com> (raw)
Forwarding it to the list so people don't bother to debug themselves.
It's tested with cifs and a local change which enables upas/fs to do
IMAP with NTLM auth.
---------- Forwarded message ----------
From: Yaroslav <yarikos@gmail.com>
Date: 2012/3/30
Subject: Re: [9fans] SSHv2
To: erik quanstrom <quanstro@quanstro.net>
2012/3/30 erik quanstrom <quanstro@quanstro.net>:
> On Fri Mar 30 09:48:50 EDT 2012, yarikos@gmail.com wrote:
>> 2012/3/30 erik quanstrom <quanstro@quanstro.net>:
>> > what's the basis for this claim? it might be broken, since we don't use it
>> > much, but it's not missing.
>>
>> Yes, sorry, I've meant it's broken; details follow.
>
> try pulling a new copy.
>
> - erik
There are phases mismatch between factotum's chapconv() and libauth's
auth_respond(). I've checked plan9port - it has identical problem.
Patch which fixes it follows:
term% diff -c /n/sources/contrib/quanstro/root/sys/src/cmd/auth/factotum/chap.c
/sys/src/cmd/auth/factotum/chap.c
/n/sources/contrib/quanstro/root/sys/src/cmd/auth/factotum/chap.c:120,125
- /sys/src/cmd/auth/factotum/chap.c:120,126
ret = -1;
chal = nil;
+ res = nil;
k = nil;
attr = c->attr;
/n/sources/contrib/quanstro/root/sys/src/cmd/auth/factotum/chap.c:153,166
- /sys/src/cmd/auth/factotum/chap.c:154,163
c->state = "read challenge";
if((nchal = convreadm(c, (char**)(void*)&chal)) < 0)
goto out;
- if(astype == AuthMSchap && nchal != MSchallen)
- c->state = "write user";
if((user = strfindattr(k->attr, "user")) == nil){
werrstr("key has no user (cannot happen?)");
goto out;
}
- if(convprint(c, "%s", user) < 0)
- goto out;
c->state = "write response";
if((pw = strfindattr(k->privattr, "!password")) == nil){
--
- Yaroslav
next reply other threads:[~2012-03-30 15:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-30 15:24 Yaroslav [this message]
2012-03-30 16:37 ` Lucio De Re
[not found] <CAG3N4d_mEkM2CeEQ-WhqKmK2_WbJz6X_N2JQkaR6QMRtThkw_w@mail.gmail.c>
2012-03-30 15:53 ` erik quanstrom
2012-03-30 16:11 ` yaroslav
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAG3N4d_mEkM2CeEQ-WhqKmK2_WbJz6X_N2JQkaR6QMRtThkw_w@mail.gmail.com \
--to=yarikos@gmail.com \
--cc=9fans@9fans.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).