Bug 979 - Quotas not correct with AIX
Summary: Quotas not correct with AIX
Status: CLOSED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: File Services (show other bugs)
Version: 3.0.1
Hardware: All AIX
: P3 normal
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-16 05:25 UTC by Heinrich Mislik
Modified: 2005-11-14 09:25 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Heinrich Mislik 2004-01-16 05:25:53 UTC
When running smbd in AIX; the quotas are not correctly displayed on the client.
The call to quotactl in quotas.c should be done as root.

Patch:

*** quotas.c.orig       Fri Jan 16 14:12:39 2004
--- quotas.c    Fri Jan 16 14:14:27 2004
***************
*** 958,964 ****
--- 958,967 ----
  #elif defined(AIX)
    /* AIX has both USER and GROUP quotas:
       Get the USER quota (ohnielse@fysik.dtu.dk) */
+   save_re_uid();
+   if (set_re_uid() != 0) return False;
    r= quotactl(path,QCMD(Q_GETQUOTA,USRQUOTA),euser_id,(char *) &D);
+   restore_re_uid();
  #else /* !__FreeBSD__ && !AIX && !__OpenBSD__ */
    r=quotactl(Q_GETQUOTA, dev_disk, euser_id, &D);
  #endif /* !__FreeBSD__ && !AIX && !__OpenBSD__ */
Comment 1 Gerald (Jerry) Carter (dead mail address) 2004-03-16 11:06:34 UTC
Thanks.  Applying to 3.0 and HEAD.
Comment 2 Gerald (Jerry) Carter (dead mail address) 2005-08-24 10:16:19 UTC
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.
Comment 3 Gerald (Jerry) Carter (dead mail address) 2005-11-14 09:25:16 UTC
database cleanup