diff options
author | Steve French <smfrench@austin.rr.com> | 2005-04-28 22:41:04 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-28 22:41:04 -0700 |
commit | 1da0c78b32abe122a959d2a57ba3d41563d8e39f (patch) | |
tree | 65ab9cf2032aa9c262397ae04acf30daa0af26ec | |
parent | 2604f6da1afb56fae5930b58349e43a2b0345933 (diff) | |
download | op-kernel-dev-1da0c78b32abe122a959d2a57ba3d41563d8e39f.zip op-kernel-dev-1da0c78b32abe122a959d2a57ba3d41563d8e39f.tar.gz |
[PATCH] cifs: Only send POSIX ACL calls to server if server claims to support that capability bit
Signed-off-by: Steve French (sfrench@us.ibm.com)
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | fs/cifs/xattr.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/fs/cifs/xattr.c b/fs/cifs/xattr.c index 549afa1..9a41bee 100644 --- a/fs/cifs/xattr.c +++ b/fs/cifs/xattr.c @@ -161,18 +161,20 @@ int cifs_setxattr(struct dentry * direntry, const char * ea_name, strlen(POSIX_ACL_XATTR_ACCESS)); if (temp == 0) { #ifdef CONFIG_CIFS_POSIX - rc = CIFSSMBSetPosixACL(xid, pTcon,full_path,ea_value, - (const int)value_size, ACL_TYPE_ACCESS, - cifs_sb->local_nls); + if(sb->s_flags & MS_POSIXACL) + rc = CIFSSMBSetPosixACL(xid, pTcon,full_path, + ea_value, (const int)value_size, + ACL_TYPE_ACCESS,cifs_sb->local_nls); cFYI(1,("set POSIX ACL rc %d",rc)); #else cFYI(1,("set POSIX ACL not supported")); #endif } else if(strncmp(ea_name,POSIX_ACL_XATTR_DEFAULT,strlen(POSIX_ACL_XATTR_DEFAULT)) == 0) { #ifdef CONFIG_CIFS_POSIX - rc = CIFSSMBSetPosixACL(xid, pTcon,full_path,ea_value, - (const int)value_size, ACL_TYPE_DEFAULT, - cifs_sb->local_nls); + if(sb->s_flags & MS_POSIXACL) + rc = CIFSSMBSetPosixACL(xid, pTcon,full_path, + ea_value, (const int)value_size, + ACL_TYPE_DEFAULT, cifs_sb->local_nls); cFYI(1,("set POSIX default ACL rc %d",rc)); #else cFYI(1,("set default POSIX ACL not supported")); @@ -248,7 +250,8 @@ ssize_t cifs_getxattr(struct dentry * direntry, const char * ea_name, buf_size, cifs_sb->local_nls); } else if(strncmp(ea_name,POSIX_ACL_XATTR_ACCESS,strlen(POSIX_ACL_XATTR_ACCESS)) == 0) { #ifdef CONFIG_CIFS_POSIX - rc = CIFSSMBGetPosixACL(xid, pTcon, full_path, + if(sb->s_flags & MS_POSIXACL) + rc = CIFSSMBGetPosixACL(xid, pTcon, full_path, ea_value, buf_size, ACL_TYPE_ACCESS, cifs_sb->local_nls); #else @@ -256,7 +259,8 @@ ssize_t cifs_getxattr(struct dentry * direntry, const char * ea_name, #endif /* CONFIG_CIFS_POSIX */ } else if(strncmp(ea_name,POSIX_ACL_XATTR_DEFAULT,strlen(POSIX_ACL_XATTR_DEFAULT)) == 0) { #ifdef CONFIG_CIFS_POSIX - rc = CIFSSMBGetPosixACL(xid, pTcon, full_path, + if(sb->s_flags & MS_POSIXACL) + rc = CIFSSMBGetPosixACL(xid, pTcon, full_path, ea_value, buf_size, ACL_TYPE_DEFAULT, cifs_sb->local_nls); #else |