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 06:41:47 EDT 2014 Received: from [192.168.1.110] ([125.193.25.135]) by ar; Sat Aug 16 19:41:37 JST 2014 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: [9front] a consideration on cwfs From: arisawa In-Reply-To: <69a67f900844bf383dd1213a0eb6d908@felloff.net> Date: Sat, 16 Aug 2014 19:41:36 +0900 Content-Transfer-Encoding: quoted-printable Message-Id: <5DEA2635-D369-4EE4-A6E9-945EAE267A3C@ar.aichi-u.ac.jp> List-ID: <9front.9front.org> X-Glyph: ➈ X-Bullshit: overflow-preventing virtual event DOM backend References: <69a67f900844bf383dd1213a0eb6d908@felloff.net> To: 9front@9front.org X-Mailer: Apple Mail (2.1878.6) Hello cinap, sorry, some lines in 9p2.c have slipped off when I updated cwfs. static int fs_open(Chan* chan, Fcall* f, Fcall* r) { Iobuf *p; Dentry *d; File *file; Tlock *t; Qid qid; int error, ro, fmod, wok; wok =3D 0; p =3D nil; if(chan =3D=3D cons.chan || writeallow) wok =3D 1; if((file =3D filep(chan, f->fid, 0)) =3D=3D nil){ error =3D Efid; goto out; } if(file->open !=3D 0){ error =3D Emode; goto out; } + if(allowed && (allowed =3D=3D file->uid)){ + if(chatty > 1) + fprint(2, "fs_open: chan=3D%s who=3D%s = uid=3D%d\n", + chan->whochan, chan->whoname, = file->uid); + wok =3D 1; + } you write much better codes than I. I'll leave it up to you. Kenji Arisawa 2014/08/11 5:40=E3=80=81cinap_lenrek@felloff.net =E3=81=AE=E3=83=A1=E3=83=BC= =E3=83=AB=EF=BC=9A > thanks! this is a good idea. just commited the change but also > used the opportunity to unify the permission override code to > get rid of wstatallow flag and all the extra code in the callers > of iaccess(). >=20 > -- > cinap