1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-10 12:58:35 +03:00

47558 Commits

Author SHA1 Message Date
Jeremy Allison
af2e4763bf CVE-2015-7560: s3: smbd: Refuse to set a POSIX ACL on a symlink.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11648

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2016-03-08 11:55:16 +01:00
Jeremy Allison
4be4e40788 CVE-2015-7560: s3: smbd: Refuse to set an ACL from a POSIX file handle on a symlink.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11648

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2016-03-08 11:55:16 +01:00
Jeremy Allison
e90c33e852 CVE-2015-7560: s3: smbd: Refuse to get an ACL from a POSIX file handle on a symlink.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11648

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2016-03-08 11:55:15 +01:00
Jeremy Allison
468f67b7ce CVE-2015-7560: s3: smbd: Add refuse_symlink() function that can be used to prevent operations on a symlink.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11648

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2016-03-08 11:55:15 +01:00
Christian Ambach
22126435d3 selftest: Add a blackbox test for smbget
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Fri Feb 26 14:40:55 CET 2016 on sn-devel-144

(cherry picked from commit 39081afbe5f79192f6b42aa5670ebb757c98e875)

The last 11 patches address

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11767
removal of smbget -P option

Autobuild-User(v4-4-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-4-test): Fri Mar  4 14:55:10 CET 2016 on sn-devel-144
2016-03-04 14:55:10 +01:00
Christian Ambach
7ebf6603f5 s3:utils/smbget fix option parsing
* use proper values for val in poptOption
* popt does not support bool, so set them via the switch statement
* abort when option parsing reported errors

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit fcb56e0e1150f995823aff7dbcb0c09b87a39f6d)
2016-03-04 11:40:12 +01:00
Christian Ambach
7ea03124cb s3:utils/smbget remove -P option
as agreed on samba-technical list.
It does not really provide a useful function but can cause confusion

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit dfc35044d81d413b03d5bf2b33c07c82a244ff57)
2016-03-04 11:40:11 +01:00
Christian Ambach
5298c3624c s3:utils/smbget improve check of write() result
check that all bytes in the buffer have been written

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit 113f8dd3d9e0d04b03b61f415b3c410ba75260f5)
2016-03-04 11:40:11 +01:00
Christian Ambach
b24f89890f s3:utils/smbget abort recursive download on error
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit 01ba35dca2f721fa5b3c31da7fa991e7d1479cc7)
2016-03-04 11:40:11 +01:00
Christian Ambach
ac81bbc130 s3:utils/smbget another int -> bool conversion
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit c91dde9caec39ac76d50602f8b32b6917dfeefba)
2016-03-04 11:40:11 +01:00
Robin Hack
52033ae75f samba3.blackbox.smbclient.forceuser_validusers: Add new test for force user option.
Test covers commit
cf0934caf282f4ade8c8a701b0e40b68a2f17ace

BUG: https://bugzilla.samba.org/show_bug.cgi?id=9878
RH BUG: https://bugzilla.redhat.com/show_bug.cgi?id=1077651

How to test:
$ make -j test TESTS="samba3.blackbox.smbclient.forceuser_validusers"
RESULD: Should PASS
$ git revert cf0934caf282f4ade8c8a701b0e40b68a2f17ace
$ make -j test TESTS="samba3.blackbox.smbclient.forceuser_validusers"
RESULT: Should FAIL

Signed-off-by: Robin Hack <rhack@redhat.com>
Reviewed-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Uri Simchoni <uri@samba.org>
Autobuild-Date(master): Thu Feb  4 03:44:42 CET 2016 on sn-devel-144

(cherry picked from commit e2699685cad6fc341079ac4a677df8d6be26e9d9)
2016-03-04 11:40:11 +01:00
Uri Simchoni
e787720dce passdb: add linefeed to debug message
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11763

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Mar  1 15:24:35 CET 2016 on sn-devel-144

(cherry picked from commit fb4778f4e9834af556bd5aac177fc04e7f09f152)
2016-03-04 11:40:11 +01:00
Uri Simchoni
1372a32700 smbd: ignore SVHDX create context
According to discussions with dochelp@microsoft.com, an SMB
server should ignore an SVHDX_OPEN_DEVICE_CONTEXT or
SVHDX_OPEN_DEVICE_CONTEXT_V2 create context if it does not
support the RSVD protocol. This is contrary to [MS-SMB2] rev 48.0
which states (3.3.5.9.14) that the open should fail in this case.

