Bug 12871 - get quota command broken
get quota command broken
Status: NEW
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services
4.6.5
All All
: P5 normal
: ---
Assigned To: Samba QA Contact
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-03 10:13 UTC by Stephan
Modified: 2017-07-03 10:33 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan 2017-07-03 10:13:21 UTC
Hi,

samba 4.6.5 seems to have broken the get quota command. I can't tell in which version this problem surfaced but I can tell that it still kind of worked in 4.2.12. The problem is that the command does not get called with the proper arguments, according to the manpage it is still a combination of either 1 or 3 as query type and the uid/gidnumber or 2 or 4 with -1 as uid/gidnumber. The behavoiur in samba 4.2.12 is to combine 2 or 4 as type of query with a correct uid/gidnumber which is wrong but at least can be worked around in the script:

[2017/07/03 11:52:31.582927,  3, pid=11520, effective(1001, 1000), real(1001, 0), class=quota] ../source3/lib/sysquotas.c:218(command_get_quota)
  get_quota: Running command /usr/local/bin/getsambaquota.pl . 2 1001

It is worse in 4.6.5 - the query type is correct now but there is no uidnumber in the call:

[2017/07/03 11:56:22.372398,  3, pid=15426, effective(1001, 1000), real(1001, 0), class=quota] ../source3/lib/sysquotas.c:273(command_get_quota)
  get_quota: Running command /usr/local/bin/getsambaquota.pl . 1 -1


[2017/07/03 11:56:22.209320,  3, pid=15426, effective(1001, 1000), real(1001, 0), class=quota] ../source3/lib/sysquotas.c:273(command_get_quota)
  get_quota: Running command /usr/local/bin/getsambaquota.pl . 3 -1

which is why the script fails since it obviously can't tell the quota without a proper uidnumber.