#ifdef HAVE_SYS_QUOTA missing in source3/smbd/smb2-getinfo.c
nopower at suse.com
Wed Aug 8 08:28:01 UTC 2018
Did you have a chance yet to check if the patch (attached) worked for you ?
On 07/08/18 13:26, Noel Power wrote:
> Please use this patch (typo in previous version)
> On 07/08/18 12:56, Noel Power via samba-technical wrote:
>> On 06/08/18 22:25, Christopher O Cowan via samba-technical wrote:
>>> Presently, when I configure and compile on AIX, HAVE_SYS_QUOTA is not set.
>>> I haven't had time to look into deeply into the wscripts, but the main
>>> quota header is /usr/include/sys/fs/quota_common.h, rather
>>> than /usr/include/sys/quota.h (like Linux).
>> It would be great if you could open a separate bug for that with maybe
>> the output of configure (and bin/config.log) attached too. Even better
>> if you are able to debug more what is going on, for one I don't have
>> access to any AIX systems and am not familiar with it.
>>> Noel Power's commit b8802e2 introduced an #ifdef HAVE_SYS_QUOTA wrapper
>>> around the declaration of smbd_do_query_getinfo_quota() and some other
>>> functions, in source3/smbd/proto.h. When I attempted to run the latest
>>> smbd, it was failing to load.
>> I presume you are using a self built samba, this is strange since I
>> would have expected the build to fail as clearly
>> 'smbd_do_query_getinfo_quota' is not defined, I would have expected a
>> compile or link failure. I get a compile failure if I force quota
>> detection to fail (but that is on linux of course)
>>> My temporary solution was to add an #ifdef HAVE_SYS_QUOTA at line 584 in
>>> source3/smbd/smb2_getinfo.c, closing it at line 600. Just enough to
>>> exclude the inline call to smbd_do_query_getinfo_quota(). Seemed to just
>>> be throwing an exception, anyway.
>> I am surprised though how that the code is even getting to this point
>> and a request for SMB2_GETINFO_QUOTA has taken place, the server already
>> should have responded that volume quotas are not supported in the normal
>> conversation that takes place for quota information to be exchanged. Is
>> this some custom client ? and/or anything special taking place ?
>>> Seems to have fixed the problem for me, but someone may want to look at
>>> this a bit more closely, since there were several other calls bracketed in
>> which ?, I only see this function
>> Please try the attached patch and see if it works for you and let us know
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1903 bytes
Desc: not available
More information about the samba-technical