Bug 431738
Summary: | lsattr doesn't show attributes of ext3 quota files | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | csb sysadmin <admin> |
Component: | kernel | Assignee: | Eric Sandeen <esandeen> |
Status: | CLOSED ERRATA | QA Contact: | Boris Ranto <branto> |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | 5.1 | CC: | branto, eguan, philip, qcai, sct |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2011-07-21 10:25:19 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
csb sysadmin
2008-02-06 18:46:43 UTC
FWIW, an upstream change prevents changing the flags on these files: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=e47776a0a41a14a5634633c96e590827f552c4b5 /* Is it quota file? Do not allow user to mess with it */ if (IS_NOQUOTA(inode)) { mutex_unlock(&inode->i_mutex); return -EPERM; } The file does indeed have S_IMMUTABLE set (looking at it in the debugger) - I'll see why it's not reported by lsattr. This actually looks like a kernel issue; it's not a huge priority but yes, it should be fixed. Hm, took another look at this and upstream it's like this: [root@inode mnt]# lsattr /mnt/scratch/aquota.user -------------e- /mnt/scratch/aquota.user [root@inode mnt]# chattr +i /mnt/scratch/aquota.* [root@inode mnt]# lsattr /mnt/scratch/aquota.user ----i--------e- /mnt/scratch/aquota.user so it seems to be working there. This was fixed upstream with the following commits: 28be5abb400e5e082f5225105fdc69337ec0c0b4 4f99ed67cc1cf5302ea18aa042d75641b61a0a1b ff9ddf7e847c4dc533f119efb6c77a6e57ab6397 The inode flags in struct ext3_inode_info were going out of sync with the inode flags in struct inode. The above commits fix it for ext[2-4]. Here's the log message of the first one: commit 28be5abb400e5e082f5225105fdc69337ec0c0b4 Author: Jan Kara <jack> Date: Tue May 8 00:30:33 2007 -0700 ext3: copy i_flags to inode flags on write A patch that stores inode flags such as S_IMMUTABLE, S_APPEND, etc. from i_flags to EXT3_I(inode)->i_flags when inode is written to disk. The same thing is done on GETFLAGS ioctl. Quota code changes these flags on quota files (to make it harder for sysadmin to screw himself) and these changes were not correctly propagated into the filesystem (especially, lsattr did not show them and users were wondering...). Propagate flags such as S_APPEND, S_IMMUTABLE, etc. from i_flags into ext3-specific i_flags. Hence, when someone sets these flags via a different interface than ioctl, they are stored correctly. Signed-off-by: Jan Kara <jack> Cc: <linux-ext4.org> Signed-off-by: Andrew Morton <akpm> Signed-off-by: Linus Torvalds <torvalds> Ah, thanks for the reminder, I'd forgotten that went by. -Eric This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release. Patch(es) available in kernel-2.6.18-255.el5 You can download this test kernel (or newer) from http://people.redhat.com/jwilson/el5 Detailed testing feedback is always welcomed. An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2011-1065.html |