From: Björn Jacke Date: Wed, 30 Jan 2019 16:00:36 +0000 (+0100) Subject: sysquota_linux: fix querying of group quotas X-Git-Tag: ldb-1.6.1~233 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9df23fe4e51227b3d5bcb074fe34d10f9e019a66;p=thirdparty%2Fsamba.git sysquota_linux: fix querying of group quotas for gids we need to get/set the effective gids, same like for the uids already BUG: https://bugzilla.samba.org/show_bug.cgi?id=13768 Signed-off-by: Bjoern Jacke Reviewed-by: Uri Simchoni Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Sun Feb 3 09:54:56 CET 2019 on sn-devel-144 --- diff --git a/source3/lib/sysquotas_linux.c b/source3/lib/sysquotas_linux.c index c0987de9299..eebb1ad1f8c 100644 --- a/source3/lib/sysquotas_linux.c +++ b/source3/lib/sysquotas_linux.c @@ -92,10 +92,10 @@ int sys_get_vfs_quota(const char *path, const char *bdev, case SMB_GROUP_FS_QUOTA_TYPE: DEBUG(10, ("sys_get_vfs_quota: path[%s] bdev[%s] " "SMB_GROUP_FS_QUOTA_TYPE (gid[%u])\n", - path, bdev, (unsigned)getgid())); + path, bdev, (unsigned)getegid())); if ((ret = quotactl(QCMD(Q_GETQUOTA, GRPQUOTA), bdev, - getgid(), (caddr_t)&D)) == 0) { + getegid(), (caddr_t)&D)) == 0) { qflags |= QUOTAS_DENY_DISK; } @@ -189,10 +189,10 @@ int sys_set_vfs_quota(const char *path, const char *bdev, case SMB_GROUP_FS_QUOTA_TYPE: DEBUG(10, ("sys_set_vfs_quota: path[%s] bdev[%s] " "SMB_GROUP_FS_QUOTA_TYPE (gid[%u])\n", - path, bdev, (unsigned)getgid())); + path, bdev, (unsigned)getegid())); ret = quotactl(QCMD(Q_GETQUOTA, GRPQUOTA), bdev, - getgid(), (caddr_t)&D); + getegid(), (caddr_t)&D); cur_enf = (ret == 0); new_enf = ((dp->qflags & QUOTAS_DENY_DISK) != 0); /* We're not changing quota enforcement, so return