Bug 15410

Summary: edquota -p copies current usage as well as quota
Product: Base System Reporter: timlee <timlee>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description timlee 1999-12-11 01:30:01 UTC
"edquota -p someuser otherusr" copies someuser's current usage as well
as quotas to the otherusr.  Need to run quotacheck again to fix the
current usage.

Fix: 

Workaround:  run quotacheck after using "edquota -p".
Fix:  ???  Code in setquota() in
/usr/src/sys/ufs/ufs/ufs_quota.c looks like it should
ignore changes in the current usage (edquota does not
check the current usage values when copying from one
user to another with -p).
How-To-Repeat: quota -v someuser
quota -v otherusr
edquota -p someuser otherusr
quota -v otherusr
Comment 1 Peter Avalos 2002-04-21 08:56:29 UTC
I couldn't reproduce this on 4-STABLE, but I don't have softupdates.
Comment 2 Ceri Davies freebsd_committer freebsd_triage 2003-12-27 16:20:18 UTC
State Changed
From-To: open->closed

This is not reproducible on today's FreeBSD.
Comment 3 dfilter service freebsd_committer freebsd_triage 2007-02-04 01:41:49 UTC
mpp         2007-02-04 01:41:33 UTC

  FreeBSD src repository

  Modified files:
    usr.sbin/edquota     edquota.c 
  Log:
  If quotas are not currently enabled for a file system, edquota -p
  will operate directly on the quota file.  It will incorrectly write
  the prototype user's usage information for each new quota it sets.
  
  Fixed to read in the current quota information and update the
  file correctly.
  
  If quotas are enabled the kernel handles this case fine.
  
  PR:     bin/15410
  
  Revision  Changes    Path
  1.25      +63 -8     src/usr.sbin/edquota/edquota.c
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"