From: Mike Haertel <mike@ducky.net>
To: 9fans@cse.psu.edu
Subject: [9fans] authentication protocol question
Date: Thu, 1 Nov 2001 10:57:09 -0800 [thread overview]
Message-ID: <200111011857.fA1Iv9701688@ducky.net> (raw)
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?
next reply other threads:[~2001-11-01 18:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-01 18:57 Mike Haertel [this message]
2001-11-01 19:01 presotto
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=200111011857.fA1Iv9701688@ducky.net \
--to=mike@ducky.net \
--cc=9fans@cse.psu.edu \
/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).