From: Uri Simchoni Date: Thu, 26 May 2016 07:24:58 +0000 (+0300) Subject: s3-sysquotas-linux: do not check for EDQUOT X-Git-Tag: tdb-1.3.10~1040 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3b352d3526ae075db7a90733617010befdb3c746;p=thirdparty%2Fsamba.git s3-sysquotas-linux: do not check for EDQUOT When obtaining user/group quota, remove check for EDQUOT errno return. Apparently on some Unices, EDQUOT means that the get-quota function has succeeded, but the user/group is over-quota. Not so in Linux. Signed-off-by: Uri Simchoni Reviewed-by: Jeremy Allison --- diff --git a/source3/lib/sysquotas_linux.c b/source3/lib/sysquotas_linux.c index 55d1518c0eb..c0987de9299 100644 --- a/source3/lib/sysquotas_linux.c +++ b/source3/lib/sysquotas_linux.c @@ -59,7 +59,8 @@ int sys_get_vfs_quota(const char *path, const char *bdev, "SMB_USER_QUOTA_TYPE uid[%u]\n", path, bdev, (unsigned)id.uid)); - if ((ret = quotactl(QCMD(Q_GETQUOTA,USRQUOTA), bdev, id.uid, (caddr_t)&D))&&errno != EDQUOT) { + if ((ret = quotactl(QCMD(Q_GETQUOTA, USRQUOTA), bdev, + id.uid, (caddr_t)&D))) { return ret; } @@ -69,7 +70,8 @@ int sys_get_vfs_quota(const char *path, const char *bdev, "SMB_GROUP_QUOTA_TYPE gid[%u]\n", path, bdev, (unsigned)id.gid)); - if ((ret = quotactl(QCMD(Q_GETQUOTA,GRPQUOTA), bdev, id.gid, (caddr_t)&D))&&errno != EDQUOT) { + if ((ret = quotactl(QCMD(Q_GETQUOTA, GRPQUOTA), bdev, + id.gid, (caddr_t)&D))) { return ret; }