![]() | |||||||||||||
Messages in this thread |
Hi, There seems to be a problem with the permission checking in the new NFS client code. The problem is that when the output of a setuid program is redirected to a file on an NFS partition, the output file becomes corrupt. I first noticed this when I redirected the stderr of the X server to a file on NFS. I got "NFS: inode ... had .. failed requests" messages, and the output file was partially filled with null bytes. The following shell script demonstrates the problem: ------------------------------------------------------------ #!/bin/sh nfsfile=/mnt/temp # some file on NFS user=dick cp /bin/ls /tmp/ls chmod u+s /tmp/ls su $user -c "/tmp/ls / > $nfsfile" ls -l $nfsfile sleep 4 ls -l $nfsfile rm /tmp/ls $nfsfile ------------------------------------------------------------ The output from this script is: ------------------------------------------------------------ /tmp/ls: write error: Permission denied -rw-r--r-- 1 dick system 146 Mar 29 23:17 /mnt/temp -rw-r--r-- 1 dick system 0 Mar 29 23:17 /mnt/temp ------------------------------------------------------------ I suspect that the problem is that the file persmissions are checked for every I/O operation, while it should be sufficient to have access permission at the open() call. -- Dick Streefland //// Tasking Software BV dick_streefland@tasking.com (@ @) http://www.tasking.com --------------------------------oOO--(_)--OOo--------------------------- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu | ||||||||||||
| Last update: 2005-03-22 12:42 [W:0.070 / U:0.400 seconds] ©2003-2008 Jasper Spaans | |||||||||||||