X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=fs%2Fcifs%2Fxattr.c;h=e9527eedc6396f9afd8dd25720a78730142a14b5;hb=dbdbb87636e882042cbe53d5d4eac94206f8db83;hp=369e838bebd3142554b72d58e7333547079b3e41;hpb=0a4908e19fd016d60403fc76cf38b2d08d21e2d2;p=linux-2.6-omap-h63xx.git diff --git a/fs/cifs/xattr.c b/fs/cifs/xattr.c index 369e838bebd..e9527eedc63 100644 --- a/fs/cifs/xattr.c +++ b/fs/cifs/xattr.c @@ -139,9 +139,9 @@ int cifs_setxattr(struct dentry *direntry, const char *ea_name, } else if (strncmp(ea_name, CIFS_XATTR_USER_PREFIX, 5) == 0) { if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR) goto set_ea_exit; - if (strncmp(ea_name, CIFS_XATTR_DOS_ATTRIB, 14) == 0) { + if (strncmp(ea_name, CIFS_XATTR_DOS_ATTRIB, 14) == 0) cFYI(1, ("attempt to set cifs inode metadata")); - } + ea_name += 5; /* skip past user. prefix */ rc = CIFSSMBSetEA(xid, pTcon, full_path, ea_name, ea_value, (__u16)value_size, cifs_sb->local_nls, @@ -262,10 +262,12 @@ ssize_t cifs_getxattr(struct dentry *direntry, const char *ea_name, cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); #ifdef CONFIG_CIFS_EXPERIMENTAL - else if(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) { + else if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) { __u16 fid; - int oplock = FALSE; - if (experimEnabled) + int oplock = 0; + struct cifs_ntsd *pacl = NULL; + __u32 buflen = 0; + if (experimEnabled) rc = CIFSSMBOpen(xid, pTcon, full_path, FILE_OPEN, GENERIC_READ, 0, &fid, &oplock, NULL, cifs_sb->local_nls, @@ -273,10 +275,9 @@ ssize_t cifs_getxattr(struct dentry *direntry, const char *ea_name, CIFS_MOUNT_MAP_SPECIAL_CHR); /* else rc is EOPNOTSUPP from above */ - if(rc == 0) { - rc = CIFSSMBGetCIFSACL(xid, pTcon, fid, - ea_value, buf_size, - ACL_TYPE_ACCESS); + if (rc == 0) { + rc = CIFSSMBGetCIFSACL(xid, pTcon, fid, &pacl, + &buflen); CIFSSMBClose(xid, pTcon, fid); } } @@ -302,11 +303,10 @@ ssize_t cifs_getxattr(struct dentry *direntry, const char *ea_name, } else if (strncmp(ea_name, CIFS_XATTR_SECURITY_PREFIX, XATTR_SECURITY_PREFIX_LEN) == 0) { cFYI(1, ("Security xattr namespace not supported yet")); - } else { + } else cFYI(1, ("illegal xattr request %s (only user namespace supported)", ea_name)); - } /* We could add an additional check for streams ie if proc/fs/cifs/streamstoxattr is set then