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:44:18 +0100 [thread overview]
Message-ID: <FC1C33A21A54CF9D7A6CF4C7A445B709@felloff.net> (raw)
In-Reply-To: <22E420E1-6595-48D5-ABE5-7800430C142B@gmail.com>
how about this?
--- a/./kern/devfs-posix.c
+++ b/./kern/devfs-posix.c
@@ -244,8 +244,8 @@
fd = open(path, 0);
if(fd >= 0) {
- chmod(path, perm & 0777);
- chown(path, uif->uid, uif->uid);
+ chmod(path, uif->mode & perm & 0777);
+ chown(path, -1, uif->gid);
}
close(fd);
@@ -260,8 +260,8 @@
close(fd);
fd = open(path, m);
}
- chmod(path, perm & 0777);
- chown(path, uif->uid, uif->gid);
+ chmod(path, uif->mode & perm & 0666);
+ chown(path, -1, uif->gid);
}
if(fd < 0)
error(strerror(errno));
--
cinap
next prev parent reply other threads:[~2023-01-06 14:46 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
2023-01-06 14:44 ` cinap_lenrek [this message]
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=FC1C33A21A54CF9D7A6CF4C7A445B709@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).