diff options
Diffstat (limited to 'fs/cifs/xattr.c')
-rw-r--r-- | fs/cifs/xattr.c | 35 |
1 files changed, 25 insertions, 10 deletions
diff --git a/fs/cifs/xattr.c b/fs/cifs/xattr.c index 9a41bee11c5a..c1e02eff1d25 100644 --- a/fs/cifs/xattr.c +++ b/fs/cifs/xattr.c | |||
@@ -83,7 +83,8 @@ int cifs_removexattr(struct dentry * direntry, const char * ea_name) | |||
83 | 83 | ||
84 | ea_name+=5; /* skip past user. prefix */ | 84 | ea_name+=5; /* skip past user. prefix */ |
85 | rc = CIFSSMBSetEA(xid,pTcon,full_path,ea_name,NULL, | 85 | rc = CIFSSMBSetEA(xid,pTcon,full_path,ea_name,NULL, |
86 | (__u16)0, cifs_sb->local_nls); | 86 | (__u16)0, cifs_sb->local_nls, |
87 | cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); | ||
87 | } | 88 | } |
88 | remove_ea_exit: | 89 | remove_ea_exit: |
89 | if (full_path) | 90 | if (full_path) |
@@ -147,14 +148,16 @@ int cifs_setxattr(struct dentry * direntry, const char * ea_name, | |||
147 | } | 148 | } |
148 | ea_name += 5; /* skip past user. prefix */ | 149 | ea_name += 5; /* skip past user. prefix */ |
149 | rc = CIFSSMBSetEA(xid,pTcon,full_path,ea_name,ea_value, | 150 | rc = CIFSSMBSetEA(xid,pTcon,full_path,ea_name,ea_value, |
150 | (__u16)value_size, cifs_sb->local_nls); | 151 | (__u16)value_size, cifs_sb->local_nls, |
152 | cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); | ||
151 | } else if(strncmp(ea_name, CIFS_XATTR_OS2_PREFIX,4) == 0) { | 153 | } else if(strncmp(ea_name, CIFS_XATTR_OS2_PREFIX,4) == 0) { |
152 | if(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR) | 154 | if(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR) |
153 | goto set_ea_exit; | 155 | goto set_ea_exit; |
154 | 156 | ||
155 | ea_name += 4; /* skip past os2. prefix */ | 157 | ea_name += 4; /* skip past os2. prefix */ |
156 | rc = CIFSSMBSetEA(xid,pTcon,full_path,ea_name,ea_value, | 158 | rc = CIFSSMBSetEA(xid,pTcon,full_path,ea_name,ea_value, |
157 | (__u16)value_size, cifs_sb->local_nls); | 159 | (__u16)value_size, cifs_sb->local_nls, |
160 | cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); | ||
158 | } else { | 161 | } else { |
159 | int temp; | 162 | int temp; |
160 | temp = strncmp(ea_name,POSIX_ACL_XATTR_ACCESS, | 163 | temp = strncmp(ea_name,POSIX_ACL_XATTR_ACCESS, |
@@ -164,7 +167,9 @@ int cifs_setxattr(struct dentry * direntry, const char * ea_name, | |||
164 | if(sb->s_flags & MS_POSIXACL) | 167 | if(sb->s_flags & MS_POSIXACL) |
165 | rc = CIFSSMBSetPosixACL(xid, pTcon,full_path, | 168 | rc = CIFSSMBSetPosixACL(xid, pTcon,full_path, |
166 | ea_value, (const int)value_size, | 169 | ea_value, (const int)value_size, |
167 | ACL_TYPE_ACCESS,cifs_sb->local_nls); | 170 | ACL_TYPE_ACCESS,cifs_sb->local_nls, |
171 | cifs_sb->mnt_cifs_flags & | ||
172 | CIFS_MOUNT_MAP_SPECIAL_CHR); | ||
168 | cFYI(1,("set POSIX ACL rc %d",rc)); | 173 | cFYI(1,("set POSIX ACL rc %d",rc)); |
169 | #else | 174 | #else |
170 | cFYI(1,("set POSIX ACL not supported")); | 175 | cFYI(1,("set POSIX ACL not supported")); |
@@ -174,7 +179,9 @@ int cifs_setxattr(struct dentry * direntry, const char * ea_name, | |||
174 | if(sb->s_flags & MS_POSIXACL) | 179 | if(sb->s_flags & MS_POSIXACL) |
175 | rc = CIFSSMBSetPosixACL(xid, pTcon,full_path, | 180 | rc = CIFSSMBSetPosixACL(xid, pTcon,full_path, |
176 | ea_value, (const int)value_size, | 181 | ea_value, (const int)value_size, |
177 | ACL_TYPE_DEFAULT, cifs_sb->local_nls); | 182 | ACL_TYPE_DEFAULT, cifs_sb->local_nls, |
183 | cifs_sb->mnt_cifs_flags & | ||
184 | CIFS_MOUNT_MAP_SPECIAL_CHR); | ||
178 | cFYI(1,("set POSIX default ACL rc %d",rc)); | 185 | cFYI(1,("set POSIX default ACL rc %d",rc)); |
179 | #else | 186 | #else |
180 | cFYI(1,("set default POSIX ACL not supported")); | 187 | cFYI(1,("set default POSIX ACL not supported")); |
@@ -240,20 +247,24 @@ ssize_t cifs_getxattr(struct dentry * direntry, const char * ea_name, | |||
240 | } /* BB add else when above is implemented */ | 247 | } /* BB add else when above is implemented */ |
241 | ea_name += 5; /* skip past user. prefix */ | 248 | ea_name += 5; /* skip past user. prefix */ |
242 | rc = CIFSSMBQueryEA(xid,pTcon,full_path,ea_name,ea_value, | 249 | rc = CIFSSMBQueryEA(xid,pTcon,full_path,ea_name,ea_value, |
243 | buf_size, cifs_sb->local_nls); | 250 | buf_size, cifs_sb->local_nls, |
251 | cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); | ||
244 | } else if(strncmp(ea_name, CIFS_XATTR_OS2_PREFIX,4) == 0) { | 252 | } else if(strncmp(ea_name, CIFS_XATTR_OS2_PREFIX,4) == 0) { |
245 | if(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR) | 253 | if(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR) |
246 | goto get_ea_exit; | 254 | goto get_ea_exit; |
247 | 255 | ||
248 | ea_name += 4; /* skip past os2. prefix */ | 256 | ea_name += 4; /* skip past os2. prefix */ |
249 | rc = CIFSSMBQueryEA(xid,pTcon,full_path,ea_name,ea_value, | 257 | rc = CIFSSMBQueryEA(xid,pTcon,full_path,ea_name,ea_value, |
250 | buf_size, cifs_sb->local_nls); | 258 | buf_size, cifs_sb->local_nls, |
259 | cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); | ||
251 | } else if(strncmp(ea_name,POSIX_ACL_XATTR_ACCESS,strlen(POSIX_ACL_XATTR_ACCESS)) == 0) { | 260 | } else if(strncmp(ea_name,POSIX_ACL_XATTR_ACCESS,strlen(POSIX_ACL_XATTR_ACCESS)) == 0) { |
252 | #ifdef CONFIG_CIFS_POSIX | 261 | #ifdef CONFIG_CIFS_POSIX |
253 | if(sb->s_flags & MS_POSIXACL) | 262 | if(sb->s_flags & MS_POSIXACL) |
254 | rc = CIFSSMBGetPosixACL(xid, pTcon, full_path, | 263 | rc = CIFSSMBGetPosixACL(xid, pTcon, full_path, |
255 | ea_value, buf_size, ACL_TYPE_ACCESS, | 264 | ea_value, buf_size, ACL_TYPE_ACCESS, |
256 | cifs_sb->local_nls); | 265 | cifs_sb->local_nls, |
266 | cifs_sb->mnt_cifs_flags & | ||
267 | CIFS_MOUNT_MAP_SPECIAL_CHR); | ||
257 | #else | 268 | #else |
258 | cFYI(1,("query POSIX ACL not supported yet")); | 269 | cFYI(1,("query POSIX ACL not supported yet")); |
259 | #endif /* CONFIG_CIFS_POSIX */ | 270 | #endif /* CONFIG_CIFS_POSIX */ |
@@ -262,7 +273,9 @@ ssize_t cifs_getxattr(struct dentry * direntry, const char * ea_name, | |||
262 | if(sb->s_flags & MS_POSIXACL) | 273 | if(sb->s_flags & MS_POSIXACL) |
263 | rc = CIFSSMBGetPosixACL(xid, pTcon, full_path, | 274 | rc = CIFSSMBGetPosixACL(xid, pTcon, full_path, |
264 | ea_value, buf_size, ACL_TYPE_DEFAULT, | 275 | ea_value, buf_size, ACL_TYPE_DEFAULT, |
265 | cifs_sb->local_nls); | 276 | cifs_sb->local_nls, |
277 | cifs_sb->mnt_cifs_flags & | ||
278 | CIFS_MOUNT_MAP_SPECIAL_CHR); | ||
266 | #else | 279 | #else |
267 | cFYI(1,("query POSIX default ACL not supported yet")); | 280 | cFYI(1,("query POSIX default ACL not supported yet")); |
268 | #endif | 281 | #endif |
@@ -328,7 +341,9 @@ ssize_t cifs_listxattr(struct dentry * direntry, char * data, size_t buf_size) | |||
328 | search server for EAs or streams to | 341 | search server for EAs or streams to |
329 | returns as xattrs */ | 342 | returns as xattrs */ |
330 | rc = CIFSSMBQAllEAs(xid,pTcon,full_path,data,buf_size, | 343 | rc = CIFSSMBQAllEAs(xid,pTcon,full_path,data,buf_size, |
331 | cifs_sb->local_nls); | 344 | cifs_sb->local_nls, |
345 | cifs_sb->mnt_cifs_flags & | ||
346 | CIFS_MOUNT_MAP_SPECIAL_CHR); | ||
332 | 347 | ||
333 | if (full_path) | 348 | if (full_path) |
334 | kfree(full_path); | 349 | kfree(full_path); |