* [PATCH] gssd: Use setgroups32 syscall, if available. BUG:FIXED:340
@ 2020-01-01 18:13 Markus Schaaf
2020-01-03 16:28 ` Steve Dickson
0 siblings, 1 reply; 2+ messages in thread
From: Markus Schaaf @ 2020-01-01 18:13 UTC (permalink / raw)
To: linux-nfs; +Cc: Markus Schaaf
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] gssd: Use setgroups32 syscall, if available. BUG:FIXED:340
2020-01-01 18:13 [PATCH] gssd: Use setgroups32 syscall, if available. BUG:FIXED:340 Markus Schaaf
@ 2020-01-03 16:28 ` Steve Dickson
0 siblings, 0 replies; 2+ messages in thread
From: Steve Dickson @ 2020-01-03 16:28 UTC (permalink / raw)
To: Markus Schaaf, linux-nfs
On 1/1/20 1:13 PM, Markus Schaaf wrote:
> 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>
Committed... (tag nfs-utils-2-4-3-rc4)
>
> (Personal note: Reporting a trivial bug and getting a fix upstream in
> nfs-utils is like running the gauntlet, for the uninitiated average user.)
I'm sorry this was a "gauntlet"... but I simply can not take patches that
are only posted in the bz... More eyes are better than my eyes! :-)
Please feel free to ping me privately if the process is becoming a
pain... I'll more that willing to work with you to smooth things out.
steved.
>
> 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;
> }
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-01-03 16:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-01 18:13 [PATCH] gssd: Use setgroups32 syscall, if available. BUG:FIXED:340 Markus Schaaf
2020-01-03 16:28 ` Steve Dickson
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).