Revision 5132861a7a44498ebb18357473f8b8d4cdc70e9f authored by Jeff Layton on 22 May 2008, 13:33:34 UTC, committed by Steve French on 25 May 2008, 00:33:58 UTC
CIFS currently allows you to change the mode of an inode on a share that
doesn't have unix extensions enabled, and isn't using cifsacl. The inode
in this case *only* has its mode changed in memory on the client. This
is problematic since it can change any time the inode is purged from the
cache.

This patch makes cifs_setattr silently ignore most mode changes when
unix extensions and cifsacl support are not enabled, and when the share
is not mounted with the "dynperm" option. The exceptions are:

When a mode change would remove all write access to an inode we turn on
the ATTR_READONLY bit on the server and remove all write bits from the
inode's mode in memory.

When a mode change would add a write bit to an inode that previously had
them all turned off, it turns off the ATTR_READONLY bit on the server,
and resets the mode back to what it would normally be (generally, the
file_mode or dir_mode of the share).

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
1 parent b720615
History
File Mode Size
Makefile -rw-r--r-- 335 bytes
compat.c -rw-r--r-- 17.0 KB
compat_mq.c -rw-r--r-- 4.0 KB
ipc_sysctl.c -rw-r--r-- 5.8 KB
ipcns_notifier.c -rw-r--r-- 2.1 KB
mqueue.c -rw-r--r-- 30.1 KB
msg.c -rw-r--r-- 20.9 KB
msgutil.c -rw-r--r-- 2.3 KB
namespace.c -rw-r--r-- 2.5 KB
sem.c -rw-r--r-- 32.7 KB
shm.c -rw-r--r-- 25.5 KB
util.c -rw-r--r-- 24.3 KB
util.h -rw-r--r-- 4.7 KB

back to top