mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
r9203: Bugzilla bug #2314. Cast away the const of the dev argument to quotactl to
remove the compiler warning. This is safe since quotactl doesn't modify the dev
argument.
(This used to be commit ec4ea17ce6
)
This commit is contained in:
parent
a389bf7ae5
commit
1f666a2556
@ -95,7 +95,7 @@ int sys_get_vfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qt
|
||||
DEBUG(10,("sys_get_vfs_quota: path[%s] bdev[%s] SMB_USER_QUOTA_TYPE uid[%u]\n",
|
||||
path, bdev, (unsigned)id.uid));
|
||||
|
||||
if ((ret = quotactl(QCMD(Q_GETQUOTA,USRQUOTA), bdev, id.uid, (void *)&D))&&errno != EDQUOT) {
|
||||
if ((ret = quotactl(QCMD(Q_GETQUOTA,USRQUOTA), (caddr_t)bdev, id.uid, (void *)&D))&&errno != EDQUOT) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -112,7 +112,7 @@ int sys_get_vfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qt
|
||||
DEBUG(10,("sys_get_vfs_quota: path[%s] bdev[%s] SMB_GROUP_QUOTA_TYPE gid[%u]\n",
|
||||
path, bdev, (unsigned)id.gid));
|
||||
|
||||
if ((ret = quotactl(QCMD(Q_GETQUOTA,GRPQUOTA), bdev, id.gid, (void *)&D))&&errno != EDQUOT) {
|
||||
if ((ret = quotactl(QCMD(Q_GETQUOTA,GRPQUOTA), (caddr_t)bdev, id.gid, (void *)&D))&&errno != EDQUOT) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -129,9 +129,9 @@ int sys_get_vfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qt
|
||||
id.uid = getuid();
|
||||
|
||||
DEBUG(10,("sys_get_vfs_quota: path[%s] bdev[%s] SMB_USER_FS_QUOTA_TYPE (uid[%u])\n",
|
||||
path, bdev, (unsigned)id.uid));
|
||||
path, (caddr_t)bdev, (unsigned)id.uid));
|
||||
|
||||
if ((ret = quotactl(QCMD(Q_GETQUOTA,USRQUOTA), bdev, id.uid, (void *)&D))==0) {
|
||||
if ((ret = quotactl(QCMD(Q_GETQUOTA,USRQUOTA), (caddr_t)bdev, id.uid, (void *)&D))==0) {
|
||||
qflags |= QUOTAS_DENY_DISK;
|
||||
}
|
||||
|
||||
@ -144,7 +144,7 @@ int sys_get_vfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qt
|
||||
DEBUG(10,("sys_get_vfs_quota: path[%s] bdev[%s] SMB_GROUP_FS_QUOTA_TYPE (gid[%u])\n",
|
||||
path, bdev, (unsigned)id.gid));
|
||||
|
||||
if ((ret = quotactl(QCMD(Q_GETQUOTA,GRPQUOTA), bdev, id.gid, (void *)&D))==0) {
|
||||
if ((ret = quotactl(QCMD(Q_GETQUOTA,GRPQUOTA), (caddr_t)bdev, id.gid, (void *)&D))==0) {
|
||||
qflags |= QUOTAS_DENY_DISK;
|
||||
}
|
||||
|
||||
@ -202,14 +202,14 @@ int sys_set_vfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qt
|
||||
DEBUG(10,("sys_set_vfs_quota: path[%s] bdev[%s] SMB_USER_QUOTA_TYPE uid[%u]\n",
|
||||
path, bdev, (unsigned)id.uid));
|
||||
|
||||
ret = quotactl(QCMD(Q_SETQLIM,USRQUOTA), bdev, id.uid, (void *)&D);
|
||||
ret = quotactl(QCMD(Q_SETQLIM,USRQUOTA), (caddr_t)bdev, id.uid, (void *)&D);
|
||||
break;
|
||||
#ifdef HAVE_GROUP_QUOTA
|
||||
case SMB_GROUP_QUOTA_TYPE:
|
||||
DEBUG(10,("sys_set_vfs_quota: path[%s] bdev[%s] SMB_GROUP_QUOTA_TYPE gid[%u]\n",
|
||||
path, bdev, (unsigned)id.gid));
|
||||
|
||||
ret = quotactl(QCMD(Q_SETQLIM,GRPQUOTA), bdev, id.gid, (void *)&D);
|
||||
ret = quotactl(QCMD(Q_SETQLIM,GRPQUOTA), (caddr_t)bdev, id.gid, (void *)&D);
|
||||
break;
|
||||
#endif /* HAVE_GROUP_QUOTA */
|
||||
case SMB_USER_FS_QUOTA_TYPE:
|
||||
@ -228,7 +228,7 @@ int sys_set_vfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qt
|
||||
path, bdev, (unsigned)id.uid));
|
||||
|
||||
#if 0
|
||||
ret = quotactl(QCMD(Q_GETQUOTA,USRQUOTA), bdev, id.uid, (void *)&D);
|
||||
ret = quotactl(QCMD(Q_GETQUOTA,USRQUOTA), (caddr_t)bdev, id.uid, (void *)&D);
|
||||
|
||||
if ((qflags"AS_DENY_DISK)||(qflags"AS_ENABLED)) {
|
||||
if (ret == 0) {
|
||||
@ -241,14 +241,14 @@ int sys_set_vfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qt
|
||||
return -1;
|
||||
}
|
||||
|
||||
ret = quotactl(QCMD(Q_QUOTAON,USRQUOTA), bdev, -1,(void *)quota_file);
|
||||
ret = quotactl(QCMD(Q_QUOTAON,USRQUOTA), (caddr_t)bdev, -1,(void *)quota_file);
|
||||
} else {
|
||||
ret = 0;
|
||||
}
|
||||
} else {
|
||||
if (ret != 0) {
|
||||
/* turn off */
|
||||
ret = quotactl(QCMD(Q_QUOTAOFF,USRQUOTA), bdev, -1, (void *)0);
|
||||
ret = quotactl(QCMD(Q_QUOTAOFF,USRQUOTA), (caddr_t)bdev, -1, (void *)0);
|
||||
} else {
|
||||
ret = 0;
|
||||
}
|
||||
@ -257,7 +257,7 @@ int sys_set_vfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qt
|
||||
DEBUG(0,("sys_set_vfs_quota: ret(%d) errno(%d)[%s] uid(%d) bdev[%s]\n",
|
||||
ret,errno,strerror(errno),id.uid,bdev));
|
||||
#else
|
||||
if ((ret = quotactl(QCMD(Q_GETQUOTA,USRQUOTA), bdev, id.uid, (void *)&D))==0) {
|
||||
if ((ret = quotactl(QCMD(Q_GETQUOTA,USRQUOTA), (caddr_t)bdev, id.uid, (void *)&D))==0) {
|
||||
oldqflags |= QUOTAS_DENY_DISK;
|
||||
}
|
||||
|
||||
@ -298,14 +298,14 @@ int sys_set_vfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qt
|
||||
return -1;
|
||||
}
|
||||
|
||||
ret = quotactl(QCMD(Q_QUOTAON,GRPQUOTA), bdev, -1,(void *)quota_file);
|
||||
ret = quotactl(QCMD(Q_QUOTAON,GRPQUOTA), (caddr_t)bdev, -1,(void *)quota_file);
|
||||
} else {
|
||||
ret = 0;
|
||||
}
|
||||
} else {
|
||||
if (ret != 0) {
|
||||
/* turn off */
|
||||
ret = quotactl(QCMD(Q_QUOTAOFF,GRPQUOTA), bdev, -1, (void *)0);
|
||||
ret = quotactl(QCMD(Q_QUOTAOFF,GRPQUOTA), (caddr_t)bdev, -1, (void *)0);
|
||||
} else {
|
||||
ret = 0;
|
||||
}
|
||||
@ -314,7 +314,7 @@ int sys_set_vfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qt
|
||||
DEBUG(0,("sys_set_vfs_quota: ret(%d) errno(%d)[%s] uid(%d) bdev[%s]\n",
|
||||
ret,errno,strerror(errno),id.gid,bdev));
|
||||
#else
|
||||
if ((ret = quotactl(QCMD(Q_GETQUOTA,GRPQUOTA), bdev, id.gid, (void *)&D))==0) {
|
||||
if ((ret = quotactl(QCMD(Q_GETQUOTA,GRPQUOTA), (caddr_t)bdev, id.gid, (void *)&D))==0) {
|
||||
oldqflags |= QUOTAS_DENY_DISK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user