From: cinap_lenrek@felloff.net
To: 9front@9front.org
Subject: Re: [9front] a consideration on cwfs
Date: Sun, 17 Aug 2014 01:02:49 +0200 [thread overview]
Message-ID: <3b51446a115736ec62232ad36d42c852@felloff.net> (raw)
In-Reply-To: <CD4DB253-16B8-4B8B-96D3-ED2446EF1739@ar.aichi-u.ac.jp>
what do you mean? i'm not doing it like that.
i defined a function:
int
isallowed(File *f)
{
if(f->cp == cons.chan)
return 1;
switch(allowed){
case 0:
return 0;
case -1:
return 1;
default:
return f->uid == allowed;
}
}
which is used both in iaccess() (see last line)
and 9p1.c and 9p2.c to handle wstat. i didnt
want to spread this godmode logic all over the
place but have just *one* place for it. you
see, this function also handles direct commands
from the console (f->cp == cons.chan) and
"allow all" (allow == -1) (for backwards compatibility
with the uid-less "allow" console command).
--
cinap
next prev parent reply other threads:[~2014-08-16 23:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-10 11:53 Kenji Arisawa
2014-08-10 14:01 ` [9front] " cinap_lenrek
2014-08-10 20:40 ` cinap_lenrek
2014-08-16 10:41 ` arisawa
2014-08-16 22:07 ` arisawa
2014-08-16 23:02 ` cinap_lenrek [this message]
2014-08-17 0:19 ` arisawa
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=3b51446a115736ec62232ad36d42c852@felloff.net \
--to=cinap_lenrek@felloff.net \
--cc=9front@9front.org \
/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).