s3-sysquotas: remove special handling of EDQUOT
authorUri Simchoni <uri@samba.org>
Fri, 27 May 2016 18:51:38 +0000 (21:51 +0300)
committerJeremy Allison <jra@samba.org>
Tue, 31 May 2016 22:57:32 +0000 (00:57 +0200)
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 <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/lib/sysquotas.c

index 102e4580e321965a796b8f57c6d81af715dae8cb..c2d09dabf1be531e8c4978662e2ec252ca60bb69 100644 (file)
@@ -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;             
 }