[PATCH] gssd: Use setgroups32 syscall, if available. BUG:FIXED:340

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>

(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




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux