From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 22507 invoked from network); 6 Jan 2023 14:24:17 -0000 Received: from 9front.inri.net (168.235.81.73) by inbox.vuxu.org with ESMTPUTF8; 6 Jan 2023 14:24:17 -0000 Received: from duke.felloff.net ([216.126.196.34]) by 9front; Fri Jan 6 09:21:35 -0500 2023 Message-ID: <799B4E4C347C4452E1B568D8D85A8C2D@felloff.net> Date: Fri, 06 Jan 2023 15:21:24 +0100 From: cinap_lenrek@felloff.net To: 9front@9front.org In-Reply-To: <22E420E1-6595-48D5-ABE5-7800430C142B@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: virtual full-stack template just-in-time-based control Subject: Re: [9front] drawterm: kern/devfs-posix: fscreate does not respect parent dir's perm Reply-To: 9front@9front.org Precedence: bulk it looks ok, but it is still wrong no? The create request asks the file server to create a new file with the name supplied, in the directory (dir) represented by fid, and requires write permission in the directory. The owner of the file is the implied user id of the request, the group of the file is the same as dir, and the permissions are the value of perm & (~0666 | (dir.perm & 0666)) if a regular file is being created and perm & (~0777 | (dir.perm & 0777)) if a directory is being created. This means, for example, that if the create allows read permission to others, but the containing directory does not, then the created file will not allow others to read the file. we'r changing the uid to the directory owner, but it should the the uid of the drawterm process. -- cinap