Hmmm.. I think there is more here than immediately meets the eye.
current->fs->umask is initialised, to 0, in include/linux/fs_struct.h
The "INIT_FS" define is used to set the initial value of the fs_struct
(see arch/i386/kernel/init_task.c - other archs are the same).
The third field here is the umask field.
This is the fs_struct for init, and for every kernel thread that call
daemonise, as the nfsd threads do ever since 2.4.3pre5 or there abouts.
If the umask for nfsd is getting set to 022, as it would appear from
your experiment, then either:
- your init process is setting it, or
- you are using some odd architecture that doesn't use INIT_FS
So: what init program are you running, what architecture, any other
patches, anything else that might explain why your machine is
different from mine. Because on mine, the touched file gets the right
> Patch for 2.4.6 follows.
> Abramo Bagnara mailto:firstname.lastname@example.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;
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to email@example.com
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/