--- zzzz-none-000/linux-2.6.19.2/fs/xattr.c 2007-01-10 19:10:37.000000000 +0000 +++ davinci-8020-5504/linux-2.6.19.2/fs/xattr.c 2007-01-11 07:38:19.000000000 +0000 @@ -48,21 +48,14 @@ return 0; /* - * The trusted.* namespace can only be accessed by a privileged user. + * The trusted.* namespace can only accessed by a privilegued user. */ if (!strncmp(name, XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN)) return (capable(CAP_SYS_ADMIN) ? 0 : -EPERM); - /* In user.* namespace, only regular files and directories can have - * extended attributes. For sticky directories, only the owner and - * privileged user can write attributes. - */ if (!strncmp(name, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN)) { - if (!S_ISREG(inode->i_mode) && !S_ISDIR(inode->i_mode)) - return -EPERM; - if (S_ISDIR(inode->i_mode) && (inode->i_mode & S_ISVTX) && - (mask & MAY_WRITE) && (current->fsuid != inode->i_uid) && - !capable(CAP_FOWNER)) + if (!S_ISREG(inode->i_mode) && + (!S_ISDIR(inode->i_mode) || inode->i_mode & S_ISVTX)) return -EPERM; }