Bug 77734

Summary: repquota shows everyone's quotas when run as normal user
Product: [Retired] Red Hat Linux Reporter: Scott Steeves <steevess>
Component: kernelAssignee: Arjan van de Ven <arjanv>
Status: CLOSED CURRENTRELEASE QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0Keywords: Security
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-12-12 08:59:01 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 Scott Steeves 2002-11-12 21:18:33 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020830

Description of problem:
repquota displays all information for all sers, even if a normal user runs it.
That is, "repquota -a" shows an identical report for both root and any other user.

Version-Release number of selected component (if applicable): 
quota-3.06-5

How reproducible:
Always

Steps to Reproduce:
1.Install RH 8.0
2.Enable quotas
3.Create two users
4.Create limits for both users
5.Login as each user
6.Create files to exceed quota
7.As either user or both, run "/usr/sbin/repquota -a"
	

Actual Results:  
[root@station34 junk]# rpm -qa | grep quota
quota-3.06-5

[root@station34 junk]# uname -a
Linux station34.example.com 2.4.18-14 #1 Wed Sep 4 13:35:50 EDT 2002 i686 i686
i386 GNU/Linux

[root@station34 junk]# repquota -a
*** Report for user quotas on device /dev/hda5
Block grace time: 7days; Inode grace time: 7days
                        Block limits                File limits
User            used    soft    hard  grace    used  soft  hard  grace
----------------------------------------------------------------------
root      --      20       0       0              3     0     0
filehog   -+     350       0       0             70    60   100  6days
diskhog   +-      20      10      20  6days      98     0     0


[root@station34 junk]# su - filehog

[filehog@station34 filehog]$ set | grep UID
EUID=500
UID=500

[filehog@station34 filehog]$ /usr/sbin/repquota -a
*** Report for user quotas on device /dev/hda5
Block grace time: 7days; Inode grace time: 7days
                        Block limits                File limits
User            used    soft    hard  grace    used  soft  hard  grace
----------------------------------------------------------------------
root      --      20       0       0              3     0     0
filehog   -+     351       0       0             71    60   100  6days
diskhog   +-      20      10      20  6days      98     0     0


Expected Results:
The repquota man page says "Only the super-user may view quotas which are not
their own." So I would have expected repquota to limit output to the data for
the user that ran it, unless that user was root.

Additional info:

Comment 1 Michael Lee Yohe 2002-11-13 20:33:05 UTC
What are the permissions of the [a]quota.user and/or [a]quota.group at the base
of the /dev/hda5 file system?

Comment 2 Scott Steeves 2002-11-14 14:31:12 UTC
[root@station34 home]# ls -la aquota.user
-rw-r--r--    1 root     root         7168 Nov 14 09:00 aquota.user
[root@station34 home]# su - filehog
[filehog@station34 filehog]$ /usr/sbin/repquota -a
*** Report for user quotas on device /dev/hda5
Block grace time: 7days; Inode grace time: 7days
                        Block limits                File limits
User            used    soft    hard  grace    used  soft  hard  grace
----------------------------------------------------------------------
root      --      21       0       0              4     0     0
filehog   -+     301       0       0             90    60   100  5days
diskhog   +-      20      10      20  5days      98     0     0

[filehog@station34 filehog]$ exit
logout

[root@station34 home]# chmod o-r /home/aquota.user
[root@station34 home]# su - filehog
[filehog@station34 filehog]$ /usr/sbin/repquota -a
repquota: Can't open quotafile /home/aquota.user: Permission denied
repquota: Quota file not found or has wrong format.
[filehog@station34 filehog]$


Comment 3 Alan Cox 2002-12-18 18:22:28 UTC
Seems to be kernel


Comment 4 Mark J. Cox 2003-10-02 11:34:51 UTC
Is this still an issue with our errata kernels?

Comment 5 Mark J. Cox 2003-12-12 08:59:01 UTC
No response, closing.  Please reopen if this is still an issue.