From: Markus Schaaf <markuschaaf@gmail.com>
To: linux-nfs@vger.kernel.org
Cc: Markus Schaaf <markuschaaf@gmail.com>
Subject: [PATCH] gssd: Use setgroups32 syscall, if available. BUG:FIXED:340
Date: Wed, 1 Jan 2020 19:13:49 +0100 [thread overview]
Message-ID: <20200101181349.12248-1-markuschaaf@gmail.com> (raw)
This closes a bug on older 32-bit platforms, where the 16-bit setgroups
syscall has been replaced by setgroups32 and is not available anymore.
Signed-off-by: Markus Schaaf <markuschaaf@gmail.com>
(Personal note: Reporting a trivial bug and getting a fix upstream in
nfs-utils is like running the gauntlet, for the uninitiated average user.)
BR
---
utils/gssd/gssd_proc.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/utils/gssd/gssd_proc.c b/utils/gssd/gssd_proc.c
index bfcf3f09..9ba16af0 100644
--- a/utils/gssd/gssd_proc.c
+++ b/utils/gssd/gssd_proc.c
@@ -437,7 +437,11 @@ change_identity(uid_t uid)
int res;
/* drop list of supplimentary groups first */
+#ifdef __NR_setgroups32
+ if (syscall(SYS_setgroups32, 0, 0) != 0) {
+#else
if (syscall(SYS_setgroups, 0, 0) != 0) {
+#endif
printerr(0, "WARNING: unable to drop supplimentary groups!");
return errno;
}
--
2.24.1
next reply other threads:[~2020-01-01 18:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-01 18:13 Markus Schaaf [this message]
2020-01-03 16:28 ` [PATCH] gssd: Use setgroups32 syscall, if available. BUG:FIXED:340 Steve Dickson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200101181349.12248-1-markuschaaf@gmail.com \
--to=markuschaaf@gmail.com \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).