Bug 77734 - repquota shows everyone's quotas when run as normal user
repquota shows everyone's quotas when run as normal user
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: kernel (Show other bugs)
8.0
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Arjan van de Ven
Brian Brock
: Security
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-11-12 16:18 EST by Scott Steeves
Modified: 2007-04-18 12:48 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-12-12 03:59:01 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Scott Steeves 2002-11-12 16:18:33 EST
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 15:33:05 EST
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 09:31:12 EST
[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 13:22:28 EST
Seems to be kernel
Comment 4 Mark J. Cox (Product Security) 2003-10-02 07:34:51 EDT
Is this still an issue with our errata kernels?
Comment 5 Mark J. Cox (Product Security) 2003-12-12 03:59:01 EST
No response, closing.  Please reopen if this is still an issue.

Note You need to log in before you can comment on or make changes to this bug.