lkml.org 
[lkml]   [2001]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] Bug in NFS

I have found a bug in NFSv2.

[root@igor /tmp]# mount igor:/u u
[root@igor /tmp]# cd u
[root@igor u]# umask 000
[root@igor u]# ls -l q
ls: q: File o directory inesistente
[root@igor u]# touch q
[root@igor u]# ls -l q
-rw-r--r-- 1 root root 0 lug 13 07:56 q

This seems to be caused by use of unitialized current->fs->umask via
vfs_create called by nfsd_create.

Patch for 2.4.6 follows.

--
Abramo Bagnara mailto:abramo@alsa-project.org

Opera Unica Phone: +39.546.656023
Via Emilia Interna, 140
48014 Castel Bolognese (RA) - Italy

ALSA project http://www.alsa-project.org
It sounds good!--- linux-2.4/fs/nfsd/auth.c.~1~ Mon Jul 24 08:04:10 2000
+++ linux-2.4/fs/nfsd/auth.c Fri Jul 13 08:00:10 2001
@@ -34,6 +34,7 @@
cred->cr_groups[i] = exp->ex_anon_gid;
}

+ current->fs->umask = 0;
if (cred->cr_uid != (uid_t) -1)
current->fsuid = cred->cr_uid;
else
\
 
 \ /
  Last update: 2005-03-22 12:57    [W:0.133 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site