bug in Sunos5 NFS quota code

rohitm at engr.uconn.edu rohitm at engr.uconn.edu
Wed Apr 17 07:31:01 GMT 2002


Hi guys, I am a samba newbie, but I am pretty sure I found
a bug in the code for quotas.  We are reexporting NFS mounted
filesystems to Windows clients from a Solaris 2.8 box, and users
currently see the size of the disk, not their quota.

So I compiled samba2.2.3a --with-quotas and it did work.  However
all sizes were off by a factor of 8 :(  After some scrutiny, I did
find the culprit.  It is here in quotas.c line 483-x:

if (D.dqb_curblocks == D.dqb_curblocks == 1)
                *bsize = 512;

I believe this always evaluates to false.  So I modified it to
be:

if (D.dqb_curblocks == 1)
                *bsize = 512;
 
and now our quotas *seem* to work correctly.

Certainly I am going to test some more before putting it into
production.

I just thought I'd drop a line to someone who is actually familirt with
the code and can put it into CVS.

Thanks!

Rohit


 





More information about the samba-technical mailing list