9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] more secure kfs
@ 1998-05-01 19:36 arisawa
  0 siblings, 0 replies; 3+ messages in thread
From: arisawa @ 1998-05-01 19:36 UTC (permalink / raw)


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*

Kenji Arisawa
E-mail: arisawa@aichi-u.ac.jp




^ permalink raw reply	[flat|nested] 3+ messages in thread

* [9fans] more secure kfs
@ 1998-05-03 14:03 arisawa
  0 siblings, 0 replies; 3+ messages in thread
From: arisawa @ 1998-05-03 14:03 UTC (permalink / raw)


>It's simple to prohibit *all* kfs commands except from hostowner,
>by changing main.c as shown below. 
...
>-- Richard Miller

Thank you, Richard. I will try.

Kenji Arisawa
E-mail: arisawa@aichi-u.ac.jp




^ permalink raw reply	[flat|nested] 3+ messages in thread

* [9fans] more secure kfs
@ 1998-05-02  9:48 miller
  0 siblings, 0 replies; 3+ messages in thread
From: miller @ 1998-05-02  9:48 UTC (permalink / 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





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1998-05-03 14:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-05-01 19:36 [9fans] more secure kfs arisawa
1998-05-02  9:48 miller
1998-05-03 14:03 arisawa

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).