lkml.org 
[lkml]   [1998]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: NFS and setuid programs fails on 2.1
Date
From
Kees Bakker wrote:
> >>>>> "Alan" == Alan Cox <alan@lxorguk.ukuu.org.uk> writes:
>
> Alan> Ok send me the example again (I didnt keep it - I should have) I'll look at
> Alan> 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 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.

I certainly missed the beginning of this thread.

Rogier.



--
| The secret of success is sincerity. Once you can | R.E.Wolff@BitWizard.nl
| fake that, you've got it made. -- Jean Giraudoux | T: +31-15-2137555
- Custom Linux device drivers for sale! Call for a quote. - F: +31-15-2138217

-
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:2.805 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site