From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from felloff.net ([199.191.58.38]) by ttr; Sat Aug 16 19:02:56 EDT 2014 Message-ID: <3b51446a115736ec62232ad36d42c852@felloff.net> List-ID: <9front.9front.org> X-Glyph: ➈ X-Bullshit: TOR over HTML self-signing template engine-oriented property-scale database Date: Sun, 17 Aug 2014 01:02:49 +0200 From: cinap_lenrek@felloff.net To: 9front@9front.org Subject: Re: [9front] a consideration on cwfs In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit 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