From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from ar.aichi-u.ac.jp ([202.250.160.40]) by ttr; Sat Aug 16 20:19:04 EDT 2014 Received: from [192.168.1.105] ([125.193.25.135]) by ar; Sun Aug 17 09:18:55 JST 2014 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) Subject: Re: [9front] a consideration on cwfs From: arisawa In-Reply-To: <3b51446a115736ec62232ad36d42c852@felloff.net> Date: Sun, 17 Aug 2014 09:19:08 +0900 Content-Transfer-Encoding: 7bit Message-Id: List-ID: <9front.9front.org> X-Glyph: ➈ X-Bullshit: distributed stable descriptor cache realtime-java table References: <3b51446a115736ec62232ad36d42c852@felloff.net> To: 9front@9front.org X-Mailer: Apple Mail (2.1510) sorry I have not looked your changes. I did hg update just now. I will try. my mail is about my cwfs. Kenji Arisawa On 2014/08/17, at 8:02, cinap_lenrek@felloff.net wrote: > 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