summaryrefslogtreecommitdiff
path: root/source3/modules/vfs_default_quota.c
diff options
context:
space:
mode:
authorUri Simchoni <uri@samba.org>2016-01-10 13:29:25 +0200
committerMichael Adam <obnox@samba.org>2016-01-26 15:58:12 +0100
commitc464b9e46069a741014333135728a9342ffa45cb (patch)
treec8ab696528bf6629d24eadda0fd91dcffd885f6c /source3/modules/vfs_default_quota.c
parentf71761c47a4c3b160b60c25a56e01a7a887992ab (diff)
downloadsamba-c464b9e46069a741014333135728a9342ffa45cb.tar.gz
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>
Diffstat (limited to 'source3/modules/vfs_default_quota.c')
-rw-r--r--source3/modules/vfs_default_quota.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/source3/modules/vfs_default_quota.c b/source3/modules/vfs_default_quota.c
index a71d3c297a1..c8d718cb5b9 100644
--- a/source3/modules/vfs_default_quota.c
+++ b/source3/modules/vfs_default_quota.c
@@ -92,11 +92,13 @@
#define DEFAULT_QUOTA_GID_NOLIMIT(handle) \
lp_parm_bool(SNUM((handle)->conn),DEFAULT_QUOTA_NAME,"gid nolimit",DEFAULT_QUOTA_GID_NOLIMIT_DEFAULT)
-static int default_quota_get_quota(vfs_handle_struct *handle, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dq)
+static int default_quota_get_quota(vfs_handle_struct *handle, const char *path,
+ enum SMB_QUOTA_TYPE qtype, unid_t id,
+ SMB_DISK_QUOTA *dq)
{
int ret = -1;
- if ((ret=SMB_VFS_NEXT_GET_QUOTA(handle, qtype, id, dq))!=0) {
+ if ((ret = SMB_VFS_NEXT_GET_QUOTA(handle, path, qtype, id, dq)) != 0) {
return ret;
}
@@ -122,7 +124,8 @@ static int default_quota_get_quota(vfs_handle_struct *handle, enum SMB_QUOTA_TYP
unid_t qid;
uint32_t qflags = dq->qflags;
qid.uid = DEFAULT_QUOTA_UID(handle);
- SMB_VFS_NEXT_GET_QUOTA(handle, SMB_USER_QUOTA_TYPE, qid, dq);
+ SMB_VFS_NEXT_GET_QUOTA(
+ handle, path, SMB_USER_QUOTA_TYPE, qid, dq);
dq->qflags = qflags;
}
break;
@@ -132,7 +135,9 @@ static int default_quota_get_quota(vfs_handle_struct *handle, enum SMB_QUOTA_TYP
unid_t qid;
uint32_t qflags = dq->qflags;
qid.gid = DEFAULT_QUOTA_GID(handle);
- SMB_VFS_NEXT_GET_QUOTA(handle, SMB_GROUP_QUOTA_TYPE, qid, dq);
+ SMB_VFS_NEXT_GET_QUOTA(handle, path,
+ SMB_GROUP_QUOTA_TYPE,
+ qid, dq);
dq->qflags = qflags;
}
break;