The Samba-Bugzilla – Attachment 2322 Details for
Bug 4443
cifs client does not reset permissions when a previously read-only file is no longer read-only
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to enable any mode bits allowed by mnt_file_mode if ATTR_READONLY isn't set
upstream-cifs-readonly-reset.patch (text/plain), 1.39 KB, created by
Jeff Layton
on 2007-03-09 14:20:52 UTC
(
hide
)
Description:
patch to enable any mode bits allowed by mnt_file_mode if ATTR_READONLY isn't set
Filename:
MIME Type:
Creator:
Jeff Layton
Created:
2007-03-09 14:20:52 UTC
Size:
1.39 KB
patch
obsolete
>Subject: [PATCH] reset file mode when cifs client notices that ATTR_READONLY is no longer set > >diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c >index 86b9dbb..e75a844 100644 >--- a/fs/cifs/inode.c >+++ b/fs/cifs/inode.c >@@ -494,6 +494,12 @@ int cifs_get_inode_info(struct inode **pinode, > mode e.g. 555 */ > if (cifsInfo->cifsAttrs & ATTR_READONLY) > inode->i_mode &= ~(S_IWUGO); >+ else if ((inode->i_mode & S_IWUGO) == 0) >+ /* the ATTR_READONLY flag may have been */ >+ /* changed on server -- set any w bits */ >+ /* allowed by mnt_file_mode */ >+ inode->i_mode |= (S_IWUGO & >+ cifs_sb->mnt_file_mode); > /* BB add code here - > validate if device or weird share or device type? */ > } >diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c >index 44cfb52..2a374d5 100644 >--- a/fs/cifs/readdir.c >+++ b/fs/cifs/readdir.c >@@ -219,6 +219,10 @@ static void fill_in_inode(struct inode *tmp_inode, int new_buf_type, > tmp_inode->i_mode |= S_IFREG; > if (attr & ATTR_READONLY) > tmp_inode->i_mode &= ~(S_IWUGO); >+ else if ((tmp_inode->i_mode & S_IWUGO) == 0) >+ /* the ATTR_READONLY flag may have been changed on */ >+ /* server -- set any w bits allowed by mnt_file_mode */ >+ tmp_inode->i_mode |= (S_IWUGO & cifs_sb->mnt_file_mode); > } /* could add code here - to validate if device or weird share type? */ > > /* can not fill in nlink here as in qpathinfo version and Unx search */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 4443
: 2322