From: cinap_lenrek@felloff.net
To: 9front@9front.org
Subject: Re: [9front] drawterm: kern/devfs-posix: fscreate does not respect parent dir's perm
Date: Fri, 06 Jan 2023 15:21:24 +0100 [thread overview]
Message-ID: <799B4E4C347C4452E1B568D8D85A8C2D@felloff.net> (raw)
In-Reply-To: <22E420E1-6595-48D5-ABE5-7800430C142B@gmail.com>
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
next prev parent reply other threads:[~2023-01-06 14:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-03 22:29 Xiao-Yong Jin
2023-01-06 14:21 ` cinap_lenrek [this message]
2023-01-06 14:44 ` cinap_lenrek
2023-01-06 15:30 ` Xiao-Yong Jin
2023-01-06 15:40 ` cinap_lenrek
2023-01-06 18:20 ` cinap_lenrek
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=799B4E4C347C4452E1B568D8D85A8C2D@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).