From d6b7b60cd0b4af8c0760589e132593b5c716d8ce Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 10 Nov 2018 11:16:17 +0200 Subject: Fix last change * src/editfns.c (Fgroup_name): Fix the doc string. Move closer to the "group" functions. * src/w32.c (getgrgid): Return NULL if GID is not the group ID of the user of this Emacs session * test/src/editfns-tests.el (test-group-name): Rename from 'group-name'. Add tests for non-Posix hosts. Test error when the argument to group-name is invalid. * etc/NEWS: Fix wording of last added entry. --- src/w32.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/w32.c') diff --git a/src/w32.c b/src/w32.c index e643c421506..3eaa1279dd6 100644 --- a/src/w32.c +++ b/src/w32.c @@ -2043,7 +2043,9 @@ getpwuid (unsigned uid) struct group * getgrgid (gid_t gid) { - return &dflt_group; + if (gid == dflt_passwd.pw_gid) + return &dflt_group; + return NULL; } struct passwd * -- cgit v1.2.1