[lkml]   [1996]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: NFS client permission bug

Elliot Lee wrote:
>> > > neumann /ubackup # su hzoli -c 'echo bad' > test
>> > > zsh: write error: permission denied
>> So what? The file is open, thus the echo should be able to write to it,
>> even though it's now running as another user.
>The output to the file is done as root, since bash doesn't care whether
>you are redirecting the output of echo 'foo' or su auser -c echo 'foo'
>into the test file.
IS NOT. The write() system call is issued by the actual user because that
is what the echo command is running as.

The _open_() system call is done as root (by the shell). This is precisely
the problem -- the Linux NFS client doesn't remember the UID of the user
who opened the file and thus, when it writes, this case is one among many
where it falls flat on its face.

>The UID that opened it here is root. However there are bugs in NFS that
>let open() work without adequate permissions, it seems, when UID 0
>squashing is in effect.
I don't think so.

Checkbook Balancer's Law:
In matters of dispute, the bank's balance is always smaller than yours.
Matthias Urlichs \ noris network GmbH / Xlink-POP Nürnberg
Schleiermacherstraße 12 \ Linux+Internet / EMail:
90491 Nürnberg (Germany) \ Consulting+Programming+Networking+etc'ing
PGP: 1024/4F578875 1B 89 E2 1C 43 EA 80 44 15 D2 29 CF C6 C7 E0 DE
Click <A HREF="">here</A>. 42

 \ /
  Last update: 2005-03-22 13:37    [W:1.624 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site