9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] authentication protocol question
@ 2001-11-01 19:01 presotto
  0 siblings, 0 replies; 2+ messages in thread
From: presotto @ 2001-11-01 19:01 UTC (permalink / raw)
  To: 9fans

The race is on the client side.  There can be a number
of simultaneous attaches through the same communications
channel.  Nothing synchronizes them so the authentications
can come out of order.  The important part is that the
id's aren't reused.


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

* [9fans] authentication protocol question
@ 2001-11-01 18:57 Mike Haertel
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Haertel @ 2001-11-01 18:57 UTC (permalink / raw)
  To: 9fans

I am puzzled by the following code in /sys/src/fs/port/auth.c.

	/*
	 *  the id must be in a valid range.  the range is specified by a
	 *  lower bount (idoffset) and a bit vector (idvec) where a
	 *  bit set to 1 means unusable
	 */
	lock(&cp->idlock);
	x = a.id - cp->idoffset;
	bit = 1<<x;
	if(x < 0 || x > 31 || (bit&cp->idvec)){
		unlock(&cp->idlock);
print("id out of range: idoff %ld idvec %lux id %ld\n", cp->idoffset, cp->idvec, a.id);
		return 0;
	}
	cp->idvec |= bit;

 From the auth(6) man page, I had the impression that the id
field was supposed to be a simple sequence number.  Is there a
race in some client in which the order of the sequence numbers
can get rearranged?  What is the race?


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

end of thread, other threads:[~2001-11-01 19:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-01 19:01 [9fans] authentication protocol question presotto
  -- strict thread matches above, loose matches on Subject: below --
2001-11-01 18:57 Mike Haertel

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