s3-sysquotas-linux: do not check for EDQUOT
authorUri Simchoni <uri@samba.org>
Thu, 26 May 2016 07:24:58 +0000 (10:24 +0300)
committerJeremy Allison <jra@samba.org>
Tue, 31 May 2016 22:57:32 +0000 (00:57 +0200)
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 <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/lib/sysquotas_linux.c

index 55d1518c0eba71639ab1f0e0b4df51b5abf57360..c0987de9299913740f9c1d31c72c5c898311ca48 100644 (file)
@@ -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;
                        }