quota support on Solaris 10

Uri Simchoni uri at samba.org
Wed Jan 13 05:28:04 UTC 2016


Oh, I get it. It's a bug in the build system.

First of all, clarification on the "old" vs "new" which seems to bother 
you a bit. The "new" vs "old" pertains to samba code, not to the OS on 
which it runs. So there's legacy code that determines quota for the 
purpose of finding out free disk space, in quotas.c, and there's newer 
code in sysquotas.c, also usable for SMB quota-related requests, which 
is built on determining the file system type and finding a suitable 
backend for it. It seems that your machine cannot use the "new" code, 
but would be happy with the "old" code.

The "old" code depends on WITH_QUOTAS being set during configure. But 
currently, wscript only sets WITH_QUOTAS if the "new" quota interface is 
available.

The way it was done with the 3.6.x build was to throw the quotas.c file 
at the compiler during configure time and see if it compiles. I tried 
doing the same here but so far failed, and kind of ran out of time for 
the moment. Perhaps the right approach is to create a .c test file that 
is a stripped-down version of quotas.c, whose successful compilation 
would mean that WITH_QUOTAS can be set. I hope I'll be able to get back 
to it in a few days or that someone will pick this up.

You can file a bug in bugzilla for this.
Thanks,
Uri.

On 01/12/2016 11:13 PM, Andrew Morgan wrote:
> vx_quota.h isn't found in the v3.6.25 build either:
>
> configure:32948: checking for sys/fs/vx_quota.h
> configure:32948: result: no
>
> If my memory is correct, Veritas doesn't distribute that file anymore 
> (and hasn't for many years).  They support the "standard" ioctl method 
> of quota management in Solaris.
>
> The standard Solaris quota.h file is:
>
>   /usr/include/sys/fs/ufs_quota.h
>
> but the configure (waf) script doesn't search for it there (see 
> original message below).  However, Samba v4.3.3's file 
> source3/smbd/quotas.c does use it:
>
> ...
> #if defined(SUNOS5)
> #include <sys/fs/ufs_quota.h>
> #include <sys/mnttab.h>
> #include <sys/mntent.h>
> ...
>
>
> I don't know what "old quota support" in v3.6.25 actually did.  :)
>
>     Andy
>
> On Tue, 12 Jan 2016, Uri Simchoni wrote:
>
>> I don't have actual experience with Solaris/Veritas, but it seems the 
>> test for header file sys/fs/vx_quota.h is what's failing you. The 
>> same test is being done in the old build system - what's the result 
>> there?
>>
>> HTH,
>> Uri.
>>
>> On 01/12/2016 02:53 AM, Andrew Morgan wrote:
>>> I'm having trouble getting quotas to work on Solaris 10 with Samba 
>>> v4.3.3 and Veritas v5.1.  I'm pretty sure this was working on Samba 
>>> v3.6.25 before I upgraded.
>>>
>>> From the configure output on v4.3.3:
>>>
>>> [root at chernobyl samba-4.3.3]# grep quota configure.log
>>> Checking for header sys/fs/vx/quota.h                        : no
>>> Checking for header sys/fs/vx_quota.h : no
>>> Checking for header sys/quota.h : no
>>> Checking for header ufs/ufs/quota.h : no
>>> for XFS QUOTA in <sys/quota.h> : not found
>>> Checking for header rpcsvc/rquota.h : yes
>>> Checking for member getquota_rslt_u in struct getquota_rslt : ok
>>> for QUOTACTL_4A: long quotactl(int cmd, char *special, qid_t id, 
>>> caddr_t addr)                  : not found
>>> for QUOTACTL_4B:  int quotactl(const char *path, int cmd, int id, 
>>> char *addr)                   : not found
>>>
>>>
>>> Looking through config.log on v3.6.25, I see a lot of quota tests 
>>> that fail, but then it finds this:
>>>
>>> configure:33475: checking whether the old quota support works
>>> configure:33499: gcc -c -std=gnu99  -D_REENTRANT -D_LARGEFILE_SOURCE 
>>> -D_FILE_OFFSET_BITS=64 -I/usr/include -DLDAP_DEPRECATED-DSUNOS5 
>>> -Iinclude -I./include  -I. -I. -I./../lib/replace -I./librpc -I./.. 
>>> -I./../lib/popt -I./../lib/talloc -I./../lib/tevent 
>>> -I../lib/tdb/include conftest.c >&5
>>> configure:33499: $? = 0
>>> configure:33508: result: yes
>>> configure:33511: checking whether to use the old quota support
>>> configure:33518: result: yes
>>>
>>>
>>> Does this ring a bell for anyone?
>>>
>>> Thanks,
>>>     Andy
>>>
>>
>>
>>
>




More information about the samba-technical mailing list