]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
CIFS should honour umask (CVE-2007-3740)
authorSteve French <sfrench@us.ibm.com>
Fri, 2 Nov 2007 02:30:35 +0000 (03:30 +0100)
committerAdrian Bunk <bunk@kernel.org>
Fri, 2 Nov 2007 02:30:35 +0000 (03:30 +0100)
commitda8262844e325cc9361114c55e8507c1fee54941
tree2ddc91fece4fe22597c9171b8d666dc54a23ecb7
parentc515d9db76c3fe82243677ecfbff559d05f9e852
CIFS should honour umask (CVE-2007-3740)

This patch makes CIFS honour a process' umask like other filesystems.
Of course the server is still free to munge the permissions if it wants
to; but the client will send the "right" permissions to begin with.

A few caveats:

1) It only applies to filesystems that have CAP_UNIX (aka support unix
extensions)
2) It applies the correct mode to the follow up CIFSSMBUnixSetPerms()
after remote creation

When mode to CIFS/NTFS ACL mapping is complete we can do the
same thing for that case for servers which do not
support the Unix Extensions.

Signed-off-by: Matt Keenen <matt@opcode-solutions.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
fs/cifs/dir.c
fs/cifs/inode.c