From: miller@hamnavoe.demon.co.uk miller@hamnavoe.demon.co.uk
Subject: [9fans] more secure kfs
Date: Sat, 2 May 1998 10:48:14 +0100 [thread overview]
Message-ID: <19980502094814.bROQbPFcujrOb9EmJSmozWj3rV3mNLCLcnIzxn0tfNs@z> (raw)
Kenji Arisawa <arisawa@aichi-u.ac.jp> asks:
> Does anyone has a patch to kfs that enables more secure kfs?
>
> I would like to prohibit some kfs commands by the user who is
> not the owner of /dev/hd0*
It's simple to prohibit *all* kfs commands except from hostowner,
by changing main.c as shown below. A filter program could then
be started from cpurc to accept commands on another /srv file
and pass the safe ones (sync?) to /srv.kfs [left as an exercise
for the reader].
==========================================
diff /sys/src/cmd/disk/kfs/main.c main.c
11c11
< int srvfd(char*, int);
---
> int srvfd(char*, int, int);
296c296
< srvfd(buf, p[0]);
---
> srvfd(buf, p[0], 0600);
398c398
< srvfd(buf, sfd);
---
> srvfd(buf, sfd, 0666);
412c412
< srvfd(char *s, int sfd)
---
> srvfd(char *s, int sfd, int perm)
417c417
< fd = create(s, OWRITE, 0666);
---
> fd = create(s, OWRITE, perm);
420c420
< fd = create(s, OWRITE, 0666);
---
> fd = create(s, OWRITE, perm);
==========================================
-- Richard Miller
next reply other threads:[~1998-05-02 9:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-05-02 9:48 miller [this message]
-- strict thread matches above, loose matches on Subject: below --
1998-05-03 14:03 arisawa
1998-05-01 19:36 arisawa
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=19980502094814.bROQbPFcujrOb9EmJSmozWj3rV3mNLCLcnIzxn0tfNs@z \
--to=miller@hamnavoe.demon.co.uk \
/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).