lkml.org 
[lkml]   [1998]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: NFS and setuid programs fails on 2.1

Rogier Wolff (R.E.Wolff@BitWizard.nl)
> Kees Bakker wrote:
>> Alan Cox <alan@lxorguk.ukuu.org.uk> writes:

>>> Ok send me the example again (I didnt keep it - I should have)
>>> I'll look at it this end
>>
>> #!/bin/sh
>>
>> file1=${1-/mnt/kernel/temp}
>> user=hanneke
>>
>> # Now execute a suid program by some other user.
>> su $user -c date > $file1
>
> What do you expect?

The FSUID is carried with the file descriptor, so that I can freely pass
file descriptors around.

> The file gets opened by the shell here, and gets written to by
> $user. That might fail on NFS, indeed.
>
> Use
> su $user -c "date > $file1"
> or something like that to let $user open the file.

No, because $user may not have permission to open the file.
The file may be mode 600, owned by the original user.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html

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