1 #EJF i took out part of this change set
4 # This is a BitKeeper generated diff -Nru style patch.
7 # 2004/01/30 17:20:19-06:00 stevef@stevef95.austin.ibm.com
8 # Relax requested CIFS permissions on open to simply request GENERIC_READ and GENERIC_WRITE (instead of GENERIC_ALL which
9 # can unnecessarily conflict with share permissions by asking implicitly for take ownership and other unneeded flags)
12 # 2004/01/30 17:20:13-06:00 stevef@stevef95.austin.ibm.com +7 -3
13 # Relax requested CIFS permissions on open to simply request GENERIC_READ and GENERIC_WRITE (instead of GENERIC_ALL which
14 # can unnecessarily conflict with share permissions by asking implicitly for take ownership and other unneeded flags)
17 # 2004/01/30 17:20:13-06:00 stevef@stevef95.austin.ibm.com +12 -4
18 # Relax requested CIFS permissions on open to simply request GENERIC_READ and GENERIC_WRITE (instead of GENERIC_ALL which
19 # can unnecessarily conflict with share permissions by asking implicitly for take ownership and other unneeded flags)
21 diff -Nru a/fs/cifs/dir.c b/fs/cifs/dir.c
22 --- a/fs/cifs/dir.c Mon May 3 16:32:08 2004
23 +++ b/fs/cifs/dir.c Mon May 3 16:32:08 2004
28 - int desiredAccess = GENERIC_ALL;
29 + int desiredAccess = GENERIC_READ | GENERIC_WRITE;
31 struct cifs_sb_info *cifs_sb;
32 struct cifsTconInfo *pTcon;
34 desiredAccess = GENERIC_READ;
35 else if ((nd->intent.open.flags & O_ACCMODE) == O_WRONLY)
36 desiredAccess = GENERIC_WRITE;
37 - else if ((nd->intent.open.flags & O_ACCMODE) == O_RDWR)
38 - desiredAccess = GENERIC_ALL;
39 + else if ((nd->intent.open.flags & O_ACCMODE) == O_RDWR) {
40 + /* GENERIC_ALL is too much permission to request */
41 + /* can cause unnecessary access denied on create */
42 + /* desiredAccess = GENERIC_ALL; */
43 + desiredAccess = GENERIC_READ | GENERIC_WRITE;
46 if((nd->intent.open.flags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL))
47 disposition = FILE_CREATE;
48 diff -Nru a/fs/cifs/file.c b/fs/cifs/file.c
49 --- a/fs/cifs/file.c Mon May 3 16:32:08 2004
50 +++ b/fs/cifs/file.c Mon May 3 16:32:08 2004
52 desiredAccess = GENERIC_READ;
53 else if ((file->f_flags & O_ACCMODE) == O_WRONLY)
54 desiredAccess = GENERIC_WRITE;
55 - else if ((file->f_flags & O_ACCMODE) == O_RDWR)
56 - desiredAccess = GENERIC_ALL;
57 + else if ((file->f_flags & O_ACCMODE) == O_RDWR) {
58 + /* GENERIC_ALL is too much permission to request */
59 + /* can cause unnecessary access denied on create */
60 + /* desiredAccess = GENERIC_ALL; */
61 + desiredAccess = GENERIC_READ | GENERIC_WRITE;
64 /*********************************************************************
65 * open flag mapping table: