From: Uri Simchoni Date: Fri, 27 May 2016 18:51:38 +0000 (+0300) Subject: s3-sysquotas: remove special handling of EDQUOT X-Git-Tag: tdb-1.3.10~1037 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b79ea7d3fb92ba95b3368604e79dbb26e88a4acf;p=thirdparty%2Fsamba.git s3-sysquotas: remove special handling of EDQUOT The sysquotas module has several supported backends for getting/setting user/group quota. This patch removes a check by the common code, to see if the backend has returned EDQUOT. Before this patch, it was OK for a backend to return with error and errno set to EDQUOT, and that meant success, but with a warning that the user/group is over quota. This is the system behavior on some Unices. This patch removes this from the protocol between the sysquota module and its backend drivers - it's the responsibility of the backend to return 0 iff it has fulfilled the request to get or set quota. Signed-off-by: Uri Simchoni Reviewed-by: Jeremy Allison --- diff --git a/source3/lib/sysquotas.c b/source3/lib/sysquotas.c index 102e4580e32..c2d09dabf1b 100644 --- a/source3/lib/sysquotas.c +++ b/source3/lib/sysquotas.c @@ -493,11 +493,6 @@ int sys_get_quota(const char *path, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DI SAFE_FREE(bdev); SAFE_FREE(fs); - if ((ret!=0)&& (errno == EDQUOT)) { - DEBUG(10,("sys_get_quota() warning over quota!\n")); - return 0; - } - return ret; } @@ -560,11 +555,6 @@ int sys_set_quota(const char *path, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DI SAFE_FREE(bdev); SAFE_FREE(fs); - if ((ret!=0)&& (errno == EDQUOT)) { - DEBUG(10,("sys_set_quota() warning over quota!\n")); - return 0; - } - return ret; }