mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
smbd/quotas: Remove invalid quota status switch case
getquota_rslt structure from rquota.h defines the enum named status whose values start from 1. But in quotas.c we have an invalid check for status 0. This change is to remove that particular switch case. Signed-off-by: Anoop C S <anoopcs@redhat.com> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Oct 24 01:31:21 CEST 2015 on sn-devel-104
This commit is contained in:
parent
3e6af7109e
commit
11620aefac
@ -171,17 +171,12 @@ static bool nfs_quotas(char *nfspath, uid_t euser_id, uint64_t *bsize, uint64_t
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* gqr.status returns 0 if the rpc call fails, 1 if quotas exist, 2 if there is
|
* gqr.status returns 1 if quotas exist, 2 if there is
|
||||||
* no quota set, and 3 if no permission to get the quota. If 0 or 3 return
|
* no quota set, and 3 if no permission to get the quota.
|
||||||
* something sensible.
|
* If 3, return something sensible.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
switch (gqr.status) {
|
switch (gqr.status) {
|
||||||
case 0:
|
|
||||||
DEBUG(9,("nfs_quotas: Remote Quotas Failed! Error \"%i\" \n", gqr.status));
|
|
||||||
ret = False;
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
DEBUG(9,("nfs_quotas: Good quota data\n"));
|
DEBUG(9,("nfs_quotas: Good quota data\n"));
|
||||||
D.dqb_bsoftlimit = gqr.getquota_rslt_u.gqr_rquota.rq_bsoftlimit;
|
D.dqb_bsoftlimit = gqr.getquota_rslt_u.gqr_rquota.rq_bsoftlimit;
|
||||||
@ -197,8 +192,10 @@ static bool nfs_quotas(char *nfspath, uid_t euser_id, uint64_t *bsize, uint64_t
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
DEBUG(9,("nfs_quotas: Remote Quotas Questionable! Error \"%i\" \n", gqr.status ));
|
DEBUG(9, ("nfs_quotas: Unknown Remote Quota Status \"%i\"\n",
|
||||||
break;
|
gqr.status));
|
||||||
|
ret = false;
|
||||||
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUG(10,("nfs_quotas: Let`s look at D a bit closer... status \"%i\" bsize \"%i\" active? \"%i\" bhard \"%i\" bsoft \"%i\" curb \"%i\" \n",
|
DEBUG(10,("nfs_quotas: Let`s look at D a bit closer... status \"%i\" bsize \"%i\" active? \"%i\" bhard \"%i\" bsoft \"%i\" curb \"%i\" \n",
|
||||||
|
Loading…
Reference in New Issue
Block a user