Failing the create fails Windows backup if the SMB dialect is
SMB3.0.2 or higher.

Hopefully a new revision of MS-SMB2 will clear this up in the future.

Meanwhile, this patch modifies smbd to ignore the
SVHDX_OPEN_DEVICE_CONTEXT by default. This can be overriden by a VFS
module if a VFS module adds support for RSVD.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11753

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
(cherry picked from commit c11ad90a240a7703e04d290f78c15839ba31d733)
2016-03-04 11:40:11 +01:00
Uri Simchoni
2335e6fa8f winbindd: return trust parameters when listing trusts
When asking a child domain process to list trusts on that domain,
return (along with trust domain names and SID) the trust properties -
flags, type, and attributes.

Use those attributes to initialize domain object.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11691

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Tue Feb 23 22:02:16 CET 2016 on sn-devel-144

(cherry picked from commit 7b4dfd939f417c7d8c4c2c1e8c77f4af9bcd28d7)
2016-03-04 11:40:11 +01:00
Uri Simchoni
46c12895fb winbindd: initialize foreign domain as AD based on trust
Based on trust parameters, initialize the active_directory
member of domain object to true.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11691

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit d0aa5d057497022aeefffa9882d3ac2b7e18a682)
2016-03-04 11:40:11 +01:00
Uri Simchoni
f9aef97053 winbindd: introduce add_trusted_domain_from_tdc()
This is purely a refactoring patch -
Add a routine that adds a winbindd domain object based on
domain trust cache entry. add_trusted_domain() becomes
a wrapper for this new routine.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11691

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit c65841a3bd737b61251603a916a315043703c832)
2016-03-04 11:40:11 +01:00
Alberto Maria Fiaschi
9004fa428c access based share enum: handle permission set in configuration files
change function is_enumeration_allowed to check  permissions set by
fields: valid users, invalid users, only user.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=8093

Signed-off-by: Alberto Maria Fiaschi <alberto.fiaschi@estar.toscana.it>
Reviewed-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit 5036a0922b7890005bcc8b77368a6635c8ebeb4b)
2016-03-04 11:40:11 +01:00
Michael Adam
c3735243f7 dlist: remove unneeded argument from DLIST_DEMOTE()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit d6f5fc8c2d3db3daa2209850ef0487e822c7bb92)
2016-03-04 11:40:10 +01:00
Michael Adam
c4536f8cb4 dlist: remove unneeded type argument from DLIST_ADD_END()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 476672b647e44898a6de8894b23e598ad13b1fcf)
2016-03-04 11:40:10 +01:00
Stefan Metzmacher
c17b1f697c s3:clispnego: fix confusing warning in spnego_gen_krb5_wrap()
asn1_extract_blob() stops further asn1 processing by setting has_error.

Don't call asn1_has_error() after asn1_extract_blob() has been successful
otherwise we get an "Failed to build krb5 wrapper at" message
on success.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11702

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 14f1a94b6fb3a55be1e60fe0d28740f04fd94b3f)
2016-03-04 11:40:10 +01:00
Stefan Metzmacher
6342580047 s3:libads: setup the msDS-SupportedEncryptionTypes attribute on ldap_add
We may not have the permission to modify the object after creation.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11755

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Björn Jacke <bj@sernet.de>
Reviewed-by: Günther Deschner <gd@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Feb 26 11:30:03 CET 2016 on sn-devel-144

Autobuild-User(v4-4-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-4-test): Mon Feb 29 14:35:08 CET 2016 on sn-devel-144
2016-02-29 14:35:07 +01:00
Hemanth Thummala
a2aea37161 Real memeory leak(buildup) issue in loadparm.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11740

As part of reload services, unused service ptr structures are getting
unloaded without actually freeingup the memory associated to them.

Made changes to freeup those allocations on unload. On reload, reuse the
slots in ServicePtr global array instead of extending the array with
holes.

Also we should mark shares like IPC$ as auto loaded as they never be
exposed to users.

Signed-off-by: Hemanth Thummala <hemanth.thummala@nutanix.com>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Feb 17 22:30:25 CET 2016 on sn-devel-144

(cherry picked from commit 03081c2c1484504bdcc0e111b2df95e073c1c166)

Autobuild-User(v4-4-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-4-test): Mon Feb 22 19:33:58 CET 2016 on sn-devel-144
2016-02-22 19:33:58 +01:00
Andreas Schneider
1a70742474 s3-waf: Install smbspool_krb5_wrapper in LIBEXECDIR
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11739

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>

(cherry picked from commit b504918372df0a55585c92da445f4e1fba4af04a)
2016-02-22 16:18:22 +01:00
Christian Ambach
08b1ff8d8c s3:utils/smbget set default blocksize
this got lost in the recent refactorings and causes problems
when smbget attempts to use a zero byte read buffer

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Feb  5 12:10:16 CET 2016 on sn-devel-144

(cherry picked from commit da2aae933e3964aafce05c74755244e0f2b4d982)

The last 2 patches address the following
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11700
smbget options should be streamlined with the rest of the Samba utils
2016-02-16 09:32:11 +01:00
Christian Ambach
5ca762425b s3:utils/smbget add a error message on allocation error
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 64121471f98cfeaf48b701b3b85614a7436d3da9)
2016-02-16 09:32:11 +01:00
Hemanth Thummala
903b13eae3 loadparm: Fix memory leak issue.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11708

Signed-off-by: Hemanth Thummala <hemanth.thummala@nutanix.com>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Feb  4 12:39:14 CET 2016 on sn-devel-144

(cherry picked from commit 8247d93701ed838190fe74044a63a56d63d37bf5)
2016-02-16 09:32:11 +01:00
Jeremy Allison
f3bca17914 s3: smbd: posix_acls: Fix check for setting u:g:o entry on a filesystem with no ACL support.
Since 4.0.x we add 2 additional ACE entries, one SMB_ACL_USER
and SMB_ACL_GROUP to match the existing SMB_ACL_USER_OBJ and
SMB_ACL_GROUP_OBJ entries. The two additional entries break
the simple "must have 3 entries" check done inside convert_canon_ace_to_posix_perms().
Replace this with a more complete test.

Problem and initial fix provided by <tcleamy@ucdavis.edu>

BUG: https://bugzilla.samba.org/show_bug.cgi?id=10489

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>

Autobuild-User(master): Uri Simchoni <uri@samba.org>
Autobuild-Date(master): Thu Feb 11 11:14:53 CET 2016 on sn-devel-144

(cherry picked from commit 5172bf0c5b0672c1479c2ad776460956aa469bca)
2016-02-16 09:32:11 +01:00
Jose A. Rivera
0221677226 s3:smbd:open: Skip redundant call to file_set_dosmode when creating a new file.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11727

Signed-off-by: Jose A. Rivera <jarrpa@samba.org>
Pair-programmed-with: Ira Cooper <ira@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Feb  5 04:37:43 CET 2016 on sn-devel-144

(cherry picked from commit aec07b8b60ff9589a3c84eef6adeca464e6c01f6)
2016-02-16 09:32:10 +01:00
Volker Lendecke
c358f3c120 smbd: Fix CID 1351216 Dereference null return value
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11725

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
(cherry picked from commit f1933618500f8c4787f3bf7aa260e21cd6bf7cd8)
2016-02-16 09:32:10 +01:00
Volker Lendecke
ed8a55f1ef smbd: Fix CID 1351215 Improper use of negative value
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11724

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Wed Feb  3 15:03:09 CET 2016 on sn-devel-144

(cherry picked from commit 2d80498e64bc7f9e1fd2d080825c1e8904018a19)
2016-02-16 09:32:10 +01:00
Michael Adam
ac49d96546 s3:vfs:glusterfs: fix build after quota changes.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11715

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>

Autobuild-User(master): Uri Simchoni <uri@samba.org>
Autobuild-Date(master): Mon Feb  1 22:09:18 CET 2016 on sn-devel-144
2016-02-09 08:54:59 +01:00
Jeremy Allison
f2dc71c785 s3: smbd: Fix timestamp rounding inside SMB2 create.
Setting "dos filetime resolution = yes" should round
to 2 second increments. Fix missing path inside smbd.

Fix confirmed by reporter Hubert Gilch <hg@sepag.de>.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11703

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Jan 29 10:41:01 CET 2016 on sn-devel-144

(cherry picked from commit 8024f532e6bcb6cbd8179817fafdd0f12929d629)

Autobuild-User(v4-4-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-4-test): Wed Feb  3 15:08:20 CET 2016 on sn-devel-144
2016-02-03 15:08:20 +01:00
Christian Ambach
a7046bcf12 s3-utils/smbget: Fix user-/name password reading from rcfile
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11700

As the password option is gone, code needs to be able to read password
from user parameter when user%password syntax is used.

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

(cherry picked from commit cac1086ae12d10a6c424f947045d26badc96d751)
2016-02-03 11:50:25 +01:00
Christian Ambach
9d4cbe61c3 s3-utils/smbget: Fix reading the rcfile
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11700

shortName in POPT_AUTOHELP is null, so the loop always stopped at this
item.

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

(cherry picked from commit bf1c1ad068a763108f9b8f79431de522783a4302)
2016-02-03 11:50:25 +01:00
Andreas Schneider
1ebeb06779 s3-utils/smbget: Fix option parsing and apply samba defaults
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11700

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>

(cherry picked from commit e1548c5bf77186c72f0257592e9084e3b039b87c)
2016-02-03 11:50:25 +01:00
Uri Simchoni
2aadb75d42 selftest: fix test_dfree_quota.sh
Eliminate backslashes from smbcquotas output so that we
don't have to deal with them correctly when parsing the output.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11697

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit e7a8ef4f260cc3d07654664c9e547263a2bc8ee6)
2016-02-03 11:50:25 +01:00
Uri Simchoni
7da9c659d3 smbd: show correct disk size for different quota and dfree block sizes
When file system stats (VFS disk_free_fn) and quota (VFS get_quota_fn)
return different block sizes, normalize values before comparing.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11681

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 67c89715d00abc588239d8220f09cf51a58db05a)
2016-02-03 11:50:25 +01:00
Andreas Schneider
192f1516c3 waf: Only build smb_krb5_wrapper if we have CUPS
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-01-26 15:58:12 +01:00
Uri Simchoni
91eeeb76f0 disk_quotas: style fix
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-01-26 15:58:12 +01:00
Uri Simchoni
6689499488 vfs_gpfs: make sure get_quota does not return bogus values
add implementation of get_quota_fn to vfs_gpfs. The implemetation
returns ENOSYS for the case of user and group quota, to make sure
the default VFS does not accidentally succeed (and return wrong
values which would alter the disk-free calculation)

For other quota types the function calls the underlying VFS as
before.

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-01-26 15:58:12 +01:00
Uri Simchoni
de3c2ed0b1 make disk_norm() static
Now that disk_norm() is being run centrally from the SMB layer
it can be made static.

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-01-26 15:58:12 +01:00
Uri Simchoni
a8eea0c8b0 vfs_gpfs: do not call disk_norm() on disk_free_fn
This is handled at the SMB layer now.

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-01-26 15:58:12 +01:00
Uri Simchoni
9e60cbfc7c vfs_ceph: do not call disk_norm() on disk_free_fn
This is handled at SMB layer now.

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-01-26 15:58:12 +01:00
Uri Simchoni
279c9ce129 vfs_fake_dfq: remove quota code from disk_free
When mocking disk-free, do not take quota into
account since this is now done in the SMB layer.

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-01-26 15:58:12 +01:00
Uri Simchoni
19f9b31759 smbd: refactor disk_free handling
Move most of the logic that handles determination of
disk size and free space from default VFS handler to
the SMB layer - letting the VFS handle the basic task
of querying the file system for general stats and
quota.

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-01-26 15:58:12 +01:00
Uri Simchoni
72231ec5c2 vfs_snapper: add get_quota function
This is in preparation for handling the quota part
of disk_free via the VFS - each module with a
disk_free_fn should also have a get_quota_fn.

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-01-26 15:58:12 +01:00
Uri Simchoni
cc2533576b vfs_shadow_copy2: add get_quota function
This is in preparation for handling the quota part
of disk_free via the VFS - each module with a
disk_free_fn should also have a get_quota_fn.

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-01-26 15:58:12 +01:00
Uri Simchoni
22d757c8d8 vfs_cap: add get_quota function
This is in preparation for handling the quota part
of disk_free via the VFS - each module with a
disk_free_fn should also have a get_quota_fn.

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-01-26 15:58:12 +01:00
Uri Simchoni
c464b9e460 vfs: add path parameter to get_quota
Adding a path parameter would allow the VFS get_quota
function to be used for determining the quota/usage
when calculating size and free spacei.

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-01-26 15:58:12 +01:00
Uri Simchoni
f71761c47a selftest: add disk-free and quota tests based on fake_dfq VFS module
These tests use the vfs_fake_dfq module to simulate some
relations between the quota status and disk-free status.

The tests will become meaningful when we take the code that
does those calculations out of the VFS layer - the tests will
then exercise the server code.

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-01-26 15:58:11 +01:00