[SCM] Samba Shared Repository - branch master updated
Michael Adam
obnox at samba.org
Fri Jun 19 19:12:04 MDT 2015
The branch, master has been updated
via f3798a2 lib/sysquota_linux: Handle the quota flags properly
from f89e9bd rpc: Simplify dcerpc_binding_handle_raw_call()
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit f3798a2b0db199645a4a52833c242bf8975d6f1a
Author: Anoop C S <achiraya at redhat.com>
Date: Fri Jun 19 11:53:23 2015 +0530
lib/sysquota_linux: Handle the quota flags properly
sys_set_vfs_quota() expects the quota flags i.e, qflags
to be updated in the dp structure for which the routines
sys_get_linux_gen_quota(), sys_get_linux_v2_quota() and
sys_get_linux_v1_quota() failed to do so in their
respective definitions. Th error was uncovered by
compiler warnings [-Wunused-but-set-variable] displayed
for qflags variables in the above mentioned functions
and this patch fixes the same.
Signed-off-by: Anoop C S <achiraya at redhat.com>
Reviewed-by: Jose A. Rivera <jarrpa at samba.org>
Reviewed-by: Michael Adam <obnox at samba.org>
Autobuild-User(master): Michael Adam <obnox at samba.org>
Autobuild-Date(master): Sat Jun 20 03:11:19 CEST 2015 on sn-devel-104
-----------------------------------------------------------------------
Summary of changes:
source3/lib/sysquotas_linux.c | 24 ++++++------------------
1 file changed, 6 insertions(+), 18 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/lib/sysquotas_linux.c b/source3/lib/sysquotas_linux.c
index 68b9f90..bf3504a 100644
--- a/source3/lib/sysquotas_linux.c
+++ b/source3/lib/sysquotas_linux.c
@@ -107,8 +107,6 @@ static int sys_get_linux_v1_quota(const char *path, const char *bdev, enum SMB_Q
static int sys_set_linux_v1_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp)
{
int ret = -1;
- uint32_t qflags = 0;
- uint32_t oldqflags = 0;
struct v1_kern_dqblk D;
uint64_t bsize = (uint64_t)QUOTABLOCK_SIZE;
@@ -126,8 +124,6 @@ static int sys_set_linux_v1_quota(const char *path, const char *bdev, enum SMB_Q
D.dqb_isoftlimit = (dp->isoftlimit*dp->bsize)/bsize;
}
- qflags = dp->qflags;
-
switch (qtype) {
case SMB_USER_QUOTA_TYPE:
DEBUG(10,("sys_set_linux_v1_quota: path[%s] bdev[%s] SMB_USER_QUOTA_TYPE uid[%u]\n",
@@ -146,7 +142,7 @@ static int sys_set_linux_v1_quota(const char *path, const char *bdev, enum SMB_Q
path, bdev, (unsigned)id.uid));
if ((ret = quotactl(QCMD(Q_V1_GETQUOTA,USRQUOTA), bdev, id.uid, (caddr_t)&D))==0) {
- oldqflags |= QUOTAS_DENY_DISK;
+ dp->qflags |= QUOTAS_DENY_DISK;
}
break;
@@ -155,7 +151,7 @@ static int sys_set_linux_v1_quota(const char *path, const char *bdev, enum SMB_Q
path, bdev, (unsigned)id.gid));
if ((ret = quotactl(QCMD(Q_V1_GETQUOTA,GRPQUOTA), bdev, id.gid, (caddr_t)&D))==0) {
- oldqflags |= QUOTAS_DENY_DISK;
+ dp->qflags |= QUOTAS_DENY_DISK;
}
break;
@@ -241,8 +237,6 @@ static int sys_get_linux_v2_quota(const char *path, const char *bdev, enum SMB_Q
static int sys_set_linux_v2_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp)
{
int ret = -1;
- uint32_t qflags = 0;
- uint32_t oldqflags = 0;
struct v2_kern_dqblk D;
uint64_t bsize = (uint64_t)QUOTABLOCK_SIZE;
@@ -260,8 +254,6 @@ static int sys_set_linux_v2_quota(const char *path, const char *bdev, enum SMB_Q
D.dqb_isoftlimit = (dp->isoftlimit*dp->bsize)/bsize;
}
- qflags = dp->qflags;
-
switch (qtype) {
case SMB_USER_QUOTA_TYPE:
DEBUG(10,("sys_set_linux_v2_quota: path[%s] bdev[%s] SMB_USER_QUOTA_TYPE uid[%u]\n",
@@ -280,7 +272,7 @@ static int sys_set_linux_v2_quota(const char *path, const char *bdev, enum SMB_Q
path, bdev, (unsigned)id.uid));
if ((ret = quotactl(QCMD(Q_V2_GETQUOTA,USRQUOTA), bdev, id.uid, (caddr_t)&D))==0) {
- oldqflags |= QUOTAS_DENY_DISK;
+ dp->qflags |= QUOTAS_DENY_DISK;
}
break;
@@ -289,7 +281,7 @@ static int sys_set_linux_v2_quota(const char *path, const char *bdev, enum SMB_Q
path, bdev, (unsigned)id.gid));
if ((ret = quotactl(QCMD(Q_V2_GETQUOTA,GRPQUOTA), bdev, id.gid, (caddr_t)&D))==0) {
- oldqflags |= QUOTAS_DENY_DISK;
+ dp->qflags |= QUOTAS_DENY_DISK;
}
break;
@@ -375,8 +367,6 @@ static int sys_get_linux_gen_quota(const char *path, const char *bdev, enum SMB_
static int sys_set_linux_gen_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp)
{
int ret = -1;
- uint32_t qflags = 0;
- uint32_t oldqflags = 0;
struct if_dqblk D;
uint64_t bsize = (uint64_t)QUOTABLOCK_SIZE;
@@ -395,8 +385,6 @@ static int sys_set_linux_gen_quota(const char *path, const char *bdev, enum SMB_
}
D.dqb_valid = QIF_LIMITS;
- qflags = dp->qflags;
-
switch (qtype) {
case SMB_USER_QUOTA_TYPE:
DEBUG(10,("sys_set_linux_gen_quota: path[%s] bdev[%s] SMB_USER_QUOTA_TYPE uid[%u]\n",
@@ -415,7 +403,7 @@ static int sys_set_linux_gen_quota(const char *path, const char *bdev, enum SMB_
path, bdev, (unsigned)id.uid));
if ((ret = quotactl(QCMD(Q_GETQUOTA,USRQUOTA), bdev, id.uid, (caddr_t)&D))==0) {
- oldqflags |= QUOTAS_DENY_DISK;
+ dp->qflags |= QUOTAS_DENY_DISK;
}
break;
@@ -424,7 +412,7 @@ static int sys_set_linux_gen_quota(const char *path, const char *bdev, enum SMB_
path, bdev, (unsigned)id.gid));
if ((ret = quotactl(QCMD(Q_GETQUOTA,GRPQUOTA), bdev, id.gid, (caddr_t)&D))==0) {
- oldqflags |= QUOTAS_DENY_DISK;
+ dp->qflags |= QUOTAS_DENY_DISK;
}
break;
--
Samba Shared Repository
More information about the samba-cvs
mailing list