From e8c43f434bae4f898fba2a4246b6fb3b5aabe139 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Pierre=20Andr=C3=A9?= Date: Thu, 22 May 2014 09:38:47 +0200 Subject: [PATCH] Fixed checking static groups against process owner When grouping of users are determined from /etc/group (a compile-time option not currently used), the groups examined for checking access rights to a file were wrongly derived from the uid of the file instead of the uid of the current process. --- libntfs-3g/security.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libntfs-3g/security.c b/libntfs-3g/security.c index 576f769e..95efb817 100644 --- a/libntfs-3g/security.c +++ b/libntfs-3g/security.c @@ -1980,7 +1980,7 @@ static int access_check_posix(struct SECURITY_CONTEXT *scx, for (i=pxdesc->acccnt-1; i>=0 ; i--) { pxace = &pxdesc->acl.ace[i]; if ((pxace->tag == POSIX_ACL_GROUP) - && groupmember(scx, uid, pxace->id)) { + && groupmember(scx, scx->uid, pxace->id)) { if (!(~pxace->perms & request & mask)) groupperms = pxace->perms; somegroup = TRUE;