• Andrew Morton's avatar
    [PATCH] Set umask correctly for nfsd kernel threads · b14241c4
    Andrew Morton authored
    From: Andreas Gruenbacher <agruen@suse.de>
    
    Without acls, when creating files the umask is applied directly in the vfs.
    ACLs require that the umask is applied at the file system level, depending on
    whether or not the containing directory has a default acl.  The daemonize()
    function makes kernel threads share their fs_struct structure with the init
    process.  Among other things, fs_struct contains the umask, so all kernel
    threads share their umask with init.
    
    The kernel nfsd needs to create files with a umask of 0.  Init's umask cannot
    simply be changed to 0 --- this would have side effects on init, and init
    would have side effects on nfsd.  So this patch recreates a fs_struct
    structure for nfsd kernel threads, and sets its umask to 0.
    
    This fixes bug #721, <http://www.osdl.net/show_bug.cgi?id=721>.
    b14241c4
ksyms.c 16.6 KB