9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] some thoughts about auth*
@ 2002-11-07  2:42 presotto
  0 siblings, 0 replies; 5+ messages in thread
From: presotto @ 2002-11-07  2:42 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 280 bytes --]

There used to be a key for connecting to other resources and
one for letting people log onto the console so that they could
use it (for cpu and file servers).  The latter was the authkey
and we eventually gave up on the function altogether.  The naming
is hokey, I'm to blame.

[-- Attachment #2: Type: message/rfc822, Size: 2112 bytes --]

From: "Roman V. Shaposhnick" <vugluskr@unicorn.math.spbu.ru>
To: 9fans@cse.psu.edu
Subject: [9fans] some thoughts about auth*
Date: Thu, 7 Nov 2002 03:25:33 +0300
Message-ID: <20021107032533.A30255@unicorn.math.spbu.ru>

1. Isn't it strange that getauthkey.c:getauthkey actually
   returns .machkey ? Is there any historical reason for
   it to be getauthkey() especially when there is a
   field in Nvrsafe called .authkey ?

2. I'm not exactly sure that I understand why Nvrsafe has
   this .authkey member in it. The only place where it is
   being used by the regular Plan9, not a dedicated Plan9
   FS is in cmd/disk/kfs/auth.c which doesn't seem to make
   much sense, when nobody sets it up.

   As a matter of fact, I was able to spot it, only because
   in my particular case auth/wrkey *always* sets it to
   'roman' which is honorable, but very weird :)

All in all, I'd be grateful for any insights or explanations.

Thanks in advance,
Roman.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] some thoughts about auth*
       [not found] <fce4571861a826ddf4677ec3cecbe995@plan9.bell-labs.com>
@ 2002-11-12 17:37 ` Roman V. Shaposhnick
  0 siblings, 0 replies; 5+ messages in thread
From: Roman V. Shaposhnick @ 2002-11-12 17:37 UTC (permalink / raw)
  To: 9fans

On Fri, Nov 08, 2002 at 08:13:57AM -0500, presotto@plan9.bell-labs.com wrote:
> Since they have the same contents, perhaps we can change both
> fs's to look in the same place?

  That'll be splendid! And not too hard ( judging from greping through
  source tree ).

Thanks,
Roman.

P.S. With .authkey gone, there is even no much need to change the name
'getauthkey'.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] some thoughts about auth*
  2002-11-07 19:47 Richard Miller
@ 2002-11-08  2:56 ` Roman V. Shaposhnick
  0 siblings, 0 replies; 5+ messages in thread
From: Roman V. Shaposhnick @ 2002-11-08  2:56 UTC (permalink / raw)
  To: 9fans

On Thu, Nov 07, 2002 at 07:47:36PM +0000, Richard Miller wrote:
> "Roman V. Shaposhnick" <vugluskr@unicorn.math.spbu.ru>said:
> While looking into this, I found another error in the 3e->4e
> transition of the kfs network support.  If you want 3e clients
> to be able to mount a kfs exported by a 4e cpu server, the following
> changes appear to be necessary:
>
> /sys/src/cmd/disk/kfs/9p1.c:72 d ./9p1.c:71
> < 	memmove(ou->chal, cp->chal, sizeof(ou->chal));
> /sys/src/cmd/disk/kfs/9p1.c:73 a ./9p1.c:73
> > 		memset(ou->chal, 0, sizeof(ou->chal));
> /sys/src/cmd/disk/kfs/9p1.c:76 a ./9p1.c:77
> > 		memmove(ou->chal, cp->chal, sizeof(ou->chal));
>
> /sys/src/cmd/disk/kfs/auth.c:61 c ./auth.c:61
> < 	convM2T(in->ticket, &t, nvr.authkey);
> ---
> > 	convM2T(in->ticket, &t, nvr.machkey);


That's exactly what I had in mind but was afraid to suggest :). Well,
with these changes in mind now there is absolutely no place in
Plan9 sources ( modulo stand alone fs ) where nvr.authkey can be found.
Of course I understand that asking for ditching nvr.authkey from Nvrsafe is
too much to ask, but it might be reasonable to mark it as deprecated in
a header file. That way, people will be much less likely to be confused
in the future.

How about that ?

Thanks,
Roman.

P.S. Is second declaration of the nvr in the disk/kfs/auth.c at line
35 really necessary ? Or is it just copy'n'paste artifact ?


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] some thoughts about auth*
@ 2002-11-07 19:47 Richard Miller
  2002-11-08  2:56 ` Roman V. Shaposhnick
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Miller @ 2002-11-07 19:47 UTC (permalink / raw)
  To: 9fans

"Roman V. Shaposhnick" <vugluskr@unicorn.math.spbu.ru>said:
> 2. I'm not exactly sure that I understand why Nvrsafe has
>    this .authkey member in it. The only place where it is
>    being used by the regular Plan9, not a dedicated Plan9
>    FS is in cmd/disk/kfs/auth.c which doesn't seem to make
>    much sense, when nobody sets it up.

and presotto@plan9.bell-labs.com replied:
> There used to be a key for connecting to other resources and
> one for letting people log onto the console so that they could
> use it (for cpu and file servers).  The latter was the authkey
> and we eventually gave up on the function altogether.  The naming
> is hokey, I'm to blame.

However, I'm to blame for using authkey as the place to stash the
authentication key in kfs.  In the 3rd edition kfs it was
read in from #c/key.  In 4th edition there's no #c/key, so the
whole Nvrsafe structure is read from nvram (or simulated nvram on
a disk partition or floppy), and therefore kfs should now be
using machkey.  (authkey will be empty unless your nvram is left
over from a 3rd edition ugrade.)

While looking into this, I found another error in the 3e->4e
transition of the kfs network support.  If you want 3e clients
to be able to mount a kfs exported by a 4e cpu server, the following
changes appear to be necessary:

/sys/src/cmd/disk/kfs/9p1.c:72 d ./9p1.c:71
< 	memmove(ou->chal, cp->chal, sizeof(ou->chal));
/sys/src/cmd/disk/kfs/9p1.c:73 a ./9p1.c:73
> 		memset(ou->chal, 0, sizeof(ou->chal));
/sys/src/cmd/disk/kfs/9p1.c:76 a ./9p1.c:77
> 		memmove(ou->chal, cp->chal, sizeof(ou->chal));

/sys/src/cmd/disk/kfs/auth.c:61 c ./auth.c:61
< 	convM2T(in->ticket, &t, nvr.authkey);
---
> 	convM2T(in->ticket, &t, nvr.machkey);



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [9fans] some thoughts about auth*
@ 2002-11-07  0:25 Roman V. Shaposhnick
  0 siblings, 0 replies; 5+ messages in thread
From: Roman V. Shaposhnick @ 2002-11-07  0:25 UTC (permalink / raw)
  To: 9fans

1. Isn't it strange that getauthkey.c:getauthkey actually
   returns .machkey ? Is there any historical reason for
   it to be getauthkey() especially when there is a
   field in Nvrsafe called .authkey ?

2. I'm not exactly sure that I understand why Nvrsafe has
   this .authkey member in it. The only place where it is
   being used by the regular Plan9, not a dedicated Plan9
   FS is in cmd/disk/kfs/auth.c which doesn't seem to make
   much sense, when nobody sets it up.

   As a matter of fact, I was able to spot it, only because
   in my particular case auth/wrkey *always* sets it to
   'roman' which is honorable, but very weird :)

All in all, I'd be grateful for any insights or explanations.

Thanks in advance,
Roman.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-11-12 17:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-07  2:42 [9fans] some thoughts about auth* presotto
     [not found] <fce4571861a826ddf4677ec3cecbe995@plan9.bell-labs.com>
2002-11-12 17:37 ` Roman V. Shaposhnick
  -- strict thread matches above, loose matches on Subject: below --
2002-11-07 19:47 Richard Miller
2002-11-08  2:56 ` Roman V. Shaposhnick
2002-11-07  0:25 Roman V. Shaposhnick

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).