From c347ab1b75361c0997ac11022791864d47134081 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Jacke?= Date: Wed, 30 Jan 2019 17:00:36 +0100 Subject: [PATCH] sysquota_linux: fix querying of group quotas for gids we need to get/set the effective gids, same like for the uids already Signed-off-by: Bjoern Jacke BUG: https://bugzilla.samba.org/show_bug.cgi?id=13768 --- source3/lib/sysquotas_linux.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source3/lib/sysquotas_linux.c b/source3/lib/sysquotas_linux.c index c0987de92999..eebb1ad1f8c4 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 -- 2.17.